fixes to profile update

This commit is contained in:
Rushabh Mehta
2012-03-02 11:29:09 +05:30
parent 1e9b15eb5d
commit 37f531b6da
5 changed files with 13 additions and 9 deletions

View File

@@ -2233,7 +2233,7 @@ if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,
else if(nm=='Accounts Browser')
pscript.make_chart(chart_type);}
loadpage(nm,call_back);}
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count')
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}