issue 1003 fixed. Showing message information more clearly.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10204 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-02-27 05:13:32 +00:00
parent 63a0c67e58
commit 624b5c1290

View file

@ -1,29 +1,18 @@
(function($){ (function($){
window.xeNotifyMessage = function(text, count){ window.xeNotifyMessage = function(text, count){
var $bar; var $bar;
$bar = $('div.message.info');
$bar = $('div.notifyMessage');
if(!$bar.length) { if(!$bar.length) {
$bar = $('<div class="notifyMessage" />') $bar = $('<div class="message info" />')
.hide() .hide()
.css({ .prependTo(document.body);
position : 'absolute',
background : '#ff0',
border : '1px solid #990',
textAlign : 'center'
})
.appendTo(document.body);
} }
text = text.replace('%d', count); text = text.replace('%d', count);
h = $bar.html('<a href="'+current_url.setQuery('act','dispCommunicationMessages')+'">'+text+'</a>').height(); h = $bar.html('<p><a href="'+current_url.setQuery('act','dispCommunicationMessages')+'">'+text+'</a></p>').height();
$bar.css('top', -h-4).show().animate({top:0}); $bar.show().animate({top:0});
// hide after 10 seconds // hide after 10 seconds
setTimeout(function(){ setTimeout(function(){
$bar.animate({top:-h-4}, function(){ $bar.hide() }); $bar.slideUp();
}, 10000); }, 10000);
}; };
})(jQuery); })(jQuery);