summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/footer.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-02-07 19:10:34 +0100
committerJo-Philipp Wich <jo@mein.io>2019-07-07 15:25:49 +0200
commitfda4ba598c0ba1c06f5de43554b40cf0d415d047 (patch)
treed8158138283846efcd93726eec778790ebcd78ce /modules/luci-base/luasrc/view/footer.htm
parent1dd910148eaf7b9ed7130d1a067465dd43940da3 (diff)
luci-base: replace uci change pages with client side modal dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/view/footer.htm')
-rw-r--r--modules/luci-base/luasrc/view/footer.htm13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/luci-base/luasrc/view/footer.htm b/modules/luci-base/luasrc/view/footer.htm
index 1667d3aa9a..ba14ec8678 100644
--- a/modules/luci-base/luasrc/view/footer.htm
+++ b/modules/luci-base/luasrc/view/footer.htm
@@ -1,6 +1,6 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
+ Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
Licensed to the public under the Apache License 2.0.
-%>
@@ -8,18 +8,15 @@
local is_rollback_pending, rollback_time_remaining, rollback_session, rollback_token = luci.model.uci:rollback_pending()
if is_rollback_pending or trigger_apply or trigger_revert then
- include("cbi/apply_widget")
- cbi_apply_widget(redirect, rollback_token)
%>
- <div class="alert-message" id="cbi_apply_status" style="display:none"></div>
<script type="text/javascript">
- document.addEventListener("DOMContentLoaded", function() {
+ document.addEventListener("luci-loaded", function() {
<% if trigger_apply then -%>
- uci_apply(true);
+ L.ui.changes.apply(true);
<%- elseif trigger_revert then -%>
- uci_revert();
+ L.ui.changes.revert();
<%- else -%>
- uci_confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000);
+ L.ui.changes.confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000, <%=luci.http.write_json(rollback_token)%>);
<%- end %>
});
</script>