From 0cc2830392daec58a3ec10a0029371fee3cdbfe6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 9 Jul 2013 16:42:36 +0530 Subject: [PATCH 1/2] [minor] [fix] use --no-color in latest updates build --- home/page/latest_updates/latest_updates.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/page/latest_updates/latest_updates.py b/home/page/latest_updates/latest_updates.py index 697f6c4467..4cd25b2c21 100644 --- a/home/page/latest_updates/latest_updates.py +++ b/home/page/latest_updates/latest_updates.py @@ -19,6 +19,7 @@ def make(): last_commit["author"] = l[8:-1] if l.startswith(" "): last_commit["message"] = l[4:-1] + if l.startswith("commit"): last_commit = { "repo": repo, @@ -29,12 +30,12 @@ def make(): os.chdir("lib") logs = [] out_lib = tempfile.TemporaryFile() - subprocess.call("git --no-pager log -n 200", shell=True, stdout=out_lib) + subprocess.call("git --no-pager log -n 200 --no-color", shell=True, stdout=out_lib) add_to_logs(out_lib, "lib") os.chdir("../app") out_app = tempfile.TemporaryFile() - subprocess.call("git --no-pager log -n 200", shell=True, stdout=out_app) + subprocess.call("git --no-pager log -n 200 --no-color", shell=True, stdout=out_app) add_to_logs(out_app, "app") logs.sort(key=lambda a: a["datetime"], reverse=True) From afad0efca3386c955e57074a18c00a2ffb762467 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 10 Jul 2013 12:00:26 +0530 Subject: [PATCH 2/2] [minor] [fix] trigger startup after page route in app.js so that dialogs created in startup do not auto-close --- public/js/complete_setup.js | 5 ++--- public/js/startup.js | 27 --------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js index 9d859797e2..cdc86624ac 100644 --- a/public/js/complete_setup.js +++ b/public/js/complete_setup.js @@ -48,7 +48,7 @@ $.extend(erpnext.complete_setup, { {fieldname:'update', label:'Setup',fieldtype:'Button'}, ], }); - + if(user != 'Administrator'){ $(d.appframe.$titlebar).find('.close').toggle(false); // Hide close image $('header').toggle(false); // hide toolbar @@ -87,7 +87,6 @@ $.extend(erpnext.complete_setup, { } else { $(this).done_working(); } - }); }; @@ -125,7 +124,7 @@ $.extend(erpnext.complete_setup, { } } - return d; + return d; }, fy_start_list: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'], diff --git a/public/js/startup.js b/public/js/startup.js index 33059e33ae..eadfa1b6cb 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -15,23 +15,14 @@ // along with this program. If not, see . var current_module; -var is_system_manager = 0; wn.provide('erpnext.startup'); -erpnext.startup.set_globals = function() { - if(inList(user_roles,'System Manager')) is_system_manager = 1; -} - erpnext.startup.start = function() { console.log('Starting up...'); $('#startup_div').html('Starting up...').toggle(true); - erpnext.startup.set_globals(); - if(user != 'Guest'){ - erpnext.setup_mousetrap(); - // setup toolbar erpnext.toolbar.setup(); @@ -66,27 +57,9 @@ erpnext.startup.start = function() { } } erpnext.set_about(); - if(wn.control_panel.custom_startup_code) - eval(wn.control_panel.custom_startup_code); } } -erpnext.setup_mousetrap = function() { - $(document).keydown("meta+g ctrl+g", function(e) { - wn.ui.toolbar.search.show(); - return false; - }); - - $(document).keydown("meta+s ctrl+s", function(e) { - if(cur_frm) { - cur_frm.save_or_update(); - } - else if(wn.container.page.save_action) - wn.container.page.save_action(); - return false; - }) -} - // start $(document).bind('startup', function() { erpnext.startup.start();