Rushabh Mehta | 3966f1d | 2012-02-23 12:35:32 +0530 | [diff] [blame] | 1 | // 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 Mehta | 8c309be | 2012-01-20 13:47:16 +0530 | [diff] [blame] | 17 | /* toolbar settings */ |
| 18 | wn.provide('erpnext.toolbar'); |
| 19 | |
| 20 | erpnext.toolbar.setup = function() { |
| 21 | // profile |
Rushabh Mehta | cc32b65 | 2013-04-19 13:01:32 +0530 | [diff] [blame] | 22 | var $user = $('#toolbar-user'); |
| 23 | $user.append('<li><a href="#Form/Profile/'+user+'">' |
Rushabh Mehta | 523aec4 | 2013-01-07 15:39:54 +0530 | [diff] [blame] | 24 | +wn._("My Settings")+'...</a></li>'); |
Rushabh Mehta | cc32b65 | 2013-04-19 13:01:32 +0530 | [diff] [blame] | 25 | $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 Doshi | 2aa9ba6 | 2012-04-30 15:43:34 +0530 | [diff] [blame] | 33 | erpnext.toolbar.set_new_comments(); |
Rushabh Mehta | 3ed351d | 2013-07-09 14:36:41 +0530 | [diff] [blame] | 34 | |
| 35 | $("#toolbar-tools").append('<li><a href="#latest-updates">Latest Updates</li>'); |
Anand Doshi | c3023be | 2012-02-20 16:31:55 +0530 | [diff] [blame] | 36 | } |
| 37 | |
Anand Doshi | 2aa9ba6 | 2012-04-30 15:43:34 +0530 | [diff] [blame] | 38 | erpnext.toolbar.set_new_comments = function(new_comments) { |
Rushabh Mehta | 4736c35 | 2013-06-18 15:46:32 +0530 | [diff] [blame] | 39 | return; |
Anand Doshi | 2aa9ba6 | 2012-04-30 15:43:34 +0530 | [diff] [blame] | 40 | var navbar_nc = $('.navbar-new-comments'); |
Rushabh Mehta | 9d0569a | 2012-11-13 11:42:42 +0530 | [diff] [blame] | 41 | if(cint(new_comments)) { |
Anand Doshi | 2aa9ba6 | 2012-04-30 15:43:34 +0530 | [diff] [blame] | 42 | navbar_nc.addClass('navbar-new-comments-true') |
Rushabh Mehta | 9d0569a | 2012-11-13 11:42:42 +0530 | [diff] [blame] | 43 | navbar_nc.text(new_comments); |
Anand Doshi | 2aa9ba6 | 2012-04-30 15:43:34 +0530 | [diff] [blame] | 44 | } else { |
| 45 | navbar_nc.removeClass('navbar-new-comments-true'); |
| 46 | navbar_nc.text(0); |
| 47 | } |
Rushabh Mehta | 523aec4 | 2013-01-07 15:39:54 +0530 | [diff] [blame] | 48 | } |