Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The createHandlerFn() helper function is useful to construct onclick
or similar event handling functions. It will add a "spinning" CSS
class on the event target element and disable the element, wrap the
given function with Promise.resolv() and re-enable the target element
once the promise is settled.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Rework internal state management
- Implement new utility functions such as getL3Device() or getModemType()
- Fix bugs in various functions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When checking for an existing zone with the same name internally,
addZone() must use the nonblocking lookupZone() instead of the
promise returning public getZone() call.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The new function allows querying the presence of certain system features
such as dnsmasq or firewall availability or the compile time features
of hostapd and wpa_supplicant.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The given callback function will be executed after the map is parsed,
but before the uci is saved. This is useful to add further uci changes
before the map is re-rendered.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When .tabbed is set to true on a map, all enclosed sections will be
put into separate tabs.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Delay initialization of tab groups
- Tag section nodes with IDs to store per-section tab state
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Properly preserve the selection state of nested tabs.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Some title properties were expected to be functions, some strings.
Refactor the code to support both string or function values for all
title properties.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When the parent section of an option object specifes an alternative
uci configuration name, enclosed option elements should honour it.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Also introduce an `onclick` property to allow registering custom button
action handler.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce properties `addbtntitle`, `removebtntitle` and `modaltitle` to
allow overriding the captions of section add buttons, remove buttons and
modal dialog titles respectively.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Port the existing server side protocol support framework to the client
side network.js.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Expose the prefixToMask() and maskToPrefix() helper functions for use by
other modules, e.g. the datatype validator.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Extend the ifnameOf() helper function to cover all object types used by
network.js and expose it as public getIfnameOf() api function for use by
other modules.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://forum.openwrt.org/t/cannot-save-certain-fields/42738/2
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new `addModalOptions()` hook which allows to supply additional
cbi options the modal map before the dialog is rendered.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: 3880c3f22 ("luci-base: ui.js: save filled out but not added dynlist items on submit")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #2938
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Restore the old CBI behaviour of not automatically rendering empty
selection choices in ListValue select dropdowns when .rmempty is
specified.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #2912
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Set src/dest defaults only in initial section create state, otherwise it
is impossible to specify output rules
- Get rid of dest_remote/dest_local widget switching and implement change
logic directly in tools.widgets.CBIZoneSelect
- Remove leftover debug code
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The "luci.form" and "luci.tools.widgets" classes use the "multiple"
keyword while ui.js uses "multi" internally, leading to single-value
dropdowns widget values getting stored as uci lists.
Fix the issue by using "multiple" everywhere.
Fixes: #2871
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Removed unnecessary symbols ("%>") at the end of the text.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Fixes: #2854
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #2852
Fixes: ce04d7f ("luci-base: fix label-to-input association in js cbi maps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #2852
Fixes: ce04d7f04 ("luci-base: fix label-to-input association in js cbi maps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|