64 lines
2.4 KiB
Plaintext
64 lines
2.4 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<link rel="stylesheet" href="<%=sWebRootPath%>/Frame/page/resources/css/message.css" />
|
|
<script type="text/javascript">
|
|
(function(){
|
|
var board = $('<div class="board_board"></div>').appendTo(document.body);
|
|
var msg = $('<div class="board_msg"></div>').appendTo(board);
|
|
var min = $('<div class="min_msg"></div>').appendTo(document.body).click(function(){
|
|
$(this).hide();
|
|
board.hide();
|
|
board.slideDown(500);
|
|
});
|
|
$('<span class="rightup_msg"></span>').appendTo(board).append($("<a title='дÐÅ'>£«</a>").click(function(){
|
|
var win = AsControl.OpenPage("/Frame/MessageInfo.jsp", "", "NewMsgFrame", "width=1000px,height=300px,left="+(screen.availHeight-1000)/2+"px,top="+(screen.availHeight-300)/2+"px,toolbar=no,scrollbars=yes,resizable=yes,status=no,menubar=no");
|
|
win.focus();
|
|
})).append($("<a title='Áбí' >¡Ô</a>").click(function(){
|
|
AsDialog.PopView("/Frame/MessageView.jsp", "", "dialogWidth:1000px;dialogHeight:460px;resizable:yes;maximize:yes;help:no;status:no;");
|
|
msg.empty();
|
|
getMsg();
|
|
})).append($("<a title='×îС»¯' >-</a>").click(function(){
|
|
board.show().slideUp(function(){
|
|
min.show();
|
|
});
|
|
}));
|
|
|
|
function getA(data){
|
|
var icon = "";
|
|
if(data["IsNew"]) icon += '<span class="new_msg"> </span>';
|
|
return $('<a href="javascript:void(0);" hidefocus >'+data["MessageTitle"]+icon+'</a>').click(function(){
|
|
var win = AsControl.OpenPage("/Frame/MessageInfo.jsp", "MessageId="+data["MessageId"], "ReadMsgFrame"+data["MessageId"], "width=1000px,height=570px,top=0,left=0,toolbar=no,scrollbars=yes,resizable=yes,status=no,menubar=no");
|
|
win.focus();
|
|
$(this).remove();
|
|
});
|
|
}
|
|
|
|
function getMsg(sMessageIds){
|
|
var sUrl = sWebRootPath+"/servlet/message?rand="+new Date();
|
|
if(sMessageIds) sUrl += "&MessageIds="+sMessageIds;
|
|
$.ajax({
|
|
url : sUrl,
|
|
type : "POST",
|
|
processData : false,
|
|
async : true,
|
|
success : function(text){
|
|
if(!text) return;
|
|
var datas = new Function("return "+text)();
|
|
if(datas.length == 0) return;
|
|
|
|
var messageIds = new Array();
|
|
for(var i = 0; i < datas.length; i++){
|
|
msg.prepend(getA(datas[i]));
|
|
messageIds.push(datas[i]["MessageId"]);
|
|
}
|
|
min.click();
|
|
getMsg(messageIds.join(","));
|
|
},
|
|
error_not : function(){
|
|
alert("¼ÓÔØÏûÏ¢Òì³££¬ÇëË¢ÐÂÒ³Ãæ»òÇë¹ÜÀíÔ±ÐÖú");
|
|
}
|
|
});
|
|
}
|
|
|
|
getMsg();
|
|
})();
|
|
</script> |