From 5d267a4ad7adb247fcc09b303b4cf77972bf2c07 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 1 Mar 2012 18:53:06 +0530 Subject: [PATCH] browse support --- css/all-app.css | 2 +- css/all-web.css | 2 +- erpnext/startup/startup.css | 2 +- erpnext/startup/startup.js | 49 +++++++++++++++++-------------------- js/all-app.js | 26 +++++++++----------- js/all-web.js | 26 +++++++++----------- version.num | 2 +- 7 files changed, 51 insertions(+), 58 deletions(-) diff --git a/css/all-app.css b/css/all-app.css index 2ac3c75210..0dea8b7316 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -2766,7 +2766,7 @@ span, div, td, input, textarea, button, select { } body { - background: url(../erpnext/images/stripedbg.png) repeat; + background: url(../images/stripedbg.png) repeat; } .erpnext-footer { diff --git a/css/all-web.css b/css/all-web.css index 9b4ef72608..36d9cda882 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -1574,7 +1574,7 @@ span, div, td, input, textarea, button, select { } body { - background: url(../erpnext/images/stripedbg.png) repeat; + background: url(../images/stripedbg.png) repeat; } .erpnext-footer { diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css index 64d6deacd2..225e444466 100644 --- a/erpnext/startup/startup.css +++ b/erpnext/startup/startup.css @@ -13,7 +13,7 @@ span, div, td, input, textarea, button, select { } body { - background: url(../erpnext/images/stripedbg.png) repeat; + background: url(../images/stripedbg.png) repeat; } .erpnext-footer { diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js index ecd4a4da00..6747bae665 100644 --- a/erpnext/startup/startup.js +++ b/erpnext/startup/startup.js @@ -46,9 +46,6 @@ erpnext.startup.set_globals = function() { erpnext.startup.start = function() { $('#startup_div').html('Starting up...').toggle(true); - if(!erpnext.check_browser_support()) - return; - erpnext.startup.set_globals(); @@ -90,29 +87,6 @@ erpnext.startup.start = function() { $('#startup_div').toggle(false); } -erpnext.check_browser_support = function() { - var is_supported = function() { - if($.browser.mozilla && flt($.browser.version)<4) return false; - if($.browser.msie && flt($.browser.version)<9) return false; - if($.browser.webkit && flt($.browser.version)<534) return false; - return true; - } - var s = is_supported(); - if(!s) { - $('body').html('
\ -

Unsupported Browser

\ -

ERPNext requires a modern web browser to function correctly

\ -

Supported browsers are: \ -

') - } - return s; -} - // chart of accounts // ==================================================================== show_chart_browser = function(nm, chart_type){ @@ -178,6 +152,29 @@ erpnext.set_user_background = function(src) { // ======================================= +$(document).bind('ready', function() { + (function() { + var is_supported = function() { + if($.browser.mozilla && flt($.browser.version)<4) return false; + if($.browser.msie && flt($.browser.version)<9) return false; + if($.browser.webkit && flt($.browser.version)<534) return false; + return true; + } + if(!is_supported()) { + $('body').html('
\ +

Unsupported Browser

\ +

ERPNext requires a modern web browser to function correctly

\ +

Supported browsers are: \ +

'); + } + })(); +}) + // start $(document).bind('startup', function() { erpnext.startup.start(); diff --git a/js/all-app.js b/js/all-app.js index bcdcbfda77..c72de9a756 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -2224,25 +2224,12 @@ wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',f var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'} erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway) if(inList(user_roles,'System Manager'))is_system_manager=1;} -erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);if(!erpnext.check_browser_support()) -return;erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);} +erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);} if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);} if(user=='Guest'){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']) erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('');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);} -erpnext.check_browser_support=function(){var is_supported=function(){if($.browser.mozilla&&flt($.browser.version)<4)return false;if($.browser.msie&&flt($.browser.version)<9)return false;if($.browser.webkit&&flt($.browser.version)<534)return false;return true;} -var s=is_supported();if(!s){$('body').html('
\ -

Unsupported Browser

\ -

ERPNext requires a modern web browser to function correctly

\ -

Supported browsers are: \ -

')} -return s;} 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);} else if(nm=='Accounts Browser') pscript.make_chart(chart_type);} @@ -2253,6 +2240,17 @@ if(circle){if(r.message.length){circle.find('span:first').text(r.message.length) erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);} wn.updates.id=setInterval(update_messages,60000);} erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))} +$(document).bind('ready',function(){(function(){var is_supported=function(){if($.browser.mozilla&&flt($.browser.version)<4)return false;if($.browser.msie&&flt($.browser.version)<9)return false;if($.browser.webkit&&flt($.browser.version)<534)return false;return true;} +if(!is_supported()){$('body').html('
\ +

Unsupported Browser

\ +

ERPNext requires a modern web browser to function correctly

\ +

Supported browsers are: \ +

');}})();}) $(document).bind('startup',function(){erpnext.startup.start();}); /* * erpnext/startup/js/modules.js diff --git a/js/all-web.js b/js/all-web.js index 9e07a03064..156f7c507b 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -1072,25 +1072,12 @@ wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',f var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'} erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway) if(inList(user_roles,'System Manager'))is_system_manager=1;} -erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);if(!erpnext.check_browser_support()) -return;erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);} +erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);} if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);} if(user=='Guest'){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']) erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('');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);} -erpnext.check_browser_support=function(){var is_supported=function(){if($.browser.mozilla&&flt($.browser.version)<4)return false;if($.browser.msie&&flt($.browser.version)<9)return false;if($.browser.webkit&&flt($.browser.version)<534)return false;return true;} -var s=is_supported();if(!s){$('body').html('
\ -

Unsupported Browser

\ -

ERPNext requires a modern web browser to function correctly

\ -

Supported browsers are: \ -

')} -return s;} 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);} else if(nm=='Accounts Browser') pscript.make_chart(chart_type);} @@ -1101,6 +1088,17 @@ if(circle){if(r.message.length){circle.find('span:first').text(r.message.length) erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);} wn.updates.id=setInterval(update_messages,60000);} erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))} +$(document).bind('ready',function(){(function(){var is_supported=function(){if($.browser.mozilla&&flt($.browser.version)<4)return false;if($.browser.msie&&flt($.browser.version)<9)return false;if($.browser.webkit&&flt($.browser.version)<534)return false;return true;} +if(!is_supported()){$('body').html('
\ +

Unsupported Browser

\ +

ERPNext requires a modern web browser to function correctly

\ +

Supported browsers are: \ +

');}})();}) $(document).bind('startup',function(){erpnext.startup.start();}); /* * erpnext/website/js/topbar.js diff --git a/version.num b/version.num index 25c4e5246c..4c88dcfb82 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -796 \ No newline at end of file +805 \ No newline at end of file