blob: 91427b3ada8257dfa2cee5d9f006749ca7223ff6 [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301// ERPNext - web based ERP (http://erpnext.com)
2// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
Rushabh Mehta8c309be2012-01-20 13:47:16 +053017/* toolbar settings */
18wn.provide('erpnext.toolbar');
19
20erpnext.toolbar.setup = function() {
21 // profile
Rushabh Mehtacc32b652013-04-19 13:01:32 +053022 var $user = $('#toolbar-user');
23 $user.append('<li><a href="#Form/Profile/'+user+'">'
Rushabh Mehta523aec42013-01-07 15:39:54 +053024 +wn._("My Settings")+'...</a></li>');
Rushabh Mehtacc32b652013-04-19 13:01:32 +053025 $user.append('<li class="divider"></li>');
26 $user.append('<li><a href="https://erpnext.com/manual" target="_blank">'
27 +wn._('Documentation')+'</a></li>')
28 $user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">'
29 +wn._('Forum')+'</a></li>')
30 $user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
31 '+wn._('Live Chat')+'</a></li>')
32
Anand Doshi2aa9ba62012-04-30 15:43:34 +053033 erpnext.toolbar.set_new_comments();
Rushabh Mehta3ed351d2013-07-09 14:36:41 +053034
35 $("#toolbar-tools").append('<li><a href="#latest-updates">Latest Updates</li>');
Anand Doshic3023be2012-02-20 16:31:55 +053036}
37
Anand Doshi2aa9ba62012-04-30 15:43:34 +053038erpnext.toolbar.set_new_comments = function(new_comments) {
Rushabh Mehta4736c352013-06-18 15:46:32 +053039 return;
Anand Doshi2aa9ba62012-04-30 15:43:34 +053040 var navbar_nc = $('.navbar-new-comments');
Rushabh Mehta9d0569a2012-11-13 11:42:42 +053041 if(cint(new_comments)) {
Anand Doshi2aa9ba62012-04-30 15:43:34 +053042 navbar_nc.addClass('navbar-new-comments-true')
Rushabh Mehta9d0569a2012-11-13 11:42:42 +053043 navbar_nc.text(new_comments);
Anand Doshi2aa9ba62012-04-30 15:43:34 +053044 } else {
45 navbar_nc.removeClass('navbar-new-comments-true');
46 navbar_nc.text(0);
47 }
Rushabh Mehta523aec42013-01-07 15:39:54 +053048}