fixes to new desktop

This commit is contained in:
Rushabh Mehta 2012-12-21 21:40:19 +05:30
parent db94cf16b2
commit 5ade7ca570
2 changed files with 6 additions and 11 deletions

View File

@ -75,11 +75,11 @@ erpnext.desktop.show_pending_notifications = function() {
}
add_circle('module-icon-messages', 'unread_messages', 'Unread Messages');
add_circle('module-icon-support', 'open_support_tickets', 'Open Support Tickets');
add_circle('module-icon-support-home', 'open_support_tickets', 'Open Support Tickets');
add_circle('module-icon-todo', 'things_todo', 'Things To Do');
add_circle('module-icon-calendar', 'todays_events', 'Todays Events');
add_circle('module-icon-project', 'open_tasks', 'Open Tasks');
add_circle('module-icon-kb', 'unanswered_questions', 'Unanswered Questions');
add_circle('module-icon-project-home', 'open_tasks', 'Open Tasks');
add_circle('module-icon-questions', 'unanswered_questions', 'Unanswered Questions');
erpnext.update_messages();

View File

@ -54,16 +54,11 @@ erpnext.toolbar.add_modules = function() {
</ul>\
</li>').prependTo('.navbar .nav:first');
// if no modules list then show all
if(wn.boot.modules_list && typeof(wn.boot.modules_list) == 'string') {
wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
}
else
wn.boot.modules_list = keys(wn.modules).sort();
var modules_list = wn.user.get_default("_desktop_items") || wn.boot.modules_list;
// add to dropdown
for(var i in wn.boot.modules_list) {
var m = wn.boot.modules_list[i]
for(var i in modules_list) {
var m = modules_list[i]
if(m!='Setup' && wn.boot.profile.allow_modules.indexOf(m)!=-1) {
args = {