Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- use .btn CSS class for Save & Apply button
- use .control-group CSS class for page action buttons
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- emit checkbox markup suitable for CSS styling
- use .btn CSS class where appropriate
- dispatch events when updating uci change indicator
- use correct target node when handling events in createHandlerFn()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-base: extended network.js for check if new interface is createable
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new Protocol.deleteConfiguration() callback function which can be
overridden by protocol handler to perform additional cleanup tasks, such
as unsetting related uci entries which are not part of the interface
configuration itself.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Helge Mader <ma@dev.tdt.de>
|
|
Drop obsolete extra logic which treats the zone name as covered network
name in case the network list is unset. This behaviour applied to the
pre-fw3 uci firewall, but is not supported since fw3 anymore.
Ref: https://forum.openwrt.org/t/luci-zone-creation-bug/55921
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>
|
|
- Ensure that last header cell is rendered for grid sections without
sorting or addremove actions
- Don't skip header cells for optional options
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This is useful to lazy-load tab contents.
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>
|
|
- Implement `N_(count, "String singular", "String plural" [, "Context"])`
plural translation function.
- Extend `_()` to optionally accept a second disambiguation context
argument.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Introduce a new option `initial_directory` which describes the initial
directory to display when nothing is selected, default to the root
directory
- Prevent stray legacy cbi reloads when deselecting files
- Fix within-root-directory-check for initial rendering
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
By tagging option dependencies with `!contains`, dependencies are
considered satisfied when the value is contained in the value of
a related field, instead of being equal to it.
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>
|
|
To mirror the behavior of the Lua runtime, we need to collapse whitepace
in translation source strings before doing the string table lookup.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-base: remove hardcoded cgi-bin path
|
|
Currently the ubus path that provide the webserver is hardcoded to be /ubus.
Change this to make it configurable from the luci config file.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Currently LuCI can be loaded only when placed in the root of the server as the cgi-bin path are hardcoded. Change the index.html to load the cgi-bin path from the current level.
Also add a new entry in the env Object to make the cgi_base path easily accessible.
This variable will be based on the position of /cgi-bin/luci.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
When form options are activated because their dependencies are satisified,
ensure that an immediate validation is triggered to highlight potential
errors without having the user to activate another form control first.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new method `getUIElement()` which simplifies obtaining the
underlying per-section UI widget class instance for a from option object.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The new `addChoices()` and `clearChoices()` functions allow clearing and
adding new options to existing dropdown instances respectively.
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: Balázs Úr <balazs@urbalazs.hu>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Use stacks keyed by class id + symbol internally to not clobber the
prototype scope pointer when repeatedly calling super() in invoked
methods.
Ref: https://github.com/openwrt/luci/issues/3316#issuecomment-558531111
Fixes: 374c23cda ("luci-base: luci.js: properly handle nested Class.super() calls")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a unique __id__ attribute per class and use that, together with
the symbol name being looked up to, to form a unique key which is used to
store the prototype scope pointer.
This fixes cases where a call to super() invokes a procedure which is
calling super() as well on a different class or symbol.
Fixes: #3316
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Previous refactoring renamed the "data-type" attribute of widget markup
containers to "data-widget", breaking the "unique" validator as it relies
on it to lookup options.
Fixes: #3341
Fixes: 13e9e3e9e ("treewide: fix "Unhandled token" errors with Lua CBI maps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The `data-type` attribute is used to bind datatype validators to a widget
while some templates used the same attribute to denote the name of the
underlying widget.
Change the `data-type` attributes referring to the widget name to
`data-widget` in order to stop the JS token error spam.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
As a native English speaker the luci message displayed when clicking
'Save & Apply' has a somewhat uncomfortable English phrasing of "Waiting
for configuration to get applied". It could be improved by replacing
'get' with 'be' but once you've got that far you might as well replace
this with the shorter & simpler "Applying configuration changes". This
is also technically more correct since luci/openwrt should only be
updating/restarting processes that are related to the changed areas, not
changing the entire configuration.
As a result of that, change both the 'success' and 'rolled back'
messages to "Configuration changes have been applied" & "Configuration
changes have been rolled back"
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
|
- Don't filter virtual interfaces
- Skip duplicate wireless devices
Fixes: #3304
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #3286
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Turn the "Save & Apply" button into a combo button which allows to
toggle between apply with rollback and unchecked apply modes.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|