details changed

orbitdesktop.js, orbitdesktopAPI.js update!
This commit is contained in:
devin committed 2012-04-06 04:42:20 +08:00
1 parent 39e1bc8948
commit 74f083b226
8 files changed
+149 -91

No files matched your search

+7 -2
View File
@@ -17,7 +17,7 @@ var orbitDesktopAPI = function(){
o = this;
this.notify = function(msg,type,time){
var $notify = $("#orbitnote");
var img;
var img, n_height;
if(!type)type="";
switch(type){
case "alert":
@@ -35,8 +35,13 @@ var orbitDesktopAPI = function(){
}
$notify.find("img#note_img").attr("src","/assets/"+img);
$notify.find(".note_message").text(msg);
n_height = $notify.outerHeight();
if(!time)time=5000; else time=time*1000;
$notify.slideDown().delay(time).slideUp();
$notify
.css({'top':-n_height, 'display':'block', 'opacity':0})
.animate({top:0,opacity:1},200)
.delay(time)
.animate({top:-n_height,opacity:0},200);
};
};