From 13545751c4f8507275322fb750ccb79dafe7d551 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 22 May 2014 17:49:00 +0530 Subject: [PATCH] fix to website active --- frappe/boot.py | 2 ++ frappe/website/js/website.js | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frappe/boot.py b/frappe/boot.py index 2bb61eefc4..de9a14a544 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -37,6 +37,8 @@ def get_bootinfo(): bootinfo.modules.update(frappe.get_attr(app + ".config.desktop.get_data")() or {}) except ImportError: pass + except AttributeError: + pass bootinfo.module_app = frappe.local.module_app bootinfo.hidden_modules = frappe.db.get_global("hidden_modules") diff --git a/frappe/website/js/website.js b/frappe/website/js/website.js index ee399ca7e0..ac8530fd1a 100644 --- a/frappe/website/js/website.js +++ b/frappe/website/js/website.js @@ -337,12 +337,9 @@ $.extend(frappe, { $(".navbar a.active").removeClass("active"); $(".navbar a").each(function() { var href = $(this).attr("href"); - if(pathname.indexOf(href)===0) { - var more = pathname.replace(href, ""); - if(!more || more.substr(0, 1)==="/") { - $(this).addClass("active"); - return false; - } + if(href===pathname) { + $(this).addClass("active"); + return false; } }) },