fix in desktop and notifications
This commit is contained in:
parent
8acf46c725
commit
08c8edb87f
@ -85,10 +85,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
border-radius: 100%;
|
border-radius: 30px;
|
||||||
-moz-border-radius: 100%;
|
-moz-border-radius: 30px;
|
||||||
-webkit-border-radius: 100%;
|
-webkit-border-radius: 30px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
line-height: 12px;
|
||||||
min-width: 15px;
|
min-width: 15px;
|
||||||
background: #B00D07;
|
background: #B00D07;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
|
@ -103,11 +103,12 @@ show_chart_browser = function(nm, chart_type){
|
|||||||
|
|
||||||
|
|
||||||
// ========== Update Messages ============
|
// ========== Update Messages ============
|
||||||
var update_messages = function() {
|
var update_messages = function(reset) {
|
||||||
// Updates Team Messages
|
// Updates Team Messages
|
||||||
|
|
||||||
if(inList(['Guest'], user)) { return; }
|
if(inList(['Guest'], user)) { return; }
|
||||||
|
|
||||||
|
if(!reset) {
|
||||||
$c_page('home', 'event_updates', 'get_unread_messages', null,
|
$c_page('home', 'event_updates', 'get_unread_messages', null,
|
||||||
function(r,rt) {
|
function(r,rt) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
@ -127,6 +128,10 @@ var update_messages = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
page_body.wntoolbar.set_new_comments(0);
|
||||||
|
$('#msg_count').toggle(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
erpnext.startup.set_periodic_updates = function() {
|
erpnext.startup.set_periodic_updates = function() {
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:35',
|
'creation': '2010-09-20 12:33:34',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-02-29 17:55:13',
|
'modified': '2012-03-01 14:01:03',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
@ -19,6 +19,7 @@ wn.provide('erpnext.messages');
|
|||||||
wn.pages.messages.onload = function(wrapper) {
|
wn.pages.messages.onload = function(wrapper) {
|
||||||
erpnext.messages.show_active_users();
|
erpnext.messages.show_active_users();
|
||||||
erpnext.messages.make_list();
|
erpnext.messages.make_list();
|
||||||
|
update_messages('reset'); //Resets notification icons
|
||||||
|
|
||||||
// post message
|
// post message
|
||||||
$('#message-post').click(function() {
|
$('#message-post').click(function() {
|
||||||
|
@ -2242,9 +2242,9 @@ show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sale
|
|||||||
else if(nm=='Accounts Browser')
|
else if(nm=='Accounts Browser')
|
||||||
pscript.make_chart(chart_type);}
|
pscript.make_chart(chart_type);}
|
||||||
loadpage(nm,call_back);}
|
loadpage(nm,call_back);}
|
||||||
var update_messages=function(){if(inList(['Guest'],user)){return;}
|
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
|
||||||
$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(!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);}});}
|
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);}
|
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||||
wn.updates.id=setInterval(update_messages,60000);}
|
wn.updates.id=setInterval(update_messages,60000);}
|
||||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
||||||
|
@ -1090,9 +1090,9 @@ show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sale
|
|||||||
else if(nm=='Accounts Browser')
|
else if(nm=='Accounts Browser')
|
||||||
pscript.make_chart(chart_type);}
|
pscript.make_chart(chart_type);}
|
||||||
loadpage(nm,call_back);}
|
loadpage(nm,call_back);}
|
||||||
var update_messages=function(){if(inList(['Guest'],user)){return;}
|
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
|
||||||
$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(!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);}});}
|
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);}
|
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||||
wn.updates.id=setInterval(update_messages,60000);}
|
wn.updates.id=setInterval(update_messages,60000);}
|
||||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
||||||
|
@ -1 +1 @@
|
|||||||
784
|
787
|
Loading…
x
Reference in New Issue
Block a user