71 lines
2.4 KiB
Plaintext
71 lines
2.4 KiB
Plaintext
|
|
@model NP.Model.VMCC
|
||
|
|
@{
|
||
|
|
|
||
|
|
}
|
||
|
|
<ul class="msgTab">
|
||
|
|
<li><a href="/My/Memo">받은 메시지</a></li>
|
||
|
|
<li class="current"><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></p>
|
||
|
|
<a href="#" onclick="delme(0)">전체삭제</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<ul class="notifi msgList" id="ulmemos">
|
||
|
|
@foreach (var d in Model.Memos)
|
||
|
|
{
|
||
|
|
var us = Model.Memos2.Where(w => w.mno == d.mno);
|
||
|
|
<li class="memono@(d.mno)">
|
||
|
|
@*<input type="checkbox" class="chkmemo" />*@
|
||
|
|
<h4>@(us.First().sendusertype > 11 ? "운영자" : us.First().username) @(us.Count() > 1 ? string.Format("외 {0}명", us.Count() - 1):"")</h4>
|
||
|
|
<h5 style="cursor: pointer; text-decoration: underline;" onclick="location.href='/My/MemoView?mno=@d.mno&sr=s'">@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/memosenddel", { mno: idx }, "cbdel");
|
||
|
|
}
|
||
|
|
function gogo() {
|
||
|
|
capp("/fcommon/memosenddel", { 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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
}
|