diff options
Diffstat (limited to 'themes/luci-theme-material')
-rwxr-xr-x | themes/luci-theme-material/htdocs/luci-static/material/js/script.js | 5 | ||||
-rwxr-xr-x | themes/luci-theme-material/luasrc/view/themes/material/header.htm | 2 |
2 files changed, 3 insertions, 4 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 a0f067595b..fdd23e8cd2 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 @@ -144,11 +144,10 @@ function getCurrentNodeByUrl() { var ret = false; var getUrlNode = function (href){ - var linkPos = href.indexOf(";"); - if (linkPos == -1){ + if (!$('body').hasClass('logged-in')){ return "login"; }else{ - linkPos = href.indexOf("/", linkPos); + var linkPos = href.indexOf("/", linkPos); if (linkPos == -1){ return "overview"; }else{ diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm index 99afc065b3..153be101a5 100755 --- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm +++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm @@ -135,7 +135,7 @@ <script src="<%=resource%>/xhr.js"></script> </head> -<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>"> +<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"> <header> <div class="container"> |