Fetching desktop from db

This commit is contained in:
Harry Bomrah committed 2012-04-11 15:31:10 +08:00
1 parent eb219c14b7
commit 4875b339f8
24 files changed
+470 -41

No files matched your search

+13
View File
@@ -38,4 +38,17 @@ var orbitDesktopAPI = function(){
if(!time)time=5000; else time=time*1000;
$notify.slideDown().delay(time).slideUp();
};
this.executeFunc = function(func,callbackFn){
func.call(this);
if(callbackFn){
callbackFn.call(this,func);
}
};
this.sortJSON = function(field, reverse, primer){
var key = function (x) {return primer ? primer(x[field]) : x[field]};
return function (a,b) {
var A = key(a), B = key(b);
return ((A < B) ? -1 : (A > B) ? +1 : 0) * [-1,1][+!!reverse];
}
}
};