with notifications and other changes

This commit is contained in:
Harry Bomrah authored and Christophe Vilayphiou committed 2012-04-06 17:47:03 +08:00
1 parent 6158799a47
commit ddf6a606a2
9 files changed
+76 -11

No files matched your search

+25 -4
View File
@@ -15,8 +15,29 @@ var sortDescending = function(a, b) {
};
var orbitDesktopAPI = function(){
o = this;
this.notify = function(msg){
alert(msg);
this.notify = function(msg,type,time){
var $notify = $("#orbitnote");
var img;
if(!type)type="";
switch(type){
case "alert":
img = "note_alert.png";
break;
case "imp":
img = "note_imp.png";
break;
case "success":
img = "note_success.png";
break;
default:
img = "note_alert.png";
break;
}
$notify.find("img#note_img").attr("src","/assets/"+img);
$notify.find(".note_message").text(msg);
if(!time)time=5000; else time=time*1000;
$notify.slideDown().delay(time).slideUp();
};
};
};
orbitDesktopAPI.prototype.notifyImgPath = "";