PHP Classes

File: includes/lib/lobby/js/notify.js

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   includes/lib/lobby/js/notify.js   Download  
File: includes/lib/lobby/js/notify.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change: Lobby 1.0 Cobra
Date: 7 years ago
Size: 822 bytes
 

Contents

Class file image Download
lobby.notify={box:null,checkInterval:null,nfs:[],init:function(){lobby.notify.box=$("nav #notifyBox");this.update();this.events();this.checkInterval=setInterval(function(){lobby.notify.update();},30000);},push:function(){},onNewItems:function(){},update:function(){lobby.ar("notify",{},function(response){nfs=JSON.parse(response);if(nfs.length===0){lobby.notify.box.html("<center><h4>No Notifications</h4></center>");}else{$.each(nfs,function(id,notification){notification["id"]=id;lobby.notify.nfs.push(id);lobby.notify.push(notification);});if(lobby.notify.nfs.length!==nfs.length){$.each(lobby.notify.nfs,function(i,notifyID){if(typeof nfs[notifyID]==="undefined"){lobby.notify.push({"id":notifyID,"removed":true});}});} lobby.notify.onNewItems();}});},events:function(){}};lobby.load(function(){lobby.notify.init();});