diff options
-rw-r--r-- | i18n/english/luasrc/i18n/cbi.en.lua | 1 | ||||
-rw-r--r-- | i18n/english/luasrc/i18n/default.en.lua | 1 | ||||
-rw-r--r-- | i18n/german/luasrc/i18n/cbi.de.lua | 3 | ||||
-rw-r--r-- | i18n/german/luasrc/i18n/default.de.lua | 1 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/footer.htm | 2 | ||||
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/uci.lua | 16 | ||||
-rw-r--r-- | modules/admin-full/luasrc/view/admin_uci/changes.htm | 3 | ||||
-rw-r--r-- | modules/admin-mini/luasrc/controller/mini/uci.lua | 6 | ||||
-rw-r--r-- | themes/fledermaus/luasrc/view/themes/fledermaus/header.htm | 10 | ||||
-rw-r--r-- | themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm | 5 |
10 files changed, 25 insertions, 23 deletions
diff --git a/i18n/english/luasrc/i18n/cbi.en.lua b/i18n/english/luasrc/i18n/cbi.en.lua index 4cebd24883..14153989fb 100644 --- a/i18n/english/luasrc/i18n/cbi.en.lua +++ b/i18n/english/luasrc/i18n/cbi.en.lua @@ -4,4 +4,3 @@ cbi_invalid = "Error: Invalid input value" cbi_addopt = "-- Additional Field --" cbi_optional = " (optional)" cbi_sectempty = "This section contains no values yet" -cbi_saveapply = "Save & Apply" diff --git a/i18n/english/luasrc/i18n/default.en.lua b/i18n/english/luasrc/i18n/default.en.lua index f48bbda460..a64d757ee1 100644 --- a/i18n/english/luasrc/i18n/default.en.lua +++ b/i18n/english/luasrc/i18n/default.en.lua @@ -77,6 +77,7 @@ reset = "Reset" revert = "Revert" save = "Save" +saveapply = "Save & Apply" service = "Service" services = "Services" settings = "Settings" diff --git a/i18n/german/luasrc/i18n/cbi.de.lua b/i18n/german/luasrc/i18n/cbi.de.lua index f0eb7b6ae0..1ca36305f4 100644 --- a/i18n/german/luasrc/i18n/cbi.de.lua +++ b/i18n/german/luasrc/i18n/cbi.de.lua @@ -2,5 +2,4 @@ cbi_add = "Eintrag hinzufügen" cbi_del = "Eintrag entfernen" cbi_invalid = "Error: Ungültige Eingabe" cbi_addopt = "-- Zusätzliches Feld --" -cbi_sectempty = "Diese Sektion enthält noch keine Einträge" -cbi_saveapply = "Speichern & Anwenden"
\ No newline at end of file +cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
\ No newline at end of file diff --git a/i18n/german/luasrc/i18n/default.de.lua b/i18n/german/luasrc/i18n/default.de.lua index 2c24df24a6..16ab66c6a5 100644 --- a/i18n/german/luasrc/i18n/default.de.lua +++ b/i18n/german/luasrc/i18n/default.de.lua @@ -78,6 +78,7 @@ reset = "Zurücksetzen" revert = "Verwerfen" save = "Speichern" +saveapply = "Speichern & Anwenden" service = "Dienst" services = "Dienste" settings = "Einstellungen" diff --git a/libs/cbi/luasrc/view/cbi/footer.htm b/libs/cbi/luasrc/view/cbi/footer.htm index 9ff8de7fd1..732389c00a 100644 --- a/libs/cbi/luasrc/view/cbi/footer.htm +++ b/libs/cbi/luasrc/view/cbi/footer.htm @@ -14,7 +14,7 @@ $Id$ -%> <div> - <input type="submit" name="cbi.apply" value="<%:cbi_saveapply%>" /> + <input type="submit" name="cbi.apply" value="<%:saveapply%>" /> <input type="submit" value="<%:save%>" /> <input type="reset" value="<%:reset%>" /> <script type="text/javascript">cbi_d_init();</script> diff --git a/modules/admin-full/luasrc/controller/admin/uci.lua b/modules/admin-full/luasrc/controller/admin/uci.lua index 215a13a34b..d2acdeca13 100644 --- a/modules/admin-full/luasrc/controller/admin/uci.lua +++ b/modules/admin-full/luasrc/controller/admin/uci.lua @@ -17,9 +17,10 @@ function index() local i18n = luci.i18n.translate entry({"admin", "uci"}, nil, i18n("config")) - entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes")) - entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert")) - entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply")) + entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"), 40) + entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"), 30) + entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"), 20) + entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10) end function convert_changes(changes) @@ -52,6 +53,7 @@ function action_changes() end function action_apply() + local path = luci.dispatcher.context.path local changes = luci.model.uci.changes() local output = "" @@ -62,9 +64,11 @@ function action_apply() -- Collect files to be applied and commit changes for r, tbl in pairs(changes) do if r then - luci.model.uci.load(r) - luci.model.uci.commit(r) - luci.model.uci.unload(r) + if path[#path] ~= "apply" then + luci.model.uci.load(r) + luci.model.uci.commit(r) + luci.model.uci.unload(r) + end if luci.config.uci_oncommit and luci.config.uci_oncommit[r] then run[luci.config.uci_oncommit[r]] = true end diff --git a/modules/admin-full/luasrc/view/admin_uci/changes.htm b/modules/admin-full/luasrc/view/admin_uci/changes.htm index 09d8d3e7ee..ab66b78efd 100644 --- a/modules/admin-full/luasrc/view/admin_uci/changes.htm +++ b/modules/admin-full/luasrc/view/admin_uci/changes.htm @@ -20,6 +20,9 @@ $Id$ <form class="inline" method="get" action="<%=controller%>/admin/uci/apply"> <input type="submit" value="<%:apply%>" /> </form> +<form class="inline" method="get" action="<%=controller%>/admin/uci/saveapply"> + <input type="submit" value="<%:saveapply%>" /> +</form> <form class="inline" method="get" action="<%=controller%>/admin/uci/revert"> <input type="submit" value="<%:revert%>" /> </form> diff --git a/modules/admin-mini/luasrc/controller/mini/uci.lua b/modules/admin-mini/luasrc/controller/mini/uci.lua index eabc895401..b56a70287e 100644 --- a/modules/admin-mini/luasrc/controller/mini/uci.lua +++ b/modules/admin-mini/luasrc/controller/mini/uci.lua @@ -18,9 +18,9 @@ function index() local i18n = luci.i18n.translate entry({"mini", "uci"}, nil, i18n("config")) - entry({"mini", "uci", "changes"}, call("action_changes"), i18n("changes")) - entry({"mini", "uci", "revert"}, call("action_revert"), i18n("revert")) - entry({"mini", "uci", "apply"}, call("action_apply"), i18n("apply")) + entry({"mini", "uci", "changes"}, call("action_changes"), i18n("changes"), 30) + entry({"mini", "uci", "revert"}, call("action_revert"), i18n("revert"), 20) + entry({"mini", "uci", "apply"}, call("action_apply"), i18n("saveapply"), 10) end function convert_changes(changes) diff --git a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm index 5abe5d4eed..30aa57d86f 100644 --- a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm +++ b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm @@ -146,15 +146,13 @@ end end %> <div><%:config%> - <ul> <% if ucic > 0 then %> - <li><a href="<%=controller%>/admin/uci/changes"><%:changes%>: <%=ucic%></a></li> - <li><a href="<%=controller%>/admin/uci/apply"><%:apply%></a></li> - <li><a href="<%=controller%>/admin/uci/revert"><%:revert%></a></li> + <% submenu(category .. "/uci/", tree.nodes[category].nodes["uci"]) -%> <% else %> - <li><%:changes%>: 0</li> + <ul> + <li><%:changes%>: 0</li> + </ul> <% end %> - </ul> </div> <% end %> </div> diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm index 500a73badd..23b28a14c4 100644 --- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm @@ -174,10 +174,7 @@ end <div> <% if ucic > 0 then %> <a class="warning" href="<%=controller%>/<%=category%>/uci/changes"><%:unsavedchanges%>: <%=ucic%></a> - <ul> - <li><a href="<%=controller%>/<%=category%>/uci/apply"><%:apply%></a></li> - <li><a href="<%=controller%>/<%=category%>/uci/revert"><%:revert%></a></li> - </ul> + <% submenu(category .. "/uci/", tree.nodes[category].nodes["uci"]) -%> <% else %> <a href="#"><%:changes%>: 0</a> <% end %> |