luci/modules/luci-base/htdocs/luci-static/resources
Jo-Philipp Wich bd5e2edb46 luci-base: uci.js: fix option deletion quirks
Since option deletions are sent first, followed by ubus set commands,
a call sequence like:

    uci.set('config', 'section', 'option', ['foo', 'bar'])
    uci.set('config', 'section', 'option', ['foo'])
    uci.unset('config', 'section', 'option')

... would result in the option retainining `foo` as value, instead of it
getting removed as one would expect.

Fix this issue by reverting the internal change state of the option before
storing the deletion.

While we're at it, also rework the internal tracking of deleted options to
not result in duplicate removal requests when the same option is unset
several times.

Finally change all `undefined` returns to `null` in order to comply with
the function documentation.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-08-04 18:55:21 +02:00
..
cbi luci-base: move old cbi icons to luci-compat 2020-05-07 19:40:29 +02:00
icons luci-base: optimize some PNG files 2020-05-07 20:05:52 +02:00
protocol luci-base: fix typos 2019-12-17 11:41:00 +01:00
tools luci-base: fix widgets CBIUserSelect appending list on load 2020-07-24 11:03:40 +02:00
cbi.js luci-base: cbi.js: avoid double-initialization of dropdowns 2020-02-14 08:43:28 +01:00
firewall.js luci-base: firewall.js: remove further zone network/name fallback logic 2020-05-24 17:33:26 +02:00
form.js luci-base: form.js: add CSS class to invalid option dismiss button 2020-07-28 20:57:04 +02:00
fs.js luci-base: harmonize JS class naming and requesting 2020-04-02 21:51:20 +02:00
luci.js luci-base: luci.js: properly skip comments when finding require tokens 2020-05-29 09:57:29 +02:00
network.js luci-base: network.js: don't fail loading network config on missing wireless 2020-04-15 09:29:29 +02:00
promis.min.js luci-base: add ES6 Promise polyfill for IE < Edge 2019-07-07 15:25:49 +02:00
rpc.js luci-base: rpc.js: add ability to reject nonzero ubus statuses 2020-04-10 22:50:41 +02:00
uci.js luci-base: uci.js: fix option deletion quirks 2020-08-04 18:55:21 +02:00
ui.js luci-base: ui.js: order menu entries with the same weight by name 2020-07-05 00:11:59 +02:00
validation.js Merge pull request #4053 from TDT-AG/pr/20200515-luci-base 2020-05-19 14:06:07 +02:00
xhr.js luci-base: luci.js: add HTTP request functions 2019-07-07 15:25:49 +02:00