fix to website active
This commit is contained in:
parent
8e1167edf4
commit
13545751c4
2 changed files with 5 additions and 6 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue