luci-base: replace uci change pages with client side modal dialog
[project/luci.git] / themes / luci-theme-material / luasrc / view / themes / material / header.htm
index 9521314e1f066551c67a8fd052241565e635a86e..7ce195cc9f8cfa13c6e6ee132c56d38713ab478d 100644 (file)
                        write('</ul>')
                end
        end
-
-       local function render_changes()
-               -- calculate the number of unsaved changes
-               if tree.nodes[category] and tree.nodes[category].ucidata then
-                       local ucichanges = 0
-                       local i, j
-                       for i, j in pairs(require("luci.model.uci").cursor():changes()) do
-                               ucichanges = ucichanges + #j
-                       end
-
-                       if ucichanges > 0 then
-                               write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
-                                       url(category, 'uci/changes'),
-                                       http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
-                                       translate('Unsaved Changes'),
-                                       ucichanges
-                               })
-                       end
-               end
-       end
 -%>
 <!DOCTYPE html>
 <html lang="<%=luci.i18n.context.lang%>">
                        <a id="logo" href="<%=url("admin/status/overview")%>"><img src="<%=media%>/brand.png" alt="OpenWrt"></a>
                        <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
                        <div class="status">
-                               <% render_changes() %>
                                <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>
                                        <span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>