407 lines
16 KiB
Plaintext
407 lines
16 KiB
Plaintext
@model NP.Model.VMCM
|
|
@{
|
|
Layout = "~/Views/Shared/_PopupLayout.cshtml";
|
|
}
|
|
<div class="row">
|
|
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
|
|
<section class="panel panel-default">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 기본정보<span class=""></span></strong></header>
|
|
<div class="panel-body">
|
|
<div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label req">설문유형</label>
|
|
<div class="col-sm-8 col-md-10">
|
|
@if (Model.RSC.rscno < 1)
|
|
{
|
|
@Html.Partial("./Partial/Radio", "0:강의평가;1:강사설문", new ViewDataDictionary { { "special", "stringlist" }, { "name", "RSC.rstype" }, { "checked", Model.RSC.rstype } })
|
|
}
|
|
else
|
|
{
|
|
@Html.HiddenFor(m => m.RSC.rstype) @Model.RSC.rstypename
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label req">설문명</label>
|
|
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.RSC.rscname, new { @class = "form-control", @maxlength = "100" })</div>
|
|
</div>
|
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label">사용여부</label>
|
|
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", "1:사용;0:미사용", new ViewDataDictionary { { "special", "stringlist" }, { "name", "RSC.isuse" }, { "checked", Model.RSC.isuse } })</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="panel panel-default">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 문제정보<span class=""></span></strong></header>
|
|
<div class="col-md-12 resultbox" style="margin-bottom: 70px; padding: 0">
|
|
<table class="databox" id="box1">
|
|
<colgroup>
|
|
<col style="width: 50px;" />
|
|
<col style="width: 70px;" />
|
|
<col style="width: 250px;" />
|
|
<col />
|
|
<col style="width: 80px;" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" onclick="javascript: checkall('box1', this);" /></th>
|
|
<th>문제유형</th>
|
|
<th>분류</th>
|
|
<th>문제</th>
|
|
<th>문제순서</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody style="overflow-x:scroll;">
|
|
@foreach (var item in Model.RSCQs)
|
|
{
|
|
<tr class="data center" data-eqno="@(item.rscqno)" data-ccode="@item.eqtypes">
|
|
<td class="autocheck"><input type="checkbox" class="autocheck qno" value="@item.qno" /></td>
|
|
<td class="atname">@item.atypename</td>
|
|
<td class="qtypes">@item.eqtypenames</td>
|
|
<td class="qts text-left link"><div style="max-height: 30px;"><a href="#" class="link" onclick="viewquestion(@item.qno)">@item.qtextstring</a></div></td>
|
|
<td class="qseq"><input type="text" class="int text-center" value="@item.dseq" style="width: 90%;" /></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<div class="botfixempty"> </div>
|
|
<div class="botfix islayer" style="left:0px; margin-left:0px;">
|
|
<div class="col-sm-6 text-left" style="@(Model.examsavable == "" ? "":"display: none;")">
|
|
<a href="#" class="btn btn-facebook" onclick="qadd();">문제추가</a>
|
|
<a href="#" class="btn btn-danger" onclick="qdel();">선택문제삭제</a>
|
|
</div>
|
|
<div class="col-sm-6 text-right">
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
<a href="#" class="btn btn-default" onclick="goparent(val('IsSavedForParent') == '1');">닫기</a>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="RSC.rscno" id="datakey" value="@Model.RSC.rscno" />
|
|
@Html.HiddenFor(m => m.IsSavedForParent)
|
|
<input type="hidden" name="savedata2" id="sdata2" />
|
|
@Html.Partial("./Partial/DForm", Model)
|
|
</form>
|
|
</div>
|
|
<div class="svyPop" style="display:none;" id="pop1">
|
|
<div style="padding-top: 30px; padding-bottom: 30px;">
|
|
<div>
|
|
<div class="svyPopWrap" style="height: 100%; max-width: 800px;">
|
|
<div class="svyPopTitle"><h5>설문참여</h5><a href="#" style="color: #fff;" onclick="$('#pop1').hide();$('html, body').removeClass('lock');"></a></div>
|
|
<div class="lctPopScroll">
|
|
<div class="svyPopCont" id="rslist"><ul class="svyPopBtn" id="btnrscgobox"></ul></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@section styles{
|
|
<style type="text/css">
|
|
td.qhide, th.qhide {
|
|
display: none;
|
|
}
|
|
|
|
td input.int {
|
|
background-color: #fce97f;
|
|
border: 0 none;
|
|
}
|
|
|
|
td input.int:read-only {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
div.pull-in._hide, div.form-group._hide {
|
|
background-color: #ddd;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
div.pull-in._hide {
|
|
margin: 0;
|
|
}
|
|
|
|
.form-horizontal .form-group._hide {
|
|
margin-right: 0 !important;
|
|
margin-left: 0 !important;
|
|
}
|
|
|
|
#layertable td, #box1 td {
|
|
padding: 2px 4px;
|
|
}
|
|
|
|
#findlayerframe {
|
|
bottom: 5%;
|
|
top: 5%;
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
border-radius: 5px;
|
|
z-index: 2000;
|
|
padding: 10px;
|
|
font-size: 12px;
|
|
width: 100%;
|
|
height: 90%;
|
|
max-height: 100%;
|
|
max-width: 100%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.lctPopScroll {position:absolute; left:0; right:0; top:60px; bottom:0;}
|
|
.lctPopScroll > div {height:100%; overflow-y:auto; -webkit-overflow-scrolling: touch;}
|
|
.svyPop {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.7);
|
|
z-index: 100;
|
|
text-align: left;
|
|
}
|
|
|
|
.svyPop > div {
|
|
display: table;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.svyPop > div > div {
|
|
display: table-cell;
|
|
width: 100%;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.svyPopWrap {
|
|
width: 100%;
|
|
max-width: 510px;
|
|
max-height: 100%;
|
|
margin: 0 auto;
|
|
background: #fff;
|
|
position: relative;
|
|
}
|
|
|
|
.svyPopTitle {
|
|
background: #0068b7;
|
|
position: relative;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.svyPopTitle h5 {
|
|
height: 60px;
|
|
line-height: 60px;
|
|
color: #fff;
|
|
font-size: 16pt;
|
|
}
|
|
|
|
.svyPopTitle a {
|
|
display: block;
|
|
height: 60px;
|
|
width: 60px;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
text-indent: -9999px;
|
|
z-index: 1;
|
|
cursor: pointer;
|
|
background: url("/img/common/gnb_close.png")no-repeat center center;
|
|
background-size: 24px auto;
|
|
}
|
|
|
|
.svyPopCont {
|
|
padding: 30px 30px 50px;
|
|
overflow-y: auto;
|
|
text-align: left;
|
|
}
|
|
|
|
.svyPopCont img {
|
|
display: block;
|
|
margin: 0 auto;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.svyPopBtn {
|
|
text-align: left;
|
|
margin-top: 30px;
|
|
font-size: 11pt;
|
|
}
|
|
|
|
.svyPopBtn li {
|
|
/*display: inline-block;*/
|
|
margin: 0 3px;
|
|
}
|
|
|
|
.svyPopBtn li a {
|
|
display: block;
|
|
width: 180px;
|
|
height: 50px;
|
|
line-height: 48px;
|
|
border: solid 1px #383838;
|
|
color: #383838;
|
|
}
|
|
|
|
.svyPopBtn li a.bk {
|
|
background: #383838;
|
|
color: #fff;
|
|
}
|
|
.svyPopBtn input {height: 40px; padding: 0 20px;}
|
|
|
|
.svyPopCont .svyTest:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.svyTest {
|
|
margin-top: 30px;
|
|
border-top: solid 1px #d6d6d6;
|
|
border-bottom: solid 1px #d6d6d6;
|
|
}
|
|
|
|
.svyTest dt {
|
|
background: #f9f9f9;
|
|
border-bottom: solid 1px #d6d6d6;
|
|
padding: 10px 20px;
|
|
font-size: 12pt;
|
|
}
|
|
|
|
.svyTest dd {
|
|
padding: 15px 20px;
|
|
}
|
|
|
|
.svyTest dd ul li {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.svyTest dd ul li:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.svyTest dd ul li input[type="radio"] {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.svyTest dd ul li label {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
font-size: 12pt;
|
|
}
|
|
|
|
.svyTest dd input[type="text"] {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
}
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/ScriptDate")
|
|
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
$(document).ready(function () {
|
|
$("input._hide").prop("readonly", true);
|
|
focus("RSC_rscname");
|
|
});
|
|
function selectquestion(jsons) {
|
|
var idx = $("#box1 tr.data").length + 1;
|
|
$.each(jsons, function (i, r) {
|
|
if ($("#box1 tr.data td input.autocheck[value='" + r.qno + "']").length < 1) {
|
|
$("#box1 tbody").append("<tr class=\"data center\" data-eqno=\"0\" data-ccode=\"" + r.qdiff + ":" + r.cc1 + ":" + r.cc2 + ":" + r.cc3 + ":" + r.cc4 + ":" + r.cc5 + "\">"
|
|
+ "<td class=\"autocheck\"><input type=\"checkbox\" class=\"autocheck qno\" value=\"" + r.qno + "\" /></td>"
|
|
+ "<td class=\"atname\">" + r.atypename + "</td>"
|
|
+ "<td class=\"qtypes\">" + r.qdiffname + ":" + r.ccname1 + ":" + r.ccname2 + ":" + r.ccname3 + ":" + r.ccname4 + ":" + r.ccname5 + "</td>"
|
|
+ "<td class=\"qts link\"><div style=\"max-height: 30px;\"><a href=\"#\" class=\"link\" onclick=\"viewquestion(" + r.qno + ")\">" + r.qtextstring + "</a></div></td>"
|
|
+ "<td class=\"qseq\"><input type=\"text\" class=\"int text-center\" value=\"" + (idx++) + "\" style=\"width: 90%;\" /></td></tr>");
|
|
}
|
|
});
|
|
}
|
|
function save() {
|
|
if ('@(Model.RSC.rscno)' == '0' && checkrv("RSC.rstype", null, "설문유형을 선택해주세요.")) { }
|
|
else if (check("RSC_rscname", "", "설문명칭을 입력하세요.")) { }
|
|
else if ($("#box1 tbody tr").length < 1) { msg("출제할 문항을 추가해주세요."); }
|
|
else if (confirm("설문을 " + (getint(val("RSC_rscno")) < 1 ? "등록" : "수정") + "하시겠습니까?")) {
|
|
var sd = "";
|
|
$.each($("#box1 tbody tr.data"), function (i, r) {
|
|
sd += ";" + $(r).attr("data-eqno") + ":" + $(r).find("td.qseq input.int").val() + ":" + $(r).find("td.autocheck input.qno").val();
|
|
});
|
|
$("#sdata2").val(sd.length > 0 ? sd.substr(1) : sd);
|
|
cap("/acommon/rscsave", "mform", "cbsave");
|
|
}
|
|
}
|
|
var pqlist = "";
|
|
function qadd() {
|
|
framelayer("/cm/qp?stringval13=RSC");
|
|
}
|
|
function calcplist() {
|
|
pqlist = "";
|
|
$.each($("#box1 tbody tr.data input.autocheck.qno"), function (i, c) {
|
|
pqlist += "," + $(c).val();
|
|
});
|
|
}
|
|
function qdel() {
|
|
if ($("#box1 tr.data td input.autocheck.qno:checked").length < 1) {
|
|
msg("삭제할 문제를 선택하세요.");
|
|
}
|
|
else {
|
|
var eqnos = "";
|
|
for (var i = $("#box1 tr.data").length - 1; i >= 0; i--) {
|
|
var r = $("#box1 tr.data:eq(" + i + ")");
|
|
if ($(r).find("td.autocheck input.autocheck.qno:checked").length > 0) {
|
|
$(r).remove();
|
|
}
|
|
}
|
|
msg("저장해야 반영됩니다.");
|
|
}
|
|
}
|
|
function cbdeleq() {
|
|
if (capOK) {
|
|
for (var i = $("#box1 tr.data").length - 1; i >= 0; i--) {
|
|
var r = $("#box1 tr.data:eq(" + i + ")");
|
|
if ($(r).find("td.autocheck input.autocheck.qno:checked").length > 0) {
|
|
$(r).remove();
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
msg("이미 응시가 시작된 문제는 삭제할 수 없습니다.");
|
|
}
|
|
}
|
|
function cbsave() {
|
|
if (capOK) {
|
|
if ('@(Model.RSC.rscno)' == '0') {
|
|
$("#intval").val(capResult.obj);
|
|
}
|
|
setv("IsSavedForParent", 1);
|
|
timesubmit();
|
|
}
|
|
else if (capResult.obj == -1) {
|
|
msg("이미 최종평가가 등록되어 있습니다.");
|
|
}
|
|
else {
|
|
msg("시험등록 중 올바르지 않는 데이터로 반영되지 않았습니다. 시스템관리자에게 문의해주세요.");
|
|
}
|
|
}
|
|
function viewquestion(qno) {
|
|
$("#btnrscgobox").html("");
|
|
capp("/acommon/questionget", { qno: qno }, "cbquestionget");
|
|
}
|
|
function cbquestionget() {
|
|
var q = capResult.obj.q;
|
|
if (q.atype == 0) {
|
|
var qis = "";
|
|
$.each(capResult.obj.qis, function (i2, qi) {
|
|
qis += "<li style=\"border-bottom: 1px solid #ddd;\">" +
|
|
"<input value=\""+qi.qino+"\" data-qino=\"" + qi.qino + "\" type=\"" + (q.rightcount > 1 ? "checkbox" : "radio") + "\" name=\"rscqno1\" id=\"qino" + qi.qino + "\" />" +
|
|
" <label for=\"qino" + qi.qino + "\">" + (getdb(qi.fileurl) == "" ? qi.qitext : ("<img style=\"max-width: 80%;\" src=\"@Model.Files" + qi.fileurl + "\"<br/>" + getdb(qi.qitext))) + "</label></li>";
|
|
});
|
|
$("#btnrscgobox").html("<dl class=\"svyTest atype0 " + (q.rightcount > 1 ? "atypemulti":"")+"\" data-rscqno=\"1\"><dt><div>#1.</div><div style=\"margin: -20px 0 0 30px\">" + q.qtext + "</div></dt><dd><ul class=\"qis\">" + qis + "</ul></dd></dl>");
|
|
} else {
|
|
$("#btnrscgobox").html("<dl class=\"svyTest\" data-rscqno=\"1\"><dt><div>#1.</div><div style=\"margin: -20px 0 0 30px\">" + q.qtext + "</div></dt><dd><input type=\"text\" class=\"qitext\" /></div></dd></dl>");
|
|
}
|
|
$("#pop1").show();
|
|
}
|
|
</script>
|
|
} |