with notifications and other changes
This commit is contained in:
1 parent
176597f5af
commit
aa3997f7cf
9 files changed
+76
-11
No files matched your search
@@ -1,4 +1,5 @@
|
||||
|
||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||
orbitDesktopAPI.prototype.notifyImgPath = "/assets/";
|
||||
var od = new orbitDesktop("#ajax_container");
|
||||
|
||||
@@ -18,7 +18,6 @@ var orbitDesktop = function(dom){
|
||||
o.themesettings = eval(ts);
|
||||
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', "/"+o.themefolder+"/"+theme+"/css/"+ts.css));
|
||||
$(document).ready(function(){o.loadWallpaper();o.bindDesktopEvents();o.loadIconCache();o.initializeDesktop();});
|
||||
return;
|
||||
})
|
||||
|
||||
};
|
||||
@@ -134,7 +133,7 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
};
|
||||
this.tempFunc = function(){
|
||||
alert(o.tp);
|
||||
o.notify("This is test notification!!","imp")
|
||||
}
|
||||
this.initializeAppSearch = function(target){
|
||||
o.currenthtml = target;
|
||||
@@ -204,8 +203,9 @@ var orbitDesktop = function(dom){
|
||||
});
|
||||
$(".section_label ul li:not(:nth-child(1))").droppable({
|
||||
drop:function(){
|
||||
if($("#"+$(this).attr("data-category")+" .element").length>=24)
|
||||
o.notify("Section is full");
|
||||
if($("#"+$(this).attr("data-category")+" .element").length>=24){
|
||||
o.notify("Section is full.","alert");
|
||||
}
|
||||
else
|
||||
$("#"+$(this).attr("data-category")).append(element);
|
||||
}
|
||||
|
||||
@@ -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 = "";
|
||||
Reference in new issue
Block a user