fix to website active

This commit is contained in:
Rushabh Mehta 2014-05-22 17:49:00 +05:30
parent 8e1167edf4
commit 13545751c4
2 changed files with 5 additions and 6 deletions

View file

@ -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")

View file

@ -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;
}
})
},