2013-08-05 09:29:54 +00:00
|
|
|
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
// License: GNU General Public License v3. See license.txt
|
2012-02-23 07:05:32 +00:00
|
|
|
|
2012-01-20 08:17:16 +00:00
|
|
|
/* toolbar settings */
|
|
|
|
wn.provide('erpnext.toolbar');
|
|
|
|
|
|
|
|
erpnext.toolbar.setup = function() {
|
|
|
|
// profile
|
2013-04-19 07:31:32 +00:00
|
|
|
var $user = $('#toolbar-user');
|
2013-07-26 09:41:55 +00:00
|
|
|
$user.append('<li><a href="#Form/Profile/'+user+'"><i class="icon-fixed-width icon-user"></i> '
|
2013-01-07 10:09:54 +00:00
|
|
|
+wn._("My Settings")+'...</a></li>');
|
2013-04-19 07:31:32 +00:00
|
|
|
$user.append('<li class="divider"></li>');
|
2013-07-26 09:41:55 +00:00
|
|
|
$user.append('<li><a href="https://erpnext.com/manual" target="_blank">\
|
2013-08-01 06:40:09 +00:00
|
|
|
<i class="icon-fixed-width icon-file"></i> '+wn._('Documentation')+'</a></li>');
|
2013-07-26 09:41:55 +00:00
|
|
|
$user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
|
2013-08-01 06:40:09 +00:00
|
|
|
<i class="icon-fixed-width icon-quote-left"></i> '+wn._('Forum')+'</a></li>');
|
|
|
|
|
|
|
|
if(wn.boot.expires_on) {
|
|
|
|
$user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
|
|
|
|
<i class="icon-fixed-width icon-comments"></i> '+wn._('Live Chat')+'</a></li>');
|
|
|
|
}
|
2013-04-19 07:31:32 +00:00
|
|
|
|
2012-04-30 10:13:34 +00:00
|
|
|
erpnext.toolbar.set_new_comments();
|
2013-07-09 09:06:41 +00:00
|
|
|
|
2013-07-26 09:41:55 +00:00
|
|
|
$("#toolbar-tools").append('<li><a href="#latest-updates">\
|
|
|
|
<i class="icon-fixed-width icon-rss"></i> Latest Updates</li>');
|
2012-02-20 11:01:55 +00:00
|
|
|
}
|
|
|
|
|
2012-04-30 10:13:34 +00:00
|
|
|
erpnext.toolbar.set_new_comments = function(new_comments) {
|
2013-06-18 10:16:32 +00:00
|
|
|
return;
|
2012-04-30 10:13:34 +00:00
|
|
|
var navbar_nc = $('.navbar-new-comments');
|
2012-11-13 06:12:42 +00:00
|
|
|
if(cint(new_comments)) {
|
2012-04-30 10:13:34 +00:00
|
|
|
navbar_nc.addClass('navbar-new-comments-true')
|
2012-11-13 06:12:42 +00:00
|
|
|
navbar_nc.text(new_comments);
|
2012-04-30 10:13:34 +00:00
|
|
|
} else {
|
|
|
|
navbar_nc.removeClass('navbar-new-comments-true');
|
|
|
|
navbar_nc.text(0);
|
|
|
|
}
|
2013-01-07 10:09:54 +00:00
|
|
|
}
|