From efd222b6ac90551ddfaf314041112045a0f27dc7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 8 Nov 2011 10:39:52 +0530 Subject: [PATCH] logout fix --- erpnext/home/doctype/home_control/home_control.py | 4 ++-- erpnext/startup/startup.js | 15 ++++++++------- index.html | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py index 8242e74431..ce15bfd57a 100644 --- a/erpnext/home/doctype/home_control/home_control.py +++ b/erpnext/home/doctype/home_control/home_control.py @@ -31,6 +31,8 @@ class DocType: def get_modules(self): rl = webnotes.user.get_roles() ml = sql("select distinct t1.name, t1.module_icon, t1.module_label, t1.module_desc, t1.module_page from `tabModule Def` t1, `tabModule Def Role` t2 where t2.role in ('%s') and t1.disabled !='Yes' and ifnull(t1.is_hidden, 'No') != 'Yes' and t1.name = t2.parent order by t1.module_seq asc" % "','".join(rl), as_dict=1) + webnotes.response['login_url'] = session['data'].get('login_from', '') + return ml def get_module_details(self,m): @@ -48,8 +50,6 @@ class DocType: AND t2.role IN ("%s") AND ifnull(standard,"No")="No"''' % (m, '", "'.join(webnotes.user.get_roles())), as_dict=1) - ret['login_url'] = session['data'].get('login_from', '') - return ret # ---------------------------------------------------------------------------------------------------------------- diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js index 3e2fde404e..fcb097bd4e 100644 --- a/erpnext/startup/startup.js +++ b/erpnext/startup/startup.js @@ -56,6 +56,14 @@ pscript.startup_make_sidebar = function() { // menu var ml = r.message; + // login-file + if(r.login_url){ + login_file = 'http://' + r.login_url; + } + else if(pscript.is_erpnext_saas) { + login_file = 'https://www.erpnext.com'; + } + // clear page_body.left_sidebar.innerHTML = ''; @@ -292,13 +300,6 @@ SidebarItem.prototype.show_items = function() { } } - if(r.login_url){ - login_file = 'http://' + r.login_url; - } - else if(pscript.is_erpnext_saas) { - login_file = 'https://www.erpnext.com'; - } - $(me.items_area).slideDown(); diff --git a/index.html b/index.html index f4f087ba6b..315fe8ab4c 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ ERPNext -