From 8f97c6c15b8f86d54ede775828bfbd15e5d6a32e Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Fri, 23 Oct 2015 20:16:04 +0300 Subject: [PATCH] Revert "luci-theme-material: do not infer login state from url (#520)" This reverts commit f9e590aa4741bf337029be3f374a33543cc3f37b in order to enable a clean merge of the PR #521 from the theme author. Signed-off-by: Hannu Nyman --- themes/luci-theme-material/htdocs/luci-static/material/js/script.js | 5 +++-- themes/luci-theme-material/luasrc/view/themes/material/header.htm | 2 +- 2 files changed, 4 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 fdd23e8cd..a0f067595 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,10 +144,11 @@ function getCurrentNodeByUrl() { var ret = false; var getUrlNode = function (href){ - if (!$('body').hasClass('logged-in')){ + var linkPos = href.indexOf(";"); + if (linkPos == -1){ return "login"; }else{ - var linkPos = href.indexOf("/", linkPos); + 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 153be101a..99afc065b 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 @@ - +
-- 2.11.0