sync_handler_merge

This commit is contained in:
Anand Doshi 2012-03-23 14:46:07 +05:30
parent 9b56a8ada9
commit 2d4139cbeb
5 changed files with 8 additions and 2 deletions

View File

@ -79,7 +79,7 @@ erpnext.desktop.render = function() {
for(var i in wn.boot.modules_list) {
var m = wn.boot.modules_list[i];
if(m!='Setup' && wn.boot.profile.allow_modules.indexOf(m)!=-1)
if(!in_list(['Setup', 'Dashboard'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
add_icon(m);
}

View File

@ -64,6 +64,10 @@ erpnext.startup.start = function() {
// always allow apps
wn.boot.profile.allow_modules = wn.boot.profile.allow_modules.concat(
['To Do', 'Knowledge Base', 'Calendar', 'Activity', 'Messages'])
// allow dashboard to accounts manager
if(user_roles.indexOf('Accounts Manager')!=-1) {
wn.boot.profile.allow_modules.push('Dashboard');
}
// setup toolbar
erpnext.toolbar.setup();

View File

@ -2203,6 +2203,7 @@ if(inList(user_roles,'System Manager'))is_system_manager=1;}
erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}

View File

@ -1240,6 +1240,7 @@ if(inList(user_roles,'System Manager'))is_system_manager=1;}
erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}

View File

@ -1 +1 @@
1396
1401