Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a button to each row in the wireless assoclist table to allow
disconnecting clients using the ubus del_client method if the underlying
radio interface supports it.
Ref: https://github.com/openwrt/luci/pull/2271
Submitted-by: Wang805447391 <805447391@qq.com>
[move deauth function to luci-base next to the existing assoclist function,
require post security, fix parameter check condition, hide button if not
supported by the radio, disable button after call, squash commits, fix
whitespace, reword subject, add commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a dummy validator for the server side so that we can start using unique
in client side JS code.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
update luci-app-olsr to the new jsoninfo library
|
|
luci-base: allow optional default value for file browser
|
|
Move the old luci.model.ipkg utility class into a separate package and
let the components using it depend on the new library package.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Drop embedded CSS in favor to new global rules
- Drop extraneous include of cbi.js
- Use showModal() facilities
- Fix a cosmetic bug in countdown timeout handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add two new functions showModal() and hideModal() which will fade in and
close an open modal respectively.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The new process.exec() function simplifies spawning external processes
and capturing their stdio.
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>
|
|
Directly attach validation handlers to cbi dropdowns as well, this allows
validating dropdown choices made by the user, similar to how plain select
boxes are handled by the cbi JavaScript.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
In order to make cbi dropdowns usable for validation and other code
expecting native form elements, set the .value DOM property on the
dropdown parent element whenever the selection is changed.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Rework the tooltip event delegation logic to prevent hiding the tooltop
when the cursor is moved to a children of the tooltip container element.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
In order to prepare support for calling cbi validation on non-native form
widgets, remove direct usages of the node.form property and lookup the
containing form using findParent() instead.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Due to a misspelled property name, only the first value was passed in
the event details.
Fixes: c2b570998 ("luci-base: cbi.js: rework dropdown implementation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Commit 7c7821833 ("luci-base, themes: rework dynlist and dropdown widgets")
changed the way we initialize dynamic lists on client side, avoiding the
need for pre-rendering the items on the server side.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes #2070.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
With this change we could set optional value for the file browser.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Signed-off-by: Zheng Qian <sotux82@gmail.com>
|
|
Updated Japanese translations.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Fixed several issues for translation.
- add translation markup to "Expecting "
- add missing ")" into "valid time (HH:MM:SS"
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
get_status_by_address
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
|
|
Thanks to a recent commit, the translation files will now
have info about locations where the string is used. That
can help is deciding the correct translation, as all contexts
are more easily found.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
If a given attribute value is a function, register it as event listener,
if it is an object, filter it through JSON.stringify(), else set it
as-is.
This helps to reduce some boiler-plate code when building DOM structures.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Refactor event handler closures into class methods and bind them instead
- Fix quirk in dropdown placement calculation
- Different dropdown placement strategy on touch devices
- Broadcast custom "cbi-dropdown-change" event when value is changed
- Implement setValues() method to alter dropdown selection
- Prevent creating empty custom values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Use node.closest() in findParent() when available since it should be faster
than manaually traversing the ancestor chain.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Just use node.addEventListener() directly since all reasonably recent
browsers support it nowadays.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Refactor and fix datatype validation functions
- Turn the type compilation and validation into a proper class
- Display tooltip with error hint on invalid inputs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The implementation allowed a hexadecimal string without any colons.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add the required JS and CSS infrastructure to support rich hover/focus
tooltips for element.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Implement the string hash algorithm used by LuCI's translation system in
JavaScript and provide a `_()` translation wrapper function to lookup
messages in the global string table.
Once client side translation loading is activated in a later commit,
JavaScript code can use the same string translation mechanism as server
side Lua code, e.g. `_("Static Routes")` would yield "Statische Routen"
when the German translation is loaded.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new /admin/translations/ endpoint which exposes the loaded system
translations as JavaScript file.
Once referenced by <script>, the endpoint will create a `window.TR` object
containing the entire translation string table for use on the client side.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Drop load(), loadc(), string() and stringf() from the luci.i18n class since
these functions are either no longer unused or were never used to begin with.
Also slightly rework the module to only use local symbols and unify the
module require style.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The i18n.loadc() function has been a no-op since almost six years so it
makes no sense to invoke it anymore.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new luci.i18n.dump() function which returns all currently loaded
translation strings as Lua table.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Rework the setlanguage() implementation to actually switch catalogues
if another language has been loaded previously and change it to return
the effectively loaded language tag.
Also improve input parameter validation and accept tags in both lower
or upper case.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new luci.template.parser.get_translations() function which will
iterate all loaded translation entries and pass the to the given callback
function.
This is useful to expose the loaded translations in other formats, e.g. for
wrapping them into JSON feeds.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Add missing variable declarations in JavaScript code
|
|
Update timezone data to 2018g
http://mm.icann.org/pipermail/tz-announce/2018-October/000052.html
* Morocco switches to permanent +01 on 2018-10-27.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
This fixes errors reported by LGTM.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
luci-base: update and improve Russian translation
|