mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 22:28:24 +00:00
major reworking of page navigation
This commit is contained in:
@@ -85,7 +85,7 @@ erpnext.complete_setup = function() {
|
||||
wn.boot.user_info[user].fullname = user_fullname;
|
||||
d.hide();
|
||||
$('header').toggle(true);
|
||||
page_body.wntoolbar.set_user_name();
|
||||
wn.container.wntoolbar.set_user_name();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ erpnext.toolbar.setup = function() {
|
||||
$('#toolbar-user').append('<li><a href="#billing">Billing</a></li>')
|
||||
}
|
||||
|
||||
$.extend(page_body.wntoolbar, {
|
||||
$.extend(wn.container.wntoolbar, {
|
||||
set_new_comments: function(new_comments) {
|
||||
var navbar_nc = $('.navbar-new-comments');
|
||||
if(new_comments && new_comments.length>0) {
|
||||
@@ -66,7 +66,7 @@ erpnext.toolbar.setup = function() {
|
||||
}
|
||||
});
|
||||
|
||||
page_body.wntoolbar.set_new_comments();
|
||||
wn.container.wntoolbar.set_new_comments();
|
||||
}
|
||||
|
||||
erpnext.toolbar.add_modules = function() {
|
||||
|
||||
@@ -114,7 +114,7 @@ var update_messages = function(reset) {
|
||||
function(r,rt) {
|
||||
if(!r.exc) {
|
||||
// This function is defined in toolbar.js
|
||||
page_body.wntoolbar.set_new_comments(r.message.unread_messages);
|
||||
wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
|
||||
|
||||
var show_in_circle = function(parent_id, msg) {
|
||||
var parent = $('#'+parent_id);
|
||||
@@ -139,7 +139,7 @@ var update_messages = function(reset) {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
page_body.wntoolbar.set_new_comments(0);
|
||||
wn.container.wntoolbar.set_new_comments(0);
|
||||
$('#unread_messages').toggle(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user