/* toolbar settings */ wn.provide('erpnext.toolbar'); erpnext.toolbar.setup = function() { // modules erpnext.toolbar.add_modules(); // profile $('#toolbar-user').append('
  • Profile Settings
  • '); $('#toolbar-user').append('
  • Team / Messages
  • '); $('.navbar .pull-right').prepend('\
  • '); // help $('.navbar .pull-right').append('') $('#toolbar-help').append('
  • \ Documentation
  • ') $('#toolbar-help').append('
  • \ Forum
  • ') $('#toolbar-help').append('
  • \ Live Chat (Office Hours)
  • ') // billing if(pscript.is_erpnext_saas && is_system_manager) { $('#toolbar-user').append('
  • Billing
  • ') } $.extend(page_body.wntoolbar, { set_new_comments: function(new_comments) { var navbar_nc = $('#toolbar-new-comments'); if(new_comments && new_comments.length>0) { navbar_nc.html('' + new_comments.length + ''); navbar_nc.click(function() { loadpage('My Company'); }); $.each(new_comments, function(i, v) { var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "...")); var id = v[0].replace('/', '-'); if(!$('#' + id)[0]) { show_alert(msg, id); } }) } else { navbar_nc.html(''); navbar_nc.click(function() { return false; }); } } }); page_body.wntoolbar.set_new_comments(); } erpnext.toolbar.add_modules = function() { $('').insertAfter('li[data-name="navbar-home"]'); $('.navbar .nav:first') }