Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Change the cbi.js code to create a div based button element instead of an
image button.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- The wifi_big.png / wifi_big_disabled.png icons were used on the wireless
overview page which now uses badges with normal sized icons
- The encryption.png / encryption_disabled.png icons were never used at all
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Some status requests can take quite some time to finish, the LuCI DSL
status information in particular.
Since the polling loop code already takes care of not relaunching
requests which are already running, increase the per iteration timeout
to up to five times the poll interval.
This should be sufficient to let most operations complete.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
JSON.parse() is supported on all modern browsers and a far better
solution than the hakish and potentially dangerous eval().
Also calculate the duration of request and pass it as 3rd argument to the
callback function, this makes it easier to calculate request delays or
poll intervals in code using XHR.
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>
|
|
- make findParent() globally available
- add code for initializing rich cbi tooltips
- introduce cbi_update_table() helper to auto-assign responsive attributes
to table markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Defer the start of the queue poll loop until the document has been loaded.
This allows all XHR.poll() invocations on the page to register their
handlers before the first batch of requests is made.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This commit introduces the required code for a new, markup based dropdown
widget which can be used as a styleable alternative to select boxes or
radio/checkbox button groups.
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>
|
|
Add a new helper function `E()` to cbi.js which can be used to conveniently
build HTML markup.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Internet Explorer 11 requires the timeout to be applied after the open()
call, otherwise an invlaid state exception will be raised
Fixes aa6c97154 ("luci-base: extend xhr.js")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add timeout options to get() and post() and introduce XHR.stop() to support
stopping a poll operation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Some applications, e.g. dnsmasq, do not allow hostnames starting with an
underscore, therefor extend the existing hostname datatype validator with
a `strict` which disallows a leading underscore.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes #1413.
Reported-by: Wojciech Jowsa <wojciech.jowsa@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Rewrite ipmask to use these subtypes
- Add ip{4,6}prefix validators to cbi.js
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
luci-base: Remove request headers that are set automatically by browser
|
|
- Properly handle logic for evaluating inverted dependencies means
when depending on another field *not* having a given value
- Perform datatype validation *after* populating combobox choices to
avoid triggering a false-positive when validating an .rmempty = false
combobox during form instantiation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
|
|
cbi_init() needs to be called at the end of the page to initialize
cbi_strings with "[data-strings]" while cbi_browser_init() happened
before that.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
These validators accept IP address specifications in the form
- address
- address/bits
- address/netmask
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The `cbi_validate_field` should be after data initialized.
Signed-off-by: Jian Chang <aa65535@live.com>
|
|
Fix the JavaScript String.format() to not trigger an exception if the argument
for an escaped format like %h or %q is undefined.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
* Fix left and right justify/padding in formats
* Do not emit decimal numbers for small values in %m format
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Eliminate more inline scripts in favor to global initialization, use a global
object for sharing fixed strings instead of passing them to each invocation.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
When fields got removed and readded due to unsatisfied dependencies, they
got inserted in reverse order into the dom.
Fix this issue by properly passing the element index.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Do not rely on explicit child counts but inspect the code instead to decide
when to hide tabs or not.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Some applications only support ipv4 so add ipv4only option
to host and hostport datatypes so that for thos applications
that when an IP address is specified only and ipv4 ip address
gets accepted.
|
|
The previous versiono of ipaddrport validator only worked for ipv4
due to disallowing colons (:) in ip address which obvious fails for
ipv6. We now instead allow either ipv4 address or an ipv6 address of
the form [<ipv6address>]:port
|
|
Adding LuCI configuation of the firewall time and data uci options
is in progress and this adds the necessary datatypes for validating
those fields.
|
|
Add two new types 'hostport' and 'ipaddrport' to validate strings in the form
'sub.example.org:1234' and '0.0.0.0:80'. The 'hostport' accepts hostnames or
IP addresses followed by a colon and a port number while the 'ipaddrport' type
accepts numeric IP addresses only, followed by a colon and a port.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
Two new arguments url, defpath were added to cbi_dynlist_init() for
initializing the brower button.
An example of usage
identity = section:taboption("general", DynamicList, "identity",
translate("List of SSH key files for auth"))
identity.datatype = "file"
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
Signed-off by: Rosen Penev <rosenp@gmail.com>
|