Revert "luci-theme-material: do not infer login state from url (#520)"

This reverts commit f9e590aa47
in order to enable a clean merge of the PR #521 from the theme author.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
Hannu Nyman 2015-10-23 20:16:04 +03:00
parent f9e590aa47
commit 8f97c6c15b
2 changed files with 4 additions and 3 deletions

View file

@ -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{

View file

@ -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 %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>">
<header>
<div class="container">