72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
|
|
@model NP.Model.VMCC
|
||
|
|
@{
|
||
|
|
|
||
|
|
}
|
||
|
|
<ul class="msgTab">
|
||
|
|
<li class="current"><a href="#">받은 메시지</a></li>
|
||
|
|
<li><a href="/My/MemoSend">보낸 메시지</a></li>
|
||
|
|
<li><a href="/My/MemoWrite">메시지 발송</a></li>
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<div class="msgInfo">
|
||
|
|
<p>전체 <b class="red" id="tot">@Model.Memos.Count()</b> / 안읽음 <b class="blu" id="tot2">@Model.Memos.Where(w => w.isread == 0).Count()</b></p>
|
||
|
|
<a href="#" onclick="delme(0)">전체삭제</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<ul class="notifi msgList" id="ulmemos">
|
||
|
|
@foreach (var d in Model.Memos)
|
||
|
|
{
|
||
|
|
<li class="memono@(d.mno)" style="@(d.isread==0 ? "background-color:#f9f9f9":"")">
|
||
|
|
@*<input type="checkbox" class="chkmemo" />*@
|
||
|
|
<h4>@(d.sendusertype > 11 ? "운영자" : d.sendusername) (@(d.senduserid))</h4>
|
||
|
|
<h5 style="cursor: pointer; text-decoration: underline;" onclick="location.href='/My/MemoView?mno=@d.mno&sr=r'">@d.mtitle </h5>
|
||
|
|
<span>@d.cdt.ToString("MM/dd HH:mm")</span>
|
||
|
|
<a href="#" onclick="delme(@d.mno)">삭제</a>
|
||
|
|
</li>
|
||
|
|
}
|
||
|
|
</ul>
|
||
|
|
@section scripts{
|
||
|
|
<script>
|
||
|
|
$(document).ready(function () {
|
||
|
|
|
||
|
|
});
|
||
|
|
var idx = 0;
|
||
|
|
function delme(mno) {
|
||
|
|
idx = mno;
|
||
|
|
if (mno < 1 && $("#ulmemos li").length < 1) {
|
||
|
|
msg("삭제할 메시지가 없습니다.");
|
||
|
|
}
|
||
|
|
else if (mno < 1) {
|
||
|
|
confirmtoggle(true, "정말 전체삭제하시겠습니까?", "gogo()");
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
confirmtoggle(true, "삭제하시겠습니까?", "gogo2()");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function gogo2() {
|
||
|
|
capp("/fcommon/memodel", { mno: idx }, "cbdel");
|
||
|
|
}
|
||
|
|
function gogo() {
|
||
|
|
capp("/fcommon/memodel", { mno: 0 }, "cbdel");
|
||
|
|
}
|
||
|
|
function cbdel() {
|
||
|
|
if (capResult.code == 1000) {
|
||
|
|
if (idx == 0) {
|
||
|
|
$("#ulmemos").html("");
|
||
|
|
} else {
|
||
|
|
$("li.memono" + idx).fadeOut("fast", function () {
|
||
|
|
setTimeout(function () {
|
||
|
|
$("li.memono" + idx).remove();
|
||
|
|
},10);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
msg("삭제되었습니다.");
|
||
|
|
}
|
||
|
|
if ($("#ulmemos li").length < 1) {
|
||
|
|
sett("tot", 0);
|
||
|
|
sett("tot2", 0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
}
|