461 lines
26 KiB
Plaintext
461 lines
26 KiB
Plaintext
@model NP.Model.VMCM
|
|
<div style="@(Model.CM.cmno < 1 ? "display: none;":"")">
|
|
<ul class="pagination pagination-md" style="margin: 0;">
|
|
<li class=""><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
|
<li class="active"><a href="#" data-toggle="tab">회차설정</a></li>
|
|
@if (Model.CM.ismaster == 0 && Model.CM.cshape == 2)
|
|
{
|
|
<li class=""><a href="#" onclick="gotab(2);" data-toggle="tab">교육일정</a></li>
|
|
}
|
|
<li class=""><a href="#" onclick="gotab(3);" data-toggle="tab">평가설정</a></li>
|
|
<li class=""><a href="#" onclick="gotab(4);" data-toggle="tab">메뉴설정</a></li>
|
|
</ul>
|
|
</div>
|
|
<form id="mform1" method="post" class="form-horizontal">
|
|
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 기본설정<span class=""></span></strong></header>
|
|
<div class="panel-body">
|
|
@if (Model.CM.ismaster == 1)
|
|
{
|
|
<div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label">과정분류 | 과정명</label>
|
|
<div class="col-sm-8 col-md-10"><input type="text" class="form-control" disabled value="[ @(Model.CM.pcgname) | @(Model.CM.cgname) ] @(Model.CM.cname)" /></div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group">
|
|
<label class="col-sm-4 col-md-2 control-label">기수 | 강좌명 | 분반</label>
|
|
<div class="col-sm-8 col-md-10"><input type="text" class="form-control" disabled value="@(Model.CM.tmname) | @(Model.CM.cname) | @(Model.CM.classno)반" /></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">
|
|
<input type="file" name="uploadfile" id="uploadfile" />
|
|
<br />
|
|
<a href="~/Content/file/cminnings.xlsx" class="btn btn-info">양식다운로드</a>
|
|
<a href="#" class="btn btn-primary" onclick="regbatch()">일괄등록</a>
|
|
<br />
|
|
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:순차학습(이전회차를 반드시 학습완료해야 다음회차 학습가능);0:임의학습" }, { "checked", Model.CM.isseq }, { "name", "CM.isseq" } })
|
|
<a href="#" class="btn btn-primary" onclick="saveseq();">설정저장</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="tar buttonbox"><a href="#" onclick="reg(0,@Model.CM.cshape);" class="btn btn-s-xs btn-info">등록</a></div>
|
|
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 회차목록<span class=""></span></strong></header>
|
|
<div class="table-responsive" id="excel1">
|
|
<table class="table table-striped b-t b-light">
|
|
<thead>
|
|
<tr>
|
|
<th width="80">회차</th>
|
|
<th>학습방식</th>
|
|
<th>강의주제</th>
|
|
<th>강사</th>
|
|
<th>최근수정일</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="data" id="tbody1">
|
|
@foreach (var item in Model.CMInnings)
|
|
{
|
|
<tr>
|
|
<td>@item.iseq @(item.istaste == 1 ? "(S)" : "")</td>
|
|
<td>@item.isonlinename</td>
|
|
<td class="link"><a href="#" onclick="reg(@item.cmino,@item.cshape,@item.isonline)">@item.ititle</a></td>
|
|
<td>@item.username</td>
|
|
<td>@item.udtymd</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
<form id="dform" method="post" action="/cm/@Model.listviewname">
|
|
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
|
|
</form>
|
|
<div id="thisbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px; overflow: auto;">
|
|
<h4><i class="fa fa-bars"></i> <span id="pcap">회차등록수정</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
|
<table class="regtable">
|
|
<colgroup><col style="width:150px;" /><col /></colgroup>
|
|
<tr>
|
|
<th>학습방식</th>
|
|
<td>@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:온라인;0:오프라인" }, { "checked", 1 }, { "name", "isonline" } })</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="req">강의주제</th>
|
|
<td>@Html.TextBox("ititle", "", new { @class = "form-control", @style = "", @maxlength = "100" })</td>
|
|
</tr>
|
|
<tr class="troffline" id="scdLocation">
|
|
<th class="req">강의장소</th>
|
|
<td>@Html.TextBox("icontent", "", new { @class = "form-control", @style = "", @maxlength = "250" })</td>
|
|
</tr>
|
|
<tr class="troffline" id="scdTime">
|
|
<th class="req">학습시점/시간</th>
|
|
<td>
|
|
@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "idate" } })
|
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "iday" }, { "start", 1 }, { "end", 31 }, { "textadd", "일차" }, { "df", ":-일차" }, { "class", "disp-init" }, { "style", "width: 100px;" } })
|
|
|
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "isth" }, { "start", 0 }, { "end", 23 }, { "textadd", "시" }, { "df", ":-시" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "istm" }, { "start", 0 }, { "end", 59 }, { "textadd", "분" }, { "df", ":-분" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
|
~
|
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "ieth" }, { "start", 0 }, { "end", 23 }, { "textadd", "시" }, { "df", ":-시" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
|
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "special", "fromto" }, { "name", "ietm" }, { "start", 0 }, { "end", 59 }, { "textadd", "분" }, { "df", ":-분" }, { "class", "disp-init" }, { "style", "width: 80px;" } })
|
|
</td>
|
|
</tr>
|
|
<tr class="troffline">
|
|
<th>교안</th>
|
|
<td>
|
|
<input type="hidden" name="fgnotf" id="fgnotf" />
|
|
<input type="file" name="filetf" id="filetf" />
|
|
<div id="files"></div>
|
|
</td>
|
|
</tr>
|
|
<tr class="tronline">
|
|
<th class="req">콘텐츠</th>
|
|
<td class="selectgroupulbox">
|
|
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" onclick="findcontentshow()"><i class="fa fa-search"></i></a>
|
|
<ul class="selectgroupul" id="contentdatabox">
|
|
@*<li class="no@ctno" data-no="@ctno"><label>@ctname</label><a href="#" class="adel" onclick="ullidel(this)">X</a></li>*@
|
|
</ul>
|
|
<a href="#" class="btn btn-info btn-xxs withhidedelitem" style="margin-top: -20px; display: none;" id="btnpreview" onclick="viewcontent(0)">[미리보기]</a>
|
|
</td>
|
|
</tr>
|
|
<tr class="tronline">
|
|
<th>맛보기</th>
|
|
<td>@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "checked", 0 }, { "name", "istaste" } })</td>
|
|
</tr>
|
|
<tr class="tronline">
|
|
<th class="req">학습시간</th>
|
|
<td>@Html.TextBox("sttime", 0, new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })분</td>
|
|
</tr>
|
|
<tr class="tronline">
|
|
<th class="req">출석인정시간</th>
|
|
<td>@Html.TextBox("atime", 0, new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })분</td>
|
|
</tr>
|
|
<tr class="tronline">
|
|
<th>중간출석팝업</th>
|
|
<td>
|
|
@Html.TextBox("mstime", 0, new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })분
|
|
~
|
|
@Html.TextBox("metime", 0, new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })분
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="req">강사</th>
|
|
<td>@Html.Partial("./Partial/Select", Model.CMPRs, new ViewDataDictionary { { "special", "reg" }, { "name", "userno" }, { "selected", "" }, { "df", ":-강사선택" }, { "class", "disp-init" } })</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="req">회차(순서)</th>
|
|
<td>@Html.TextBox("iseq", "", new { @class = "form-control disp-init int nocomma text-center", @style = "width: 80px;", @maxlength = "3" })</td>
|
|
</tr>
|
|
</table>
|
|
<div class="findboxbtnbox" id="scdSave">
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
<a href="#" class="btn btn-danger" id="btndel" onclick="del();">삭제</a>
|
|
</div>
|
|
<br /><br />
|
|
</div>
|
|
|
|
@Html.Partial("./Partial/ContentBox", "bindContent;콘텐츠 선택;1;" + (Model.CM.pcmno ?? Model.CM.cmno) + ";thisbox", new ViewDataDictionary { { "cms", Model.CMs } })
|
|
@section styles{
|
|
|
|
}
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/ScriptDate")
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
$("input[name='isonline']").on("change", function () {
|
|
|
|
$(".troffline,.tronline").hide();
|
|
if ($(this).val() == "1") {
|
|
$(".tronline").show();
|
|
$("#scdSave").show();
|
|
}
|
|
else
|
|
{
|
|
$(".troffline").show();
|
|
if ($("#files").html() == "") {
|
|
$("#filetf").show();
|
|
}
|
|
$("#idate,#iday").hide();
|
|
$("#idate").next("i").hide();
|
|
if (@Model.CM.ismaster == 1) {
|
|
$("#iday").show();
|
|
} else {
|
|
$("#idate").show();
|
|
$("#idate").next("i").show();
|
|
}
|
|
if (@Model.CM.ismaster == 0 && @Model.CM.cshape == 2) {
|
|
$("#scdLocation").hide();
|
|
$("#scdTime").hide();
|
|
$("#scdSave").hide();
|
|
}
|
|
else {
|
|
$("#scdLocation").show();
|
|
$("#scdTime").show();
|
|
$("#scdSave").show();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
function bindContent(ui) {
|
|
var split1 = ""; var split2 = ""; var split3 = ""; var split4 = ""; var split5 = "";
|
|
$("#contentdatabox li").remove();
|
|
$.each($(ui.split(';')), function (i, d) {
|
|
if ($("#contentdatabox li.no" + d.split(':')[0]).length < 1) {
|
|
if (!isnulloremt(d.split(':')[4])) { split1 = "[" + d.split(':')[4] + "]"; } if (!isnulloremt(d.split(':')[5])) { split2 = "[" + d.split(':')[5] + "]"; } if (!isnulloremt(d.split(':')[6])) { split3 = "[" + d.split(':')[6] + "]"; } if (!isnulloremt(d.split(':')[7])) { split4 = "[" + d.split(':')[7] + "]"; } if (!isnulloremt(d.split(':')[8])) { split5 = "[" + d.split(':')[8] + "]"; }
|
|
$("#contentdatabox").append("<li style=\"margin-left:0px;\" class=\"no" + d.split(':')[0] + "\" text-left data-no=\"" + d.split(':')[0] + "\">" + "[" + d.split(':')[1] + "]" + "[" + d.split(':')[2] + "]" + split1 + split2 + split3 + split4 + split5 + d.split(':')[3] + " <a href=\"#\"class=\"adel\" onclick=\"ullidel(this)\">x</a></li>")
|
|
$("#btnpreview").show();
|
|
}
|
|
});
|
|
}
|
|
function save() {
|
|
if (check("ititle", null, "강의주제를 입력해주세요.", true)) { }
|
|
else if (getrv("isonline") == "1" && $("#contentdatabox li").length < 1) { msg2("콘텐츠를 등록해주세요."); }
|
|
else if (getrv("isonline") == "1" && getint(val("sttime")) < 1) { focus("sttime"); msg2("학습시간을 입력해주세요."); }
|
|
else if (getrv("isonline") == "1" && getint(val("atime")) < 1) { focus("atime"); msg2("출석인정시간을 입력해주세요."); }
|
|
//else if (getrv("isonline") == "1" && getint(val("mstime")) < 1) { focus("mstime"); msg2("중간출석팝업시간을 입력해주세요."); }
|
|
//else if (getrv("isonline") == "1" && getint(val("metime")) < 1) { focus("metime"); msg2("중간출석팝업시간을 입력해주세요."); }
|
|
//else if (getrv("isonline") == "1" && getint(val("metime")) >= getint(val("atime"))) { focus("metime"); msg2("중간출석팝업시간을 확인해주세요(출석인정시간보다 빠르게)."); }
|
|
//else if (getrv("isonline") == "1" && getint(val("metime")) < getint(val("mstime"))) { focus("metime"); msg2("중간출석팝업시간을 확인해주세요."); }
|
|
else if (getrv("isonline") == "0" && check("icontent", null, "강의장소를 입력해주세요.", true)) { }
|
|
else if (getrv("isonline") == "0" && @Model.CM.ismaster == 1 && check("iday", null, "학습시점일자를 입력해주세요.", true)) { }
|
|
else if (getrv("isonline") == "0" && @Model.CM.ismaster == 0 && check("idate", null, "학습시점일자를 입력해주세요.", true)) { }
|
|
else if (getrv("isonline") == "0" && val("isth") == "") { focus("isth"); msg2("학습시간을 확인해주세요."); }
|
|
else if (getrv("isonline") == "0" && val("istm") == "") { focus("istm"); msg2("학습시간을 확인해주세요."); }
|
|
else if (getrv("isonline") == "0" && val("ieth") == "") { focus("ieth"); msg2("학습시간을 확인해주세요."); }
|
|
else if (getrv("isonline") == "0" && val("ietm") == "") { focus("ietm"); msg2("학습시간을 확인해주세요."); }
|
|
else if (getrv("isonline") == "0" && getint(val("isth")) > getint(val("ieth"))) { focus("ieth"); msg2("학습시간을 확인해주세요(종료시간이 더 빠름)"); }
|
|
else if (getrv("isonline") == "0" && getint(val("isth")) == getint(val("ieth")) && getint(val("istm")) > getint(val("ietm"))) { focus("ieth"); msg2("학습시간을 확인해주세요(종료시간이 더 빠름)"); }
|
|
else if (check("userno", null, "강사를 선택해주세요.", true)) { }
|
|
else if (getint(val("iseq")) < 1) { focus("iseq"); msg2("회차를 입력해주세요."); }
|
|
else if (confirm("저장하시겠습니까?")) {
|
|
if (getrv("isonline") == "1") {
|
|
capp("/acommon/cminningsave", { cmino: _cmino, cmno: @Model.CM.cmno, isonline: getrv("isonline"), ititle: getv("ititle"), ctno: $("#contentdatabox li").attr("data-no"), istaste: getrv("istaste"), sttime: getint(val("sttime")), atime: getint(val("atime")), mstime: getint(val("mstime")), metime: getint(val("metime")), userno: val("userno"), iseq: val("iseq") }, "cbcminningsave", null, null,null,true);
|
|
} else {
|
|
if (@Model.CM.cshape == 2) {
|
|
msg2("혼합(온라인 + 오프라인)교육시 오프라인 회차는 등록 할 수 없습니다.");
|
|
return;
|
|
}
|
|
var data = new FormData();
|
|
data.append("cmino", _cmino);
|
|
data.append("cmno", @Model.CM.cmno);
|
|
data.append("isonline", getrv("isonline"));
|
|
data.append("ititle", getv("ititle"));
|
|
data.append("icontent", val("icontent"));
|
|
data.append("idate", val("idate"));
|
|
data.append("iday", getint(val("iday")));
|
|
data.append("ist", fillzero(val("isth"), true, 2) + fillzero(val("istm"), true, 2));
|
|
data.append("iet", fillzero(val("ieth"), true, 2) + fillzero(val("ietm"), true, 2));
|
|
data.append("fgnotf", val("fgnotf"));
|
|
if ($("#filetf")[0].files.length > 0) {
|
|
data.append("filetf", $("#filetf")[0].files[0]);
|
|
}
|
|
data.append("userno", val("userno"));
|
|
data.append("iseq", val("iseq"));
|
|
capfile("/acommon/cminningsave", data, "cbcminningsave", null, null, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
function cbcminningsave() {
|
|
if (capResult.code == 1000 && capResult.obj > 0) {
|
|
msg2("저장되었습니다.", 0, null, "gotab(1);");
|
|
} else {
|
|
msg2("이미 등록된 회차입니다. 다른 회차를 입력해주세요.");
|
|
}
|
|
}
|
|
function reg(no, cshape, isonline) {
|
|
if (@Model.CM.ismaster == 0 && @Model.CM.cshape == 2 && isonline == 0) {
|
|
setTimeout(function () {
|
|
$("#scdLocation").hide();
|
|
$("#scdTime").hide();
|
|
$("#scdSave").hide(); }, 200);
|
|
|
|
}
|
|
else {
|
|
$("#scdLocation").show();
|
|
$("#scdTime").show();
|
|
$("#scdSave").show();
|
|
}
|
|
_cmino = no;
|
|
$("#btndel,#btnpreview").hide();
|
|
$(".troffline,.tronline").hide();
|
|
$("#idate,#iday").hide();
|
|
$("#idate").next("i").hide();
|
|
if (cshape == 0) {
|
|
setrv("isonline", 1);
|
|
$(".tronline").show();
|
|
|
|
} else {
|
|
setrv("isonline", 0);
|
|
$(".troffline").show();
|
|
if ($("#files").html() == "") {
|
|
$("#filetf").show();
|
|
}
|
|
if (@Model.CM.ismaster == 1) {
|
|
$("#iday").show();
|
|
} else {
|
|
$("#idate").show();
|
|
$("#idate").next("i").show();
|
|
}
|
|
|
|
}
|
|
setrv("istaste", 0);
|
|
$("#ititle,#icontent,#idate,#iday,#isth,#istm,#ieth,#ietm,#userno,#iseq,#fgnotf,#filetf").val("");
|
|
$("#files").html("");
|
|
$("#sttime,#atime,#mstime,#metime").val("");
|
|
$("#contentdatabox").html("");
|
|
$("#pcap").text("회차등록");
|
|
if (no < 1) {
|
|
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
|
|
} else {
|
|
$("#pcap").text("회차수정");
|
|
capp("/acommon/cminningget", { cmino: no }, "cbcminningget", null, null, null, true);
|
|
}
|
|
}
|
|
var _cmino = 0;
|
|
function cbcminningget() {
|
|
if (capResult.code == 1000) {
|
|
var d = capResult.obj;
|
|
$("#btndel").show();
|
|
setrv("isonline", d.isonline);
|
|
setv("ititle", d.ititle);
|
|
setv("userno", d.userno);
|
|
setv("iseq", d.iseq);
|
|
if (d.isonline == 1) {
|
|
$("#contentdatabox").append("<li class=\"no" + d.ctno + "\" data-no=\"" + d.ctno + "\"><label>" + d.ctname + "</label><a href=\"#\" class=\"adel\" onclick=\"ullidel(this)\">X</a></li>");
|
|
$("#btnpreview").show();
|
|
setrv("istaste", d.istaste);
|
|
setv("sttime", d.sttime);
|
|
setv("atime", d.atime);
|
|
setv("mstime", d.mstime);
|
|
setv("metime", d.metime);
|
|
} else {
|
|
$(".troffline").show();
|
|
$(".tronline").hide();
|
|
setv("icontent", d.icontent);
|
|
setv("idate", d.idateymd);
|
|
setv("iday", d.iday);
|
|
setv("isth", getint(d.ist.substr(0, 2)));
|
|
setv("istm", getint(d.ist.substr(2, 2)));
|
|
setv("ieth", getint(d.iet.substr(0, 2)));
|
|
setv("ietm", getint(d.iet.substr(2, 2)));
|
|
setv("fgnotf", getdb(d.fgnotf));
|
|
$("#filetf").show();
|
|
if (getdb(d.orgname2) != "") {
|
|
$("#filetf").hide();
|
|
$("#files").append("<a href=\"/aCommon/DownFile?fno=" + d.fileno2 + "\" title=\"다운로드\"><i class=\"fa fa-paperclip\"></i> <span class=\"fileitem\">" + d.orgname2 + "</span></a>" +
|
|
" <a href=\"#\" class=\"btn_txt btn btn-xxs btn-danger\" onclick=\"javascript:delfiletf("+d.fileno2+", this, '"+d.cmino+"|9', true, 'cbfgnotfdel()');\" title=\"삭제\">삭제</a>");
|
|
}
|
|
$("#idate,#iday").hide();
|
|
$("#idate").next("i").hide();
|
|
if (@Model.CM.ismaster == 1) {
|
|
$("#iday").show();
|
|
} else {
|
|
$("#idate").show();
|
|
$("#idate").next("i").show();
|
|
}
|
|
}
|
|
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
|
|
}
|
|
}
|
|
function delfiletf(id, a, log, isjs2, cb) {
|
|
log = log || "";
|
|
if (confirm('삭제 하시겠습니까?')) {
|
|
capp('/aCommon/DeleteFile', { key: id, log: log }, cb || "cbdelfilenew", null, null, null, isjs2);
|
|
}
|
|
}
|
|
function cbfgnotfdel() {
|
|
if (capResult.code == 1000) {
|
|
$("#files").html("");
|
|
$("#filetf").show();
|
|
}
|
|
}
|
|
function saveseq() { if (confirm("학습방식을 저장하시겠습니까?")) { capp("/acommon/cmseqsave", { cmno: @Model.CM.cmno, isseq: getrv("CM.isseq") }, "cbsaveseq"); } }
|
|
function cbsaveseq() { if (capResult.code == 1000) { msg("학습방식을 변경했습니다.") } else { msgadmin() } }
|
|
function gotab(idx, t) {
|
|
bglayer();
|
|
t = t || 0;
|
|
setTimeout(function () {
|
|
if (idx == 0) { $("#dform").attr("action", "/cm/@Model.viewname").submit(); }
|
|
else if (idx == 1) { $("#dform").attr("action", "/cm/@(Model.viewname)inning").submit(); }
|
|
else if (idx == 2) { $("#dform").attr("action", "/cm/@(Model.viewname)eduschedule").submit(); }
|
|
else if (idx == 3) { $("#dform").attr("action", "/cm/@(Model.viewname)est").submit(); }
|
|
else if (idx == 4) { $("#dform").attr("action", "/cm/@(Model.viewname)menu").submit(); }
|
|
}, t);
|
|
}
|
|
function regbatch() {
|
|
if ($("#uploadfile").val() == "") { msg("파일을 선택해주세요."); }
|
|
else {
|
|
var thumbext = $("#uploadfile").val();
|
|
thumbext = thumbext.slice(thumbext.indexOf(".") + 1).toLowerCase();
|
|
if ("xlsx".indexOf(thumbext) < 0) {
|
|
msg("xlsx 확장자만 가능합니다.");
|
|
}
|
|
else if (confirm("일괄등록하시겠습니까?")) {
|
|
var formData = new FormData();
|
|
formData.append("uploadfile", $("#uploadfile")[0].files[0]);
|
|
formData.append("intval", @Model.CM.cmno);
|
|
formData.append("intval2", @Model.CM.ismaster);
|
|
formData.append("uploadjob", "cminningbatch");
|
|
capfile("/acommon/uploadexcel", formData, "cbregbatch", null, true, false, true);
|
|
}
|
|
}
|
|
}
|
|
function cbregbatch() {
|
|
//$('#thisbox').slideUp('fast'); $('#bglayer').hide();
|
|
//$("#uploadfile").val("");
|
|
if (capResult.code == 1000) {
|
|
msg("일괄등록을 완료했습니다.", null, true, null, true);
|
|
gotab(1, 500);
|
|
}
|
|
else {
|
|
console.log(capResult.msg);
|
|
msg("업로드가 실패했습니다.<br /><br />" + capResult.msg);
|
|
}
|
|
}
|
|
function del() {
|
|
if (confirm("삭제하시겠습니까?")) {
|
|
capp("/acommon/cminningdel", { im: @(Model.CM.ismaster), cmino: _cmino}, "cbdel");
|
|
}
|
|
}
|
|
function cbdel() {
|
|
if (capResult.code == 1000) {
|
|
msg("삭제했습니다.", null, true, null, true);
|
|
gotab(1, 500);
|
|
} else {
|
|
msg("수강신청정보가 있습니다. 삭제할 수 없습니다.");
|
|
}
|
|
}
|
|
var _ctno;
|
|
var _dtype = 1;
|
|
function viewcontent(ctno) {
|
|
_ctno = ctno < 1 ? $("#contentdatabox li").attr("data-no") : ctno;
|
|
capp("/acommon/setauthkey", { dtype: _dtype, intval: _ctno }, "cbauth", null, null, null, true);
|
|
}
|
|
function cbauth() {
|
|
if (capResult.code == 1000) {
|
|
var nWidth = "1080";
|
|
var nHeight = screen.availHeight;
|
|
var popOption = "";
|
|
popOption += "width=" + nWidth + "px,";
|
|
popOption += "height=" + nHeight + "px,";
|
|
popOption += "toolbar=no,menubar=no,location=yes,";
|
|
popOption += "resizable=yes,status=yes,scrollbars=yes";
|
|
var pop = window.open("@ViewBag.fronturl.Replace("https://", "http://")/CDMS/PlayTaste?authtype=" + _dtype +"&authkey=" + capResult.obj + "&ctno=" + _ctno + "&ismobile=0", 'contentsview', popOption);
|
|
if (pop == null) {
|
|
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
}
|