luci-theme-material: remove the double slash (//) from menu url
[project/luci.git] / themes / luci-theme-material / luasrc / view / themes / material / header.htm
index f96653a..8419ade 100755 (executable)
@@ -19,6 +19,7 @@
 -%>
 
 <%
+       local ver = require "luci.version"
        local sys  = require "luci.sys"
        local util = require "luci.util"
        local http = require "luci.http"
@@ -49,7 +50,7 @@
                        c._menu_selected = true
                end
        end
-    
+
     -- send as HTML5
        http.prepare_content("text/html")
 
 
                local childs = disp.node_childs(node)
                if #childs > 0 then
-        
+
             if level > 2 then
 %>
        <ul class="tabs">
-               <%  
+               <%
             end
 
                        local selected_node
@@ -92,7 +93,7 @@
                        </li>
                <%      end
                        end
-            
+
             if level > 2 then
                %>
        </ul>
 <head>
     <meta charset="utf-8">
     <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
-    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
+    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
     <meta name="format-detection" content="telephone=no, email=no"/>
     <meta name="apple-mobile-web-app-capable" content="yes">
     <meta name="mobile-web-app-capable" content="yes">
     <meta name="theme-color" content="#0099CC">
     <meta name="msapplication-tap-highlight" content="no">
     <meta name="msapplication-TileColor" content="#0099CC">
+
+    <meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
+    <meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
     <meta name="msapplication-TileImage" content="<%=media%>/logo.png"/>
+    <link rel="icon" href="<%=media%>/logo.png" sizes="144x144">
+    <link rel="apple-touch-icon-precomposed" href="<%=media%>/logo.png" sizes="144x144">
+
     <link rel="stylesheet" href="<%=media%>/css/style.css">
     <link rel="shortcut icon" href="<%=media%>/favicon.ico">
     <% if node and node.css then %>
     <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">
                        end
                        %>
                        <% if ucichanges > 0 then %>
-                       <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=ucichanges%></a>
+                       <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=ucichanges%></a>
                        <% end %>
                        <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
                                <span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>
 </header>
 
  <div class="main">
-        <div class="loading"><span>Loading...</span></div>
+        <div style="" class="loading"><span><div class="loading-img"></div>Loading...</span></div>
         <div class="main-left">
                 <ul class="nav">
                         <%-
                         %>
                         <li class="slide">
                                 <a class="menu" data-title="<%=pcdata(striptags(nnode.title))%>" href="#"><%=pcdata(striptags(translate(nnode.title)))%></a>
-                                <%- submenu("/" .. category .. "/" .. r .. "/", nnode) %>
+                                <%- submenu(category .. "/" .. r .. "/", nnode) %>
                         </li>
                         <%          else %>
                         <li>