summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/ui.js
AgeCommit message (Collapse)Author
2020-05-07luci-base: replace filebrowser icons with SVG variantsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-04luci-base: ui.js: fix UITextfield.setValue()Jo-Philipp Wich
Fixes: d02c26772 ("luci-base: ui.js: rework password input handling") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-02luci-base: ui.js: reset scroll position when opening modal overlayJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-02luci-base: ui.js: fix input value reading for select widgetsJo-Philipp Wich
Fixes: #3989 Fixes: 81effc111 ("luci-base: ui.js: assume select widget by default for ListValue widget") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-02luci-base: ui.js: rework password input handlingJo-Philipp Wich
- Get rid of dummy element - Render password field as text input initially and later transform it to a password field - Use .control-group markup to allow better styling Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-28luci-base: ui.js: assume select widget by default for ListValue widgetJo-Philipp Wich
Fixes: #3973 Fixes: 2fb55e1ab ("luci-base: ui.js: fixes for radio widget type of select element") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-28luci-base: ui.js: fixes for radio widget type of select elementJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-20luci-base: ui.js: fix textarea widthJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-18luci-base: ui.js: hide unsatisfied firstchild menu nodesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17luci-base: ui.js: order indicators by ID valueJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16luci-base: ui.js: add LuCI.ui.menu.flushCache() functionJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16luci-base: ui.js: apply disabled attribute to toplevel dynlist nodeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16luci-base: ui.js: add LuCI.ui.menu helper classJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16luci-base: ui.js: use session data api to persist tab selection stateJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14luci-base: ui.js: use standard indicator framework to display uci changesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-14luci-base: ui.js: add disabled property to widgetsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03luci-base: ui.js: add instantiateView() helperJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-02luci-base: harmonize JS class naming and requestingJo-Philipp Wich
- Make builtin classes available via `require` to allow view code to request external and internal classes in a consistent manner without having to know which classes are builtin and which not - Make base classes request any used class explicitely instead of relying on implicitly set up L.{dom,view,Poll,Request,Class} aliases - Consistently convert class names to lower case in JSdoc to match the names used in `require` statements - Deprecate L.{dom,view,Poll,Request,Class} aliases Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-01luci-base: ui.js: properly handle null choices in dropdown constructorJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-31luci-base: ui.js: add generic indicator handling functionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-31luci-base: ui.js: add documentationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-25luci-base: ui.js: improve mobile dropdown scroll behaviourJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-24luci-base: form.js / ui.js: tie form labels to widgetsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 22ba6fc40933bee02c3ea93bbda952bb44bf3af1)
2020-03-23luci-base: ui.js: various tweaksJo-Philipp Wich
- 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>
2020-02-12luci-base: ui.js: dispatch "cbi-tab-active" event when a tab is selectedJo-Philipp Wich
This is useful to lazy-load tab contents. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-20luci-base: ui.js: UIFileUpload fixesJo-Philipp Wich
- 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>
2020-01-19luci-base: ui.js: support clearChoices()/addChoices() for DynListsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-19luci-base: ui.js: use placeholder as select placeholder in DynListsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-19luci-base: ui.js: properly handle rich choices in Dropdowns, DynListsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16luci-base: remove hardcoded cgi-bin pathAnsuel Smith
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>
2019-12-30luci-base: ui.js: implement UIDropdown.{add,clear}Choices()Jo-Philipp Wich
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>
2019-12-30luci-base: ui.js: expose UIElement class as AbstractElementJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16luci-base: ui.js: allow custom validation in Dropdown and DynamicListJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-04luci-base: ui.js: ensure that select choice labels are properly escapedJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-04luci-base: ui.js: properly escape dynlist items for renderingJo-Philipp Wich
Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-15luci-base: Improve change application messageKevin Darbyshire-Bryant
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>
2019-11-10luci-base: ui.js: show filename after selecting upload fileJo-Philipp Wich
Fixes: #3286 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-10luci-base: ui.js: add ComboButton widgetJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base, luci-mod-system: move file upload handling to ui.jsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-22luci-base: ui.js: prevent race condition in tab initializationJo-Philipp Wich
Fixes: #3150 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: ui.js: add pingDevice() and awaitReconnect() functionsJo-Philipp Wich
Import these functions from the flash.js for use with other views that might trigger a device reboot. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: ui.js: use common fs.js class for filebrowser operationsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-19luci-base: ui.js: mark user-changed widgetsJo-Philipp Wich
Set a `data-changed=true` attribute on the widget element when the user did any change to the default value. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-18luci-base: ensure that button labels are properly html escapedJo-Philipp Wich
Fixes: #3067 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: ui.js: implement addNotification() helperJo-Philipp Wich
The L.ui.addNotification() function pushes a dismissable banner message to the top of the view. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: use cgi-io and rpcd-mod-file to handle file upload and browsingJo-Philipp Wich
Remove the old server side support for file browsing and file uploading and switch to a client side widget instead which uses XMLHTTPRequests to upload files via cgi-io and RPC calls for file listing and status queries. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: ui.js: update tabs after initial renderJo-Philipp Wich
This ensures that the error badges are properly set. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: ui.js: also handle failed promises in createHandlerFn()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: ui.js: ignore description when checking for empty tab panesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-19luci-base: ui.js: implement Textarea widgetJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>