themes: add common class to uci change indicator
[project/luci.git] / themes / luci-theme-openwrt / luasrc / view / themes / openwrt.org / header.htm
index 505e64b..a560014 100644 (file)
                                end
                        end
 
-                       write('<div id="savemenu">')
-
                        if ucic > 0 then
-                               write('<a class="warning" href="%s?redir=%s">%s: %d</a>' %{
+                               write('<div id="savemenu" class="uci_change_indicator"><a class="warning" href="%s?redir=%s">%s: %d</a></div>' %{
                                        url(category, 'uci/changes'),
-                                       http.urlencode(http.formvalue('redir') or REQUEST_URI),
+                                       http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
                                        translate('Unsaved Changes'),
                                        ucic
                                })
-                       else
-                               write('<a href="#">%s: 0</a>' %{
-                                       translate('Unsaved Changes')
-                               })
                        end
-
-                       write('</div>')
                end
        end
 -%>
        <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.%>
+                               <strong><%:JavaScript required!%></strong><br />
+                               <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
                        </div>
                </noscript>