summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-material/htdocs/luci-static/material/js/script.js
diff options
context:
space:
mode:
authorLutty Yang <lutty@wcan.in>2015-09-18 11:32:44 +0800
committerLutty Yang <lutty@wcan.in>2015-09-18 11:32:44 +0800
commit2237aab76b6876bc9bc1c0c0fad818898cfbe495 (patch)
tree1b55baa65caf1f7d47d924f8144cd4c31ecab746 /themes/luci-theme-material/htdocs/luci-static/material/js/script.js
parent6c1a2e34833a8514b4f13bfc16a1c0c2d0116bc9 (diff)
luci-theme-material: fix some bug
fixed "logout" text theme error and "unsaved changes" page dislocation. Signed-off-by: Lutty Yang <lutty@wcan.in>
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/material/js/script.js')
-rwxr-xr-xthemes/luci-theme-material/htdocs/luci-static/material/js/script.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js
index b6e0db4740..c7d60b9e34 100755
--- a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js
+++ b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js
@@ -260,14 +260,16 @@
*/
if (!getCurrentNodeByUrl()){
getCurrentNodeByHash();
- if (tree[0] == "Status" && tree[1] == "Overview"){
+ if (tree != undefined && tree[0] == "Status" && tree[1] == "Overview"){
//overview
lastNode.addClass("active");
$($(".main > .main-left > .nav > .slide > .menu")[0]).click();
}
}
- var mainNodeName = "node-"+ tree[0] + "-" + tree[1];
- $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase());
+ if (tree != undefined){
+ var mainNodeName = "node-"+ tree[0] + "-" + tree[1];
+ $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase());
+ }
$(".cbi-button-up").val("");
$(".cbi-button-down").val("");