themes/openwrt.org: display error if Java Script is disabled
[project/luci.git] / themes / openwrt.org / luasrc / view / themes / openwrt.org / header.htm
index a2d8e32..ccb01ec 100644 (file)
@@ -30,7 +30,7 @@ for i,r in ipairs(request) do
        end
 end
 
-require("luci.i18n").loadc("default")
+require("luci.i18n").loadc("base")
 require("luci.http").prepare_content("application/xhtml+xml")
 
 -%>
@@ -49,6 +49,7 @@ require("luci.http").prepare_content("application/xhtml+xml")
 <script type="text/javascript" src="<%=resource%>/VarType.js"></script>
 <script type="text/javascript" src="<%=resource%>/XHTML1.js"></script>
 <script type="text/javascript" src="<%=resource%>/Dropdowns.js"></script>
+<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI</title>
 </head>
 <body class="lang_<%=luci.i18n.context.lang%>">
@@ -96,7 +97,7 @@ local function submenu(prefix, node)
                                local href = controller .. prefix .. v.name .. "/"
                                href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
 %>
-<li><a<% if nnode._menu_selected then %> class="active"<%end%> href="<%=pcdata(href)%>"><%=pcdata(striptags(nnode.title))%></a><%-
+<li><a<% if nnode._menu_selected then %> class="active"<%end%> href="<%=pcdata(href)%>"><%=striptags(nnode.title)%></a><%-
 submenu(prefix .. v.name .. "/", nnode)
 %></li>
 <%-
@@ -122,7 +123,7 @@ if cattree and cattree.nodes then
                        local href = controller.."/"..category.."/"..k.name.."/"
                        href = (k.query) and href .. luci.http.build_querystring(k.query) or href
 %>
-<li><a<% if node._menu_selected then %> class="preactive"<%end%> href="<%=pcdata(href)%>"><%=pcdata(striptags(node.title))%></a><%
+<li><a<% if node._menu_selected then %> class="preactive"<%end%> href="<%=pcdata(href)%>"><%=striptags(node.title)%></a><%
 submenu("/" .. category .. "/" .. k.name .. "/", node)
 %></li><% end
        end
@@ -133,7 +134,7 @@ end
 <ul id="modemenu"><%
 for k,node in pairs(tree.nodes) do
        if node.title and not node.hidden then %>
-<li><a<% if request[1] == k then %> class="active"<%end%> href="<%=controller%>/<%=k%>/"><%=pcdata(striptags(node.title))%></a></li><%
+<li><a<% if request[1] == k then %> class="active"<%end%> href="<%=controller%>/<%=k%>/"><%=striptags(node.title)%></a></li><%
        end
 end
 %>
@@ -161,3 +162,9 @@ else -%>
 <div class="clear"></div>
 </div>
 <div id="maincontent">
+       <noscript>
+               <div class="errorbox">
+                       <strong><%:Java Script required!%></strong><br />
+                       <%:You must enable Java Script in your browser or LuCI will not work properly.%>
+               </div>
+       </noscript>