From: Jo-Philipp Wich Date: Thu, 16 Apr 2020 11:26:27 +0000 (+0200) Subject: docs: update js api docs X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=3f1d6870ff0b3a0e8e0fc1c63ae2fbee86775261;p=project%2Fluci.git docs: update js api docs Signed-off-by: Jo-Philipp Wich --- diff --git a/docs/jsapi/LuCI.baseclass.html b/docs/jsapi/LuCI.baseclass.html index 88d5230950..f5da82c7ec 100644 --- a/docs/jsapi/LuCI.baseclass.html +++ b/docs/jsapi/LuCI.baseclass.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ implements prototypal inheritance.

    @@ -3329,7 +3427,7 @@ implements prototypal inheritance.

    @@ -3479,7 +3577,7 @@ class constructor and can be instantiated with new. @@ -3666,7 +3764,7 @@ enable inheritance. @@ -3813,7 +3911,7 @@ a subclass of this class'. @@ -4005,7 +4103,7 @@ enable inheritance. @@ -4235,7 +4333,7 @@ superclass method returned null. @@ -4458,7 +4556,7 @@ and the values extracted from the args array beginning with
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.dom.html b/docs/jsapi/LuCI.dom.html index 529803ef67..4bca2bf450 100644 --- a/docs/jsapi/LuCI.dom.html +++ b/docs/jsapi/LuCI.dom.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3245,7 +3343,7 @@ external JavaScript, use L.require("dom").then(...).

    < @@ -3330,7 +3428,7 @@ external JavaScript, use L.require("dom").then(...).

    < @@ -3531,7 +3629,7 @@ if either the node argument was no valid DOM node or i @@ -3729,7 +3827,7 @@ call implicitely turning it into a string.

    @@ -3930,7 +4028,7 @@ a valid Class instance.

    @@ -4146,7 +4244,7 @@ instance didn't have the requested method. @@ -4350,7 +4448,7 @@ if either the node argument was no valid DOM node or i @@ -4610,7 +4708,7 @@ element names, such as spaces.

    @@ -4849,7 +4947,7 @@ be found. @@ -4994,7 +5092,7 @@ be found. @@ -5144,7 +5242,7 @@ class could be found on the node itself or any of its parents. @@ -5331,7 +5429,7 @@ result when testing it using the given ignoreFn. @@ -5517,7 +5615,7 @@ selector didn't match. @@ -5707,7 +5805,7 @@ selector didn't match any parent. @@ -5862,7 +5960,7 @@ the first div element node.

    @@ -6016,7 +6114,7 @@ ignored, else not.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.AbstractElement.html b/docs/jsapi/LuCI.form.AbstractElement.html index 768e83a433..b64c50f2d5 100644 --- a/docs/jsapi/LuCI.form.AbstractElement.html +++ b/docs/jsapi/LuCI.form.AbstractElement.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3246,7 +3344,7 @@ properties.

    @@ -3331,7 +3429,7 @@ properties.

    @@ -3447,7 +3545,7 @@ properties.

    @@ -3553,7 +3651,7 @@ respective elements. @@ -3659,7 +3757,7 @@ the form element's markup, including the markup of any child elements. @@ -3804,7 +3902,7 @@ the form element's markup, including the markup of any child elements. @@ -4005,7 +4103,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.AbstractSection.html b/docs/jsapi/LuCI.form.AbstractSection.html index e59244a1f6..57cafe9312 100644 --- a/docs/jsapi/LuCI.form.AbstractSection.html +++ b/docs/jsapi/LuCI.form.AbstractSection.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3246,7 +3344,7 @@ form options and for handling tabs to segment child options.

    @@ -3391,7 +3489,7 @@ this property will hold a reference to the parent option instance.

    @@ -3507,7 +3605,7 @@ this property will hold a reference to the parent option instance.

    @@ -3635,7 +3733,7 @@ The sections will be rendered in the same order as the returned array. @@ -3787,7 +3885,7 @@ custom implementations.

    @@ -3891,7 +3989,7 @@ elements load functions rejected with an error. @@ -4106,7 +4204,7 @@ descendent of AbstractValue.

    @@ -4214,7 +4312,7 @@ not meeting the validation constraints of their respective elements. @@ -4322,7 +4420,7 @@ the form element's markup, including the markup of any child elements. @@ -4467,7 +4565,7 @@ the form element's markup, including the markup of any child elements. @@ -4684,7 +4782,7 @@ contents. If omitted, no description will be rendered.

    @@ -4953,7 +5051,7 @@ descendent of AbstractValue.

    @@ -5154,7 +5252,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.AbstractValue.html b/docs/jsapi/LuCI.form.AbstractValue.html index 73a47e396b..008c57ba78 100644 --- a/docs/jsapi/LuCI.form.AbstractValue.html +++ b/docs/jsapi/LuCI.form.AbstractValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3246,7 +3344,7 @@ validation constraints that should be applied to entered values.

    @@ -3568,6 +3666,58 @@ or selected by the user.

    +
    Default Value:
    +
    • false
    + + + + + + + + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + +
    Default Value:
    • false
    @@ -3913,7 +4063,7 @@ table section elements.

    @@ -4029,7 +4179,7 @@ table section elements.

    @@ -4205,7 +4355,7 @@ within the given specific section.

    @@ -4381,7 +4531,7 @@ different way.

    @@ -4593,7 +4743,7 @@ argument, this parameter is ignored.

    @@ -4768,7 +4918,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -4944,7 +5094,7 @@ option implementation does not use LuCI.ui widgets. @@ -5092,7 +5242,7 @@ returns false. @@ -5238,7 +5388,7 @@ returns false. @@ -5419,7 +5569,7 @@ so it may return promises if overridden by user code. @@ -5568,7 +5718,7 @@ validation constraints. @@ -5693,7 +5843,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -5801,7 +5951,7 @@ the form element's markup, including the markup of any child elements. @@ -5946,7 +6096,7 @@ the form element's markup, including the markup of any child elements. @@ -6126,7 +6276,7 @@ state of checkbox elements.

    @@ -6319,7 +6469,7 @@ was neither a string nor a function. @@ -6495,7 +6645,7 @@ as error message to the user. @@ -6654,7 +6804,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.ButtonValue.html b/docs/jsapi/LuCI.form.ButtonValue.html index 247ea5d4e0..b8e5200c46 100644 --- a/docs/jsapi/LuCI.form.ButtonValue.html +++ b/docs/jsapi/LuCI.form.ButtonValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ renders the underlying UCI option or default value as readonly text.

    @@ -4010,6 +4108,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4346,7 +4496,7 @@ table section elements.

    @@ -4464,7 +4614,7 @@ table section elements.

    @@ -4642,7 +4792,7 @@ within the given specific section.

    @@ -4820,7 +4970,7 @@ different way.

    @@ -5034,7 +5184,7 @@ argument, this parameter is ignored.

    @@ -5211,7 +5361,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5389,7 +5539,7 @@ option implementation does not use LuCI.ui widgets. @@ -5539,7 +5689,7 @@ returns false. @@ -5687,7 +5837,7 @@ returns false. @@ -5870,7 +6020,7 @@ so it may return promises if overridden by user code. @@ -6021,7 +6171,7 @@ validation constraints. @@ -6146,7 +6296,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6293,7 +6443,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6473,7 +6623,7 @@ state of checkbox elements.

    @@ -6668,7 +6818,7 @@ was neither a string nor a function. @@ -6816,7 +6966,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6975,7 +7125,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.DummyValue.html b/docs/jsapi/LuCI.form.DummyValue.html index a0632ae7e5..4fb2525cae 100644 --- a/docs/jsapi/LuCI.form.DummyValue.html +++ b/docs/jsapi/LuCI.form.DummyValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ renders the underlying UCI option or default value as readonly text.

    @@ -3947,6 +4045,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4283,7 +4433,7 @@ table section elements.

    @@ -4401,7 +4551,7 @@ table section elements.

    @@ -4579,7 +4729,7 @@ within the given specific section.

    @@ -4757,7 +4907,7 @@ different way.

    @@ -4971,7 +5121,7 @@ argument, this parameter is ignored.

    @@ -5148,7 +5298,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5326,7 +5476,7 @@ option implementation does not use LuCI.ui widgets. @@ -5476,7 +5626,7 @@ returns false. @@ -5624,7 +5774,7 @@ returns false. @@ -5807,7 +5957,7 @@ so it may return promises if overridden by user code. @@ -5958,7 +6108,7 @@ validation constraints. @@ -6083,7 +6233,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6230,7 +6380,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6410,7 +6560,7 @@ state of checkbox elements.

    @@ -6605,7 +6755,7 @@ was neither a string nor a function. @@ -6753,7 +6903,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6912,7 +7062,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.DynamicList.html b/docs/jsapi/LuCI.form.DynamicList.html index 424f37b0e5..cf8a995c74 100644 --- a/docs/jsapi/LuCI.form.DynamicList.html +++ b/docs/jsapi/LuCI.form.DynamicList.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ predefined choices. It builds upon the @@ -3847,6 +3945,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4183,7 +4333,7 @@ table section elements.

    @@ -4301,7 +4451,7 @@ table section elements.

    @@ -4479,7 +4629,7 @@ within the given specific section.

    @@ -4657,7 +4807,7 @@ different way.

    @@ -4871,7 +5021,7 @@ argument, this parameter is ignored.

    @@ -5048,7 +5198,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5226,7 +5376,7 @@ option implementation does not use LuCI.ui widgets. @@ -5376,7 +5526,7 @@ returns false. @@ -5524,7 +5674,7 @@ returns false. @@ -5707,7 +5857,7 @@ so it may return promises if overridden by user code. @@ -5858,7 +6008,7 @@ validation constraints. @@ -5983,7 +6133,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6130,7 +6280,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6310,7 +6460,7 @@ state of checkbox elements.

    @@ -6505,7 +6655,7 @@ was neither a string nor a function. @@ -6653,7 +6803,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6812,7 +6962,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.FileUpload.html b/docs/jsapi/LuCI.form.FileUpload.html index cc10b43b34..add63f061d 100644 --- a/docs/jsapi/LuCI.form.FileUpload.html +++ b/docs/jsapi/LuCI.form.FileUpload.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ offers the ability to browse, upload and select remote files.

    @@ -4058,6 +4156,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4394,7 +4544,7 @@ table section elements.

    @@ -4512,7 +4662,7 @@ table section elements.

    @@ -4690,7 +4840,7 @@ within the given specific section.

    @@ -4868,7 +5018,7 @@ different way.

    @@ -5082,7 +5232,7 @@ argument, this parameter is ignored.

    @@ -5259,7 +5409,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5437,7 +5587,7 @@ option implementation does not use LuCI.ui widgets. @@ -5587,7 +5737,7 @@ returns false. @@ -5735,7 +5885,7 @@ returns false. @@ -5918,7 +6068,7 @@ so it may return promises if overridden by user code. @@ -6069,7 +6219,7 @@ validation constraints. @@ -6194,7 +6344,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6341,7 +6491,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6521,7 +6671,7 @@ state of checkbox elements.

    @@ -6716,7 +6866,7 @@ was neither a string nor a function. @@ -6864,7 +7014,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -7023,7 +7173,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.FlagValue.html b/docs/jsapi/LuCI.form.FlagValue.html index adb3f398fb..81161c587d 100644 --- a/docs/jsapi/LuCI.form.FlagValue.html +++ b/docs/jsapi/LuCI.form.FlagValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ implement a simple checkbox element.

    @@ -3942,6 +4040,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4278,7 +4428,7 @@ table section elements.

    @@ -4396,7 +4546,7 @@ table section elements.

    @@ -4574,7 +4724,7 @@ within the given specific section.

    @@ -4752,7 +4902,7 @@ different way.

    @@ -4966,7 +5116,7 @@ argument, this parameter is ignored.

    @@ -5142,7 +5292,7 @@ the checked state.

    @@ -5320,7 +5470,7 @@ option implementation does not use LuCI.ui widgets. @@ -5470,7 +5620,7 @@ returns false. @@ -5618,7 +5768,7 @@ returns false. @@ -5801,7 +5951,7 @@ so it may return promises if overridden by user code. @@ -5952,7 +6102,7 @@ validation constraints. @@ -6077,7 +6227,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6224,7 +6374,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6399,7 +6549,7 @@ either a localized Yes or No string, depending on the @@ -6594,7 +6744,7 @@ was neither a string nor a function. @@ -6742,7 +6892,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6901,7 +7051,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.GridSection.html b/docs/jsapi/LuCI.form.GridSection.html index 97402ecd9e..22605f931a 100644 --- a/docs/jsapi/LuCI.form.GridSection.html +++ b/docs/jsapi/LuCI.form.GridSection.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3256,7 +3354,7 @@ documentation for details.

    @@ -4117,7 +4215,7 @@ The default is null, means inheriting from the parent form.

    @@ -4320,7 +4418,7 @@ is shown. @@ -4438,7 +4536,7 @@ is shown. @@ -4592,7 +4690,7 @@ custom implementations.

    @@ -4698,7 +4796,7 @@ elements load functions rejected with an error. @@ -4915,7 +5013,7 @@ descendent of AbstractValue.

    @@ -5023,7 +5121,7 @@ not meeting the validation constraints of their respective elements. @@ -5168,7 +5266,7 @@ not meeting the validation constraints of their respective elements. @@ -5386,7 +5484,7 @@ contents. If omitted, no description will be rendered.

    @@ -5655,7 +5753,7 @@ descendent of AbstractValue.

    @@ -5856,7 +5954,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.HiddenValue.html b/docs/jsapi/LuCI.form.HiddenValue.html index e44d2508ed..33c3c6a48d 100644 --- a/docs/jsapi/LuCI.form.HiddenValue.html +++ b/docs/jsapi/LuCI.form.HiddenValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3248,7 +3346,7 @@ distorted form layout when rendering the option element.

    @@ -3851,6 +3949,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4187,7 +4337,7 @@ table section elements.

    @@ -4305,7 +4455,7 @@ table section elements.

    @@ -4483,7 +4633,7 @@ within the given specific section.

    @@ -4661,7 +4811,7 @@ different way.

    @@ -4875,7 +5025,7 @@ argument, this parameter is ignored.

    @@ -5052,7 +5202,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5230,7 +5380,7 @@ option implementation does not use LuCI.ui widgets. @@ -5380,7 +5530,7 @@ returns false. @@ -5528,7 +5678,7 @@ returns false. @@ -5711,7 +5861,7 @@ so it may return promises if overridden by user code. @@ -5862,7 +6012,7 @@ validation constraints. @@ -5987,7 +6137,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6134,7 +6284,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6314,7 +6464,7 @@ state of checkbox elements.

    @@ -6509,7 +6659,7 @@ was neither a string nor a function. @@ -6657,7 +6807,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6816,7 +6966,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.JSONMap.html b/docs/jsapi/LuCI.form.JSONMap.html index da1d72f90a..7947037f50 100644 --- a/docs/jsapi/LuCI.form.JSONMap.html +++ b/docs/jsapi/LuCI.form.JSONMap.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ as data source.

    @@ -3437,6 +3535,60 @@ If omitted, the corresponding paragraph element will not be rendered.

    +

    Members

    + +
    + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Toggle readonly state of the form.

    +

    If set to true, the Map instance is marked readonly and any form +option elements added to it will inherit the readonly state.

    +

    If left unset, the Map will test the access permission of the primary +uci configuration upon loading and mark the form readonly if no write +permissions are granted.

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    +

    Methods

    @@ -3454,7 +3606,7 @@ If omitted, the corresponding paragraph element will not be rendered.

    @@ -3572,7 +3724,7 @@ If omitted, the corresponding paragraph element will not be rendered.

    @@ -3696,7 +3848,7 @@ config already is in the list of required files, it will be ignored.

    @@ -3921,7 +4073,7 @@ passed.

    @@ -4143,7 +4295,7 @@ passed.

    @@ -4251,7 +4403,7 @@ an error. @@ -4470,7 +4622,7 @@ Returns null if the option could not be found. @@ -4577,7 +4729,7 @@ not meeting the validation constraints of their respective elements. @@ -4680,7 +4832,7 @@ rendering is complete. @@ -4784,7 +4936,7 @@ re-rendering is complete. @@ -4987,7 +5139,7 @@ failed. @@ -5182,7 +5334,7 @@ documentation for details.

    @@ -5329,7 +5481,7 @@ documentation for details.

    @@ -5530,7 +5682,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.ListValue.html b/docs/jsapi/LuCI.form.ListValue.html index d85af7af43..ae2669ef98 100644 --- a/docs/jsapi/LuCI.form.ListValue.html +++ b/docs/jsapi/LuCI.form.ListValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ It builds upon the LuCI.ui.Select @@ -3895,6 +3993,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4231,7 +4381,7 @@ table section elements.

    @@ -4349,7 +4499,7 @@ table section elements.

    @@ -4527,7 +4677,7 @@ within the given specific section.

    @@ -4705,7 +4855,7 @@ different way.

    @@ -4919,7 +5069,7 @@ argument, this parameter is ignored.

    @@ -5096,7 +5246,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5274,7 +5424,7 @@ option implementation does not use LuCI.ui widgets. @@ -5424,7 +5574,7 @@ returns false. @@ -5572,7 +5722,7 @@ returns false. @@ -5755,7 +5905,7 @@ so it may return promises if overridden by user code. @@ -5906,7 +6056,7 @@ validation constraints. @@ -6031,7 +6181,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6178,7 +6328,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6358,7 +6508,7 @@ state of checkbox elements.

    @@ -6553,7 +6703,7 @@ was neither a string nor a function. @@ -6701,7 +6851,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6860,7 +7010,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.Map.html b/docs/jsapi/LuCI.form.Map.html index ccb94b4549..2f44ad62b5 100644 --- a/docs/jsapi/LuCI.form.Map.html +++ b/docs/jsapi/LuCI.form.Map.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3245,7 +3343,7 @@ fields each.

    @@ -3436,6 +3534,60 @@ If omitted, the corresponding paragraph element will not be rendered.

    +

    Members

    + +
    + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Toggle readonly state of the form.

    +

    If set to true, the Map instance is marked readonly and any form +option elements added to it will inherit the readonly state.

    +

    If left unset, the Map will test the access permission of the primary +uci configuration upon loading and mark the form readonly if no write +permissions are granted.

    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    +

    Methods

    @@ -3453,7 +3605,7 @@ If omitted, the corresponding paragraph element will not be rendered.

    @@ -3569,7 +3721,7 @@ If omitted, the corresponding paragraph element will not be rendered.

    @@ -3691,7 +3843,7 @@ config already is in the list of required files, it will be ignored.

    @@ -3914,7 +4066,7 @@ passed.

    @@ -4134,7 +4286,7 @@ passed.

    @@ -4240,7 +4392,7 @@ an error. @@ -4457,7 +4609,7 @@ Returns null if the option could not be found. @@ -4562,7 +4714,7 @@ not meeting the validation constraints of their respective elements. @@ -4663,7 +4815,7 @@ rendering is complete. @@ -4765,7 +4917,7 @@ re-rendering is complete. @@ -4966,7 +5118,7 @@ failed. @@ -5161,7 +5313,7 @@ documentation for details.

    @@ -5308,7 +5460,7 @@ documentation for details.

    @@ -5509,7 +5661,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.MultiValue.html b/docs/jsapi/LuCI.form.MultiValue.html index 34f63f949e..d004535f5a 100644 --- a/docs/jsapi/LuCI.form.MultiValue.html +++ b/docs/jsapi/LuCI.form.MultiValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ select dropdown element.

    @@ -3947,6 +4045,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4283,7 +4433,7 @@ table section elements.

    @@ -4401,7 +4551,7 @@ table section elements.

    @@ -4579,7 +4729,7 @@ within the given specific section.

    @@ -4757,7 +4907,7 @@ different way.

    @@ -4971,7 +5121,7 @@ argument, this parameter is ignored.

    @@ -5148,7 +5298,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5326,7 +5476,7 @@ option implementation does not use LuCI.ui widgets. @@ -5476,7 +5626,7 @@ returns false. @@ -5624,7 +5774,7 @@ returns false. @@ -5807,7 +5957,7 @@ so it may return promises if overridden by user code. @@ -5958,7 +6108,7 @@ validation constraints. @@ -6083,7 +6233,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6230,7 +6380,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6410,7 +6560,7 @@ state of checkbox elements.

    @@ -6605,7 +6755,7 @@ was neither a string nor a function. @@ -6753,7 +6903,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6912,7 +7062,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.NamedSection.html b/docs/jsapi/LuCI.form.NamedSection.html index 6d1b954671..3643a3745d 100644 --- a/docs/jsapi/LuCI.form.NamedSection.html +++ b/docs/jsapi/LuCI.form.NamedSection.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3245,7 +3343,7 @@ specified when constructing the class instance.

    @@ -3661,7 +3759,7 @@ this property will hold a reference to the parent option instance.

    @@ -3777,7 +3875,7 @@ this property will hold a reference to the parent option instance.

    @@ -3881,7 +3979,7 @@ section ID as sole element. User code should not normally change this.

    @@ -4035,7 +4133,7 @@ custom implementations.

    @@ -4141,7 +4239,7 @@ elements load functions rejected with an error. @@ -4358,7 +4456,7 @@ descendent of AbstractValue.

    @@ -4466,7 +4564,7 @@ not meeting the validation constraints of their respective elements. @@ -4574,7 +4672,7 @@ the form element's markup, including the markup of any child elements. @@ -4721,7 +4819,7 @@ the form element's markup, including the markup of any child elements. @@ -4940,7 +5038,7 @@ contents. If omitted, no description will be rendered.

    @@ -5209,7 +5307,7 @@ descendent of AbstractValue.

    @@ -5410,7 +5508,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.SectionValue.html b/docs/jsapi/LuCI.form.SectionValue.html index e98ae4ac05..b628e6f9d9 100644 --- a/docs/jsapi/LuCI.form.SectionValue.html +++ b/docs/jsapi/LuCI.form.SectionValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ element container, allowing to nest form sections into other sections.

    @@ -3899,6 +3997,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4235,7 +4385,7 @@ table section elements.

    @@ -4353,7 +4503,7 @@ table section elements.

    @@ -4531,7 +4681,7 @@ within the given specific section.

    @@ -4706,7 +4856,7 @@ its cfgvalue() implementation will always return null. @@ -4920,7 +5070,7 @@ argument, this parameter is ignored.

    @@ -5095,7 +5245,7 @@ its formvalue() implementation will always return null @@ -5273,7 +5423,7 @@ option implementation does not use LuCI.ui widgets. @@ -5423,7 +5573,7 @@ returns false. @@ -5571,7 +5721,7 @@ returns false. @@ -5754,7 +5904,7 @@ so it may return promises if overridden by user code. @@ -5905,7 +6055,7 @@ validation constraints. @@ -6024,7 +6174,7 @@ its remove() implementation is a no-op.

    @@ -6171,7 +6321,7 @@ its remove() implementation is a no-op.

    @@ -6351,7 +6501,7 @@ state of checkbox elements.

    @@ -6546,7 +6696,7 @@ was neither a string nor a function. @@ -6692,7 +6842,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6843,7 +6993,7 @@ its write() implementation is a no-op.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.TableSection.html b/docs/jsapi/LuCI.form.TableSection.html index 0eb677f973..e2271c83ed 100644 --- a/docs/jsapi/LuCI.form.TableSection.html +++ b/docs/jsapi/LuCI.form.TableSection.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3248,7 +3346,7 @@ value of the addremove property.

    @@ -4311,7 +4409,7 @@ The default is null, means inheriting from the parent form.

    @@ -4514,7 +4612,7 @@ is shown. @@ -4632,7 +4730,7 @@ is shown. @@ -4786,7 +4884,7 @@ custom implementations.

    @@ -4892,7 +4990,7 @@ elements load functions rejected with an error. @@ -5109,7 +5207,7 @@ descendent of AbstractValue.

    @@ -5217,7 +5315,7 @@ not meeting the validation constraints of their respective elements. @@ -5364,7 +5462,7 @@ not meeting the validation constraints of their respective elements. @@ -5562,7 +5660,7 @@ contents. If omitted, no description will be rendered.

    @@ -5831,7 +5929,7 @@ descendent of AbstractValue.

    @@ -6032,7 +6130,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.TextValue.html b/docs/jsapi/LuCI.form.TextValue.html index 27d8ae18f0..780b089f98 100644 --- a/docs/jsapi/LuCI.form.TextValue.html +++ b/docs/jsapi/LuCI.form.TextValue.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ @@ -4042,6 +4140,58 @@ as plain text input.

    + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + + + + +
    @@ -4378,7 +4528,7 @@ table section elements.

    @@ -4496,7 +4646,7 @@ table section elements.

    @@ -4674,7 +4824,7 @@ within the given specific section.

    @@ -4852,7 +5002,7 @@ different way.

    @@ -5066,7 +5216,7 @@ argument, this parameter is ignored.

    @@ -5243,7 +5393,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5421,7 +5571,7 @@ option implementation does not use LuCI.ui widgets. @@ -5571,7 +5721,7 @@ returns false. @@ -5719,7 +5869,7 @@ returns false. @@ -5902,7 +6052,7 @@ so it may return promises if overridden by user code. @@ -6053,7 +6203,7 @@ validation constraints. @@ -6178,7 +6328,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6325,7 +6475,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6505,7 +6655,7 @@ state of checkbox elements.

    @@ -6700,7 +6850,7 @@ was neither a string nor a function. @@ -6859,7 +7009,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.TypedSection.html b/docs/jsapi/LuCI.form.TypedSection.html index d4510730f8..b4625a1607 100644 --- a/docs/jsapi/LuCI.form.TypedSection.html +++ b/docs/jsapi/LuCI.form.TypedSection.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3248,7 +3346,7 @@ value of the addremove property.

    @@ -3790,7 +3888,7 @@ this property will hold a reference to the parent option instance.

    @@ -3908,7 +4006,7 @@ this property will hold a reference to the parent option instance.

    @@ -4038,7 +4136,7 @@ The sections will be rendered in the same order as the returned array. @@ -4192,7 +4290,7 @@ custom implementations.

    @@ -4298,7 +4396,7 @@ elements load functions rejected with an error. @@ -4515,7 +4613,7 @@ descendent of AbstractValue.

    @@ -4623,7 +4721,7 @@ not meeting the validation constraints of their respective elements. @@ -4731,7 +4829,7 @@ the form element's markup, including the markup of any child elements. @@ -4878,7 +4976,7 @@ the form element's markup, including the markup of any child elements. @@ -5097,7 +5195,7 @@ contents. If omitted, no description will be rendered.

    @@ -5366,7 +5464,7 @@ descendent of AbstractValue.

    @@ -5567,7 +5665,7 @@ was neither a string nor a function.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.Value.html b/docs/jsapi/LuCI.form.Value.html index 6ea8e48ad1..1d5bee7720 100644 --- a/docs/jsapi/LuCI.form.Value.html +++ b/docs/jsapi/LuCI.form.Value.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ @@ -3838,6 +3936,58 @@ or selected by the user.

    +
    Default Value:
    +
    • false
    + + + + + + + + + + + + + + + +
    +
    +

    readonlyboolean

    +
    + + +
    +
    + +
    +

    Make option element readonly.

    +

    This property defaults to the readonly state of the parent form element. +When set to true, the underlying widget is rendered in disabled state, +means its contents cannot be changed and the widget cannot be interacted +with.

    +
    + + + +
    + + + + + + + + + + + + + + +
    Default Value:
    • false
    @@ -4183,7 +4333,7 @@ table section elements.

    @@ -4301,7 +4451,7 @@ table section elements.

    @@ -4479,7 +4629,7 @@ within the given specific section.

    @@ -4657,7 +4807,7 @@ different way.

    @@ -4871,7 +5021,7 @@ argument, this parameter is ignored.

    @@ -5048,7 +5198,7 @@ It may be overwritten by user code to handle input values differently.

    @@ -5226,7 +5376,7 @@ option implementation does not use LuCI.ui widgets. @@ -5376,7 +5526,7 @@ returns false. @@ -5524,7 +5674,7 @@ returns false. @@ -5707,7 +5857,7 @@ so it may return promises if overridden by user code. @@ -5858,7 +6008,7 @@ validation constraints. @@ -5983,7 +6133,7 @@ implement alternative removal logic, e.g. to retain the original value.

    @@ -6091,7 +6241,7 @@ the form element's markup, including the markup of any child elements. @@ -6238,7 +6388,7 @@ the form element's markup, including the markup of any child elements. @@ -6418,7 +6568,7 @@ state of checkbox elements.

    @@ -6611,7 +6761,7 @@ was neither a string nor a function. @@ -6759,7 +6909,7 @@ or a plain text string. If omitted, the key value is used as captio @@ -6918,7 +7068,7 @@ before it is written.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.form.html b/docs/jsapi/LuCI.form.html index 35e33a6a2e..464a766175 100644 --- a/docs/jsapi/LuCI.form.html +++ b/docs/jsapi/LuCI.form.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3273,7 +3371,7 @@ m.render().then(function(node) { @@ -3426,7 +3524,7 @@ m.render().then(function(node) {
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.fs.html b/docs/jsapi/LuCI.fs.html index b3b61f5c76..7f41f5e882 100644 --- a/docs/jsapi/LuCI.fs.html +++ b/docs/jsapi/LuCI.fs.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -5603,7 +5701,7 @@ the failure reason.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.headers.html b/docs/jsapi/LuCI.headers.html index d8e2809a2c..ba47d7309d 100644 --- a/docs/jsapi/LuCI.headers.html +++ b/docs/jsapi/LuCI.headers.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ response objects using the response.headers property.

    @@ -3328,7 +3426,7 @@ response objects using the response.headers property.

    @@ -3477,7 +3575,7 @@ Note: Header-Names are case-insensitive.

    @@ -3631,7 +3729,7 @@ Note: Header-Names are case-insensitive.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.html b/docs/jsapi/LuCI.html index 9c7c60f6a8..a8bf2d946e 100644 --- a/docs/jsapi/LuCI.html +++ b/docs/jsapi/LuCI.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3385,6 +3483,9 @@ accessible using the global L variable.

    rpc
    +
    session
    +
    +
    uci
    @@ -3707,7 +3808,7 @@ to request the LuCI.view class.

    @@ -3919,7 +4020,7 @@ as parameters.

    @@ -4145,6 +4246,161 @@ argument or copied from the given error instance.

    + + + + +
    +
    +

    + + fspath(parts){string} +

    + + + + +
    + + +
    +
    + + +
    +

    Construct an absolute filesystem path relative to the server +document root.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    parts + + +string + + + + + + + optional + + + + + repeatable + + +

    An array of parts to join into a path.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + + + + + + + + + + + + + + + + + + + +
    TypeDescription
    + + string + + + Return the joined path.
    + + + +
    @@ -4158,7 +4414,7 @@ argument or copied from the given error instance.

    @@ -4370,7 +4626,7 @@ callback function. The function is a wrapper around @@ -4473,7 +4729,7 @@ when it didn't run to begin with. @@ -4653,6 +4909,112 @@ has no sub-features. + + + + +
    +
    +

    + + hasViewPermission(){boolean|null} +

    + + + + +
    + + +
    +
    + + +
    +

    Check whether a view has sufficient permissions.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + + + + + + + + + + + + + + + + + + + +
    TypeDescription
    + + boolean + | + + null + + + Returns null if the current session has no permission at all to +load resources required by the view. Returns false if readonly +permissions are granted or true if at least one required ACL +group is granted with write permissions.
    + + + +
    @@ -4666,7 +5028,7 @@ has no sub-features. @@ -4821,7 +5183,7 @@ not null, else returns false. @@ -4921,7 +5283,7 @@ not null, else returns false. @@ -5078,7 +5440,7 @@ slashes and any of the other characters mentioned above.

    @@ -5265,7 +5627,7 @@ slashes and any of the other characters mentioned above.

    @@ -5570,7 +5932,7 @@ polling request. @@ -5785,7 +6147,7 @@ by default.

    @@ -6024,7 +6386,7 @@ argument or copied from the given error instance.

    @@ -6282,7 +6644,7 @@ class instance.

    @@ -6453,7 +6815,7 @@ to the given default value on error. @@ -6610,7 +6972,7 @@ slashes and any of the other characters mentioned above.

    @@ -6713,7 +7075,7 @@ when it was already running. @@ -6930,7 +7292,7 @@ addresses or numeric values respectively.

    @@ -7078,7 +7440,7 @@ it could not be found. @@ -7228,7 +7590,7 @@ space and returned as array.

    @@ -7391,7 +7753,7 @@ slashes and any of the other characters mentioned above.

    @@ -7562,7 +7924,7 @@ else null.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.Device.html b/docs/jsapi/LuCI.network.Device.html index 7adf03c9f5..332ea597b5 100644 --- a/docs/jsapi/LuCI.network.Device.html +++ b/docs/jsapi/LuCI.network.Device.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ device and allows querying device details such as packet statistics or MTU.

    < @@ -3328,7 +3426,7 @@ device and allows querying device details such as packet statistics or MTU.

    < @@ -3432,7 +3530,7 @@ device is not a Linux bridge. @@ -3533,7 +3631,7 @@ enabled, else false. @@ -3634,7 +3732,7 @@ for non-wifi devices or operation mode and ssid for wifi ones. @@ -3734,7 +3832,7 @@ for non-wifi devices or operation mode and ssid for wifi ones. @@ -3834,7 +3932,7 @@ for non-wifi devices or operation mode and ssid for wifi ones. @@ -3938,7 +4036,7 @@ e.g. for non-ethernet tunnel devices. @@ -4038,7 +4136,7 @@ e.g. for non-ethernet tunnel devices. @@ -4138,7 +4236,7 @@ e.g. for non-ethernet tunnel devices. @@ -4243,7 +4341,7 @@ assigned to any logical interface. @@ -4344,7 +4442,7 @@ logical interfaces this device is assigned to. @@ -4449,7 +4547,7 @@ a Linux bridge. @@ -4549,7 +4647,7 @@ a Linux bridge. @@ -4649,7 +4747,7 @@ a Linux bridge. @@ -4750,7 +4848,7 @@ the operation mode and SSID for wifi devices. @@ -4850,7 +4948,7 @@ the operation mode and SSID for wifi devices. @@ -4950,7 +5048,7 @@ the operation mode and SSID for wifi devices. @@ -5059,7 +5157,7 @@ the operation mode and SSID for wifi devices. @@ -5160,7 +5258,7 @@ the operation mode and SSID for wifi devices. @@ -5265,7 +5363,7 @@ is not a wireless device. @@ -5366,7 +5464,7 @@ else false. @@ -5467,7 +5565,7 @@ else false. @@ -5576,7 +5674,7 @@ when it is down or absent.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.Hosts.html b/docs/jsapi/LuCI.network.Hosts.html index 7468e054da..0ff4adeef6 100644 --- a/docs/jsapi/LuCI.network.Hosts.html +++ b/docs/jsapi/LuCI.network.Hosts.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ host information by different criteria.

    @@ -3329,7 +3427,7 @@ host information by different criteria.

    @@ -3479,7 +3577,7 @@ the corresponding host. @@ -3629,7 +3727,7 @@ the corresponding host. @@ -3779,7 +3877,7 @@ the corresponding host. @@ -3929,7 +4027,7 @@ the corresponding host. @@ -4079,7 +4177,7 @@ the corresponding host. @@ -4229,7 +4327,7 @@ the corresponding host. @@ -4379,7 +4477,7 @@ the corresponding host. @@ -4557,7 +4655,7 @@ is used as hint.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.Protocol.html b/docs/jsapi/LuCI.network.Protocol.html index 318f173dfb..fb3dcd08c9 100644 --- a/docs/jsapi/LuCI.network.Protocol.html +++ b/docs/jsapi/LuCI.network.Protocol.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ subclasses which describe logical UCI networks defined by config interface @@ -3328,7 +3426,7 @@ subclasses which describe logical UCI networks defined by config interface @@ -3489,7 +3587,7 @@ interface or if the logical interface is virtual. @@ -3650,7 +3748,7 @@ device or false if not. @@ -3760,7 +3858,7 @@ the interface removal will be aborted. @@ -3921,7 +4019,7 @@ interface or if the logical interface is virtual. @@ -4073,7 +4171,7 @@ not found. @@ -4175,7 +4273,7 @@ expected Linux network device according to the configuration. @@ -4282,7 +4380,7 @@ virtual and not a bridge. @@ -4383,7 +4481,7 @@ protocol backend. @@ -4484,7 +4582,7 @@ protocol backend. @@ -4592,7 +4690,7 @@ error code in case no translation can be found.

    @@ -4696,7 +4794,7 @@ if it isn't applicable to the associated protocol. @@ -4798,7 +4896,7 @@ default route or null if no default route was found. @@ -4900,7 +4998,7 @@ default route or null if no default route was found. @@ -5002,7 +5100,7 @@ default route or null if no default route was found. @@ -5106,7 +5204,7 @@ it could not be determined. @@ -5210,7 +5308,7 @@ in CIDR notation or null if no IPv6 addresses were set. @@ -5312,7 +5410,7 @@ follows the order of the addresses in ubus runtime information. - network.js, line 2239 + network.js, line 2241 @@ -5416,7 +5514,7 @@ handler or null if no prefix is present. @@ -5520,7 +5618,7 @@ or null if no IPv4 addresses were set. @@ -5622,7 +5720,7 @@ follows the order of the addresses in ubus runtime information. - network.js, line 2556 + network.js, line 2558 @@ -5724,7 +5822,7 @@ network device currently associated with the logical interface. @@ -5826,7 +5924,7 @@ network device currently associated with the logical interface. @@ -5927,7 +6025,7 @@ routes spawned by the associated logical interface. @@ -6027,7 +6125,7 @@ routes spawned by the associated logical interface. @@ -6131,7 +6229,7 @@ protocol handler or null if no IPv4 addresses were set. @@ -6233,7 +6331,7 @@ function, e.g. odhcp6c for the dhcpv6 prototocol. @@ -6336,7 +6434,7 @@ function, e.g. odhcp6c for the dhcpv6 prototocol. @@ -6443,7 +6541,7 @@ interface or null if no type option is set. @@ -6543,7 +6641,7 @@ interface or null if no type option is set. @@ -6651,7 +6749,7 @@ handler didn't request a zone. @@ -6758,7 +6856,7 @@ is an alias or null if it is not an alias interface. @@ -6860,7 +6958,7 @@ or false when the logical interface is no bridge. @@ -7007,7 +7105,7 @@ rejects with an error message string. @@ -7112,7 +7210,7 @@ or not (false). @@ -7213,7 +7311,7 @@ has no network devices attached.

    @@ -7322,7 +7420,7 @@ or not (false). @@ -7426,7 +7524,7 @@ returns true.

    @@ -7526,7 +7624,7 @@ returns true.

    @@ -7633,7 +7731,7 @@ dynamic interfaces (true) or not (false). @@ -7787,7 +7885,7 @@ configuration.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.WifiDevice.html b/docs/jsapi/LuCI.network.WifiDevice.html index 0b12b5d060..cab05c6f00 100644 --- a/docs/jsapi/LuCI.network.WifiDevice.html +++ b/docs/jsapi/LuCI.network.WifiDevice.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ well as methods for enumerating related wireless networks.

    @@ -3329,7 +3427,7 @@ well as methods for enumerating related wireless networks.

    @@ -3484,7 +3582,7 @@ were invalid. @@ -3636,7 +3734,7 @@ with this wireless radio device. @@ -3788,7 +3886,7 @@ not found. @@ -3899,7 +3997,7 @@ known mode values are: @@ -4009,7 +4107,7 @@ known mode values are: @@ -4109,7 +4207,7 @@ known mode values are: @@ -4211,7 +4309,7 @@ for the wireless phy. @@ -4313,7 +4411,7 @@ describing the networks found in the vincinity. @@ -4464,7 +4562,7 @@ this radio device. @@ -4566,7 +4664,7 @@ radio device. @@ -4668,7 +4766,7 @@ UCI configuration. @@ -4769,7 +4867,7 @@ runtime state.

    @@ -4923,7 +5021,7 @@ configuration.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.WifiNetwork.html b/docs/jsapi/LuCI.network.WifiNetwork.html index 70f8b70535..5af2af153a 100644 --- a/docs/jsapi/LuCI.network.WifiNetwork.html +++ b/docs/jsapi/LuCI.network.WifiNetwork.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3245,7 +3343,7 @@ such networks in parallel.

    @@ -3330,7 +3428,7 @@ such networks in parallel.

    @@ -3601,7 +3699,7 @@ are passed. @@ -3753,7 +3851,7 @@ not found. @@ -3854,7 +3952,7 @@ information. @@ -3955,7 +4053,7 @@ encryption state could not be found in ubus runtime information. - network.js, line 3621 + network.js, line 3623 @@ -4068,7 +4166,7 @@ state. Possible returned values are: @@ -4170,7 +4268,7 @@ translated string.

    @@ -4271,7 +4369,7 @@ information. @@ -4372,7 +4470,7 @@ with this network. @@ -4478,7 +4576,7 @@ is not available. @@ -4581,7 +4679,7 @@ is not available. @@ -4685,7 +4783,7 @@ or null if it cannot be determined. @@ -4786,7 +4884,7 @@ information or 00 if it cannot be determined. @@ -4887,7 +4985,7 @@ device associted with this wireless network. @@ -4992,7 +5090,7 @@ available. @@ -5095,7 +5193,7 @@ name, depending on which information is available. @@ -5198,7 +5296,7 @@ radio and network index numbers.

    @@ -5303,7 +5401,7 @@ associated network device, e.g. when not configured or up. @@ -5407,7 +5505,7 @@ is not in mesh mode. @@ -5514,7 +5612,7 @@ is not in mesh mode. @@ -5614,7 +5712,7 @@ is not in mesh mode. @@ -5719,7 +5817,7 @@ interface. @@ -5820,7 +5918,7 @@ attached to.

    @@ -5921,7 +6019,7 @@ logical interfaces this wireless network is attached to. @@ -6022,7 +6120,7 @@ information or 0 if it cannot be determined. @@ -6124,7 +6222,7 @@ internal network ID, depending on which information is available. @@ -6228,7 +6326,7 @@ information or null if it cannot be determined. @@ -6331,7 +6429,7 @@ noise and signal (SNR), divided by 5. @@ -6433,7 +6531,7 @@ by ubus runtime state. @@ -6537,7 +6635,7 @@ in mesh mode. @@ -6641,7 +6739,7 @@ in mesh mode. @@ -6745,7 +6843,7 @@ cannot be determined. @@ -6850,7 +6948,7 @@ found. @@ -6954,7 +7052,7 @@ or null if it cannot be determined. @@ -7055,7 +7153,7 @@ deauthenticating clients, otherwise false. @@ -7157,7 +7255,7 @@ UCI configuration. @@ -7262,7 +7360,7 @@ instance.

    @@ -7416,7 +7514,7 @@ configuration.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.network.html b/docs/jsapi/LuCI.network.html index 40bceb9660..735906ea62 100644 --- a/docs/jsapi/LuCI.network.html +++ b/docs/jsapi/LuCI.network.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3245,7 +3343,7 @@ current configuration details and to manipulate settings.

    @@ -3349,7 +3447,7 @@ current configuration details and to manipulate settings.

    @@ -3536,7 +3634,7 @@ existed. @@ -3686,7 +3784,7 @@ were invalid or if the associated radio device could not be found. @@ -3834,7 +3932,7 @@ references to it were successfully deleted from the configuration or @@ -3984,7 +4082,7 @@ be found. @@ -4085,7 +4183,7 @@ from the remote ubus apis.

    @@ -4236,7 +4334,7 @@ or WPA3 SAE (CCMP).

    @@ -4384,7 +4482,7 @@ be found. @@ -4485,7 +4583,7 @@ instances describing the network devices found on the system. @@ -4586,7 +4684,7 @@ instances describing the network devices found on the system. @@ -4690,7 +4788,7 @@ class instance describing the found hosts.

    @@ -4851,7 +4949,7 @@ object could not be converted to a name. @@ -4999,7 +5097,7 @@ the network or null if the network did not exist. @@ -5101,7 +5199,7 @@ describing all known networks. @@ -5301,7 +5399,7 @@ protocol isn't known. @@ -5402,7 +5500,7 @@ backend classes.

    @@ -5506,7 +5604,7 @@ the layout. @@ -5609,7 +5707,7 @@ instances describing the found IPv6 default route interfaces. @@ -5712,7 +5810,7 @@ instances describing the found default route interfaces. @@ -5861,7 +5959,7 @@ be found. @@ -5964,7 +6062,7 @@ the configuration. @@ -6115,7 +6213,7 @@ be found. @@ -6218,7 +6316,7 @@ are found. @@ -6368,7 +6466,7 @@ else returns false. @@ -6565,7 +6663,7 @@ if the given netmask value was invalid. @@ -6763,7 +6861,7 @@ value of 32 for IPv4 or 128 for IPv6. @@ -6935,7 +7033,7 @@ description for the given code. @@ -7053,7 +7151,7 @@ such as 6in4-wan or tun0.

    @@ -7226,7 +7324,7 @@ be passed to Class.extend().

    @@ -9271,7 +9369,7 @@ conjunction with quality to calculate a quality percentage.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time) diff --git a/docs/jsapi/LuCI.poll.html b/docs/jsapi/LuCI.poll.html index 98a21d8846..c895c5dd28 100644 --- a/docs/jsapi/LuCI.poll.html +++ b/docs/jsapi/LuCI.poll.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ loop.

    @@ -3329,7 +3427,7 @@ loop.

    @@ -3431,7 +3529,7 @@ loop.

    @@ -3628,7 +3726,7 @@ already is registered. @@ -3802,7 +3900,7 @@ wasn't found. @@ -3904,7 +4002,7 @@ where registered) or false when the polling loop already runs. @@ -4014,7 +4112,7 @@ run to begin with.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.request.html b/docs/jsapi/LuCI.request.html index a02440505d..97042f805f 100644 --- a/docs/jsapi/LuCI.request.html +++ b/docs/jsapi/LuCI.request.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ for dealing with responses.

    @@ -3335,7 +3433,7 @@ for dealing with responses.

    @@ -3483,7 +3581,7 @@ implementing request retries before returning a failure.

    @@ -3629,7 +3727,7 @@ if it already was absolute. @@ -3809,7 +3907,7 @@ if it already was absolute. @@ -4019,7 +4117,7 @@ if it already was absolute. @@ -4166,7 +4264,7 @@ function.

    @@ -4352,7 +4450,7 @@ function.

    @@ -4949,7 +5047,7 @@ instances as sole argument during the HTTP request transfer.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.request.poll.html b/docs/jsapi/LuCI.request.poll.html index b9daf507ed..e0fb11b022 100644 --- a/docs/jsapi/LuCI.request.poll.html +++ b/docs/jsapi/LuCI.request.poll.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ request calls as polling functions.

    @@ -3329,7 +3427,7 @@ request calls as polling functions.

    @@ -3400,7 +3498,7 @@ request calls as polling functions.

    @@ -3667,7 +3765,7 @@ invoke for each HTTP reply.

    @@ -3814,7 +3912,7 @@ This function is essentially a wrapper around @@ -3885,7 +3983,7 @@ This function is essentially a wrapper around @@ -3962,7 +4060,7 @@ This function is essentially a wrapper around @@ -4133,7 +4231,7 @@ else null.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.response.html b/docs/jsapi/LuCI.response.html index f0f821f320..c6c2a37e23 100644 --- a/docs/jsapi/LuCI.response.html +++ b/docs/jsapi/LuCI.response.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3242,7 +3340,7 @@ @@ -3601,7 +3699,7 @@ @@ -3701,7 +3799,7 @@ @@ -3856,7 +3954,7 @@ using String() and treated as response text.

    @@ -3983,7 +4081,7 @@ using String() and treated as response text.

    @@ -4091,7 +4189,7 @@ using String() and treated as response text.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.rpc.html b/docs/jsapi/LuCI.rpc.html index b3d5f4a6fd..9015182904 100644 --- a/docs/jsapi/LuCI.rpc.html +++ b/docs/jsapi/LuCI.rpc.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3328,7 +3426,7 @@ and means for listing and invoking remove RPC methods.

    @@ -3473,7 +3571,7 @@ and means for listing and invoking remove RPC methods.

    @@ -3621,7 +3719,7 @@ signatures of each given object.

    @@ -3721,7 +3819,7 @@ signatures of each given object.

    @@ -3822,7 +3920,7 @@ requests. @@ -3968,7 +4066,7 @@ description.

    @@ -4135,7 +4233,7 @@ signatures of each requested ubus object name will be returned. - rpc.js, line 472 + rpc.js, line 481 @@ -4281,7 +4379,7 @@ if it has not been found. @@ -4397,7 +4495,7 @@ if it has not been found. @@ -4543,6 +4641,8 @@ requests.

    + Default + Description @@ -4574,6 +4674,10 @@ requests.

    + + + +

    The name of the remote ubus object to invoke.

    @@ -4603,6 +4707,10 @@ requests.

    + + + +

    The name of the remote ubus method to invoke.

    @@ -4634,6 +4742,10 @@ requests.

    + + + +

    Lists the named parameters expected by the remote ubus RPC method. The arguments passed to the resulting generated method call function @@ -4683,6 +4795,10 @@ invoked with filterFn(reply, [ "foo" ], "bar", "b + + + +

    Describes the expected return data structure. The given object is supposed to contain a single key selecting the value to use from @@ -4743,12 +4859,55 @@ be returned as default instead.

  • + + + +

    Specfies an optional filter function which is invoked to transform the received reply data before it is returned to the caller.

    + + + + reject + + + + + +boolean + + + + + + + + + <optional>
    + + + + + + + + + + false + + + + +

    If set to true, non-zero ubus call status codes are treated as fatal +error and lead to the rejection of the call promise. The default +behaviour is to resolve with the call return code value instead.

    + + + @@ -4790,7 +4949,7 @@ received reply data before it is returned to the caller.

    @@ -5003,7 +5162,7 @@ of the RPC method as-is. @@ -5191,7 +5350,7 @@ function will fail too, forwarding the error to the caller. @@ -5361,7 +5520,7 @@ to the expect and filter declarations.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.uci.html b/docs/jsapi/LuCI.uci.html index 898a52c5f0..e103e74f44 100644 --- a/docs/jsapi/LuCI.uci.html +++ b/docs/jsapi/LuCI.uci.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3330,7 +3428,7 @@ UCI configuration data.

    @@ -3541,7 +3639,7 @@ to the given name for non-anonymous sections. @@ -3703,7 +3801,7 @@ operation to cancel the rollback timer.

    @@ -3804,7 +3902,7 @@ names as keys and arrays of related change records as values. @@ -3953,7 +4051,7 @@ where X denotes a hexadecimal digit. @@ -4182,7 +4280,7 @@ found or if the corresponding configuration is not loaded.
  • @@ -4415,7 +4513,7 @@ found or if the corresponding configuration is not loaded. @@ -4570,7 +4668,7 @@ that have been successfully loaded. @@ -4839,7 +4937,7 @@ when either the section specified by sid1 or by sid2 i @@ -4978,7 +5076,7 @@ when either the section specified by sid1 or by sid2 i @@ -5156,7 +5254,7 @@ not be resolved to existing section ID. @@ -5260,7 +5358,7 @@ have been reloaded by the save operation. @@ -5473,7 +5571,7 @@ configuration, filtered by type of a type has been specified. @@ -5669,7 +5767,7 @@ with the given value.

    @@ -5890,7 +5988,7 @@ with the given value.

    @@ -6010,7 +6108,7 @@ names to unload.

    @@ -6175,7 +6273,7 @@ configuration.

    @@ -6762,7 +6860,7 @@ underlying option is an UCI list.

    @@ -6909,7 +7007,7 @@ associated name as arguments.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.AbstractElement.html b/docs/jsapi/LuCI.ui.AbstractElement.html index 5e7847df3c..320fb565fb 100644 --- a/docs/jsapi/LuCI.ui.AbstractElement.html +++ b/docs/jsapi/LuCI.ui.AbstractElement.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3252,7 +3350,7 @@ it in external JavaScript, use L.require("ui").then(...) @@ -3337,7 +3435,7 @@ it in external JavaScript, use L.require("ui").then(...) @@ -3446,7 +3544,7 @@ an array of strings or null for unset values. @@ -3547,7 +3645,7 @@ not meet the validation constraints. @@ -3717,7 +3815,7 @@ registered.

    @@ -3818,7 +3916,7 @@ widget markup. @@ -3975,7 +4073,7 @@ as dirty.

    @@ -4130,7 +4228,7 @@ trigger input value validation.

    @@ -4255,7 +4353,7 @@ or null values.

    @@ -4553,6 +4651,45 @@ converted to a string and treated as validation error message.

    + + + + disabled + + + + + +boolean + + + + + + + + + <optional>
    + + + + + + + + + + false + + + + +

    Specifies whether the widget should be rendered in disabled state +(true) or not (false). Disabled widgets cannot be interacted with +and are displayed in a slightly faded style.

    + + + @@ -4600,7 +4737,7 @@ converted to a string and treated as validation error message.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Checkbox.html b/docs/jsapi/LuCI.ui.Checkbox.html index b27a45b4c6..307a47b19c 100644 --- a/docs/jsapi/LuCI.ui.Checkbox.html +++ b/docs/jsapi/LuCI.ui.Checkbox.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3249,7 +3347,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3440,7 +3538,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3549,7 +3647,7 @@ an array of strings or null for unset values. @@ -3651,7 +3749,7 @@ an array of strings or null for unset values. @@ -3754,7 +3852,7 @@ not meet the validation constraints. @@ -3926,7 +4024,7 @@ registered.

    @@ -4029,7 +4127,7 @@ widget markup. @@ -4188,7 +4286,7 @@ as dirty.

    @@ -4345,7 +4443,7 @@ trigger input value validation.

    @@ -4472,7 +4570,7 @@ or null values.

    @@ -4747,7 +4845,7 @@ it is required for HTML based form submissions.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.ComboButton.html b/docs/jsapi/LuCI.ui.ComboButton.html index 2352aa58bb..3031037ccf 100644 --- a/docs/jsapi/LuCI.ui.ComboButton.html +++ b/docs/jsapi/LuCI.ui.ComboButton.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3250,7 +3348,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3478,7 +3576,7 @@ choice labels.

    @@ -3624,7 +3722,7 @@ as label text. Choice labels may be any valid value accepted by @@ -3761,7 +3859,7 @@ of keeping them.

    @@ -3834,7 +3932,7 @@ of keeping them.

    @@ -3937,7 +4035,7 @@ not meet the validation constraints. @@ -4109,7 +4207,7 @@ registered.

    @@ -4268,7 +4366,7 @@ as dirty.

    @@ -4425,7 +4523,7 @@ trigger input value validation.

    @@ -4777,7 +4875,7 @@ choice value as second argument.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Combobox.html b/docs/jsapi/LuCI.ui.Combobox.html index 7baa7e2c0c..30280f12ed 100644 --- a/docs/jsapi/LuCI.ui.Combobox.html +++ b/docs/jsapi/LuCI.ui.Combobox.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3252,7 +3350,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3480,7 +3578,7 @@ choice labels.

    @@ -3626,7 +3724,7 @@ as label text. Choice labels may be any valid value accepted by @@ -3763,7 +3861,7 @@ of keeping them.

    @@ -3836,7 +3934,7 @@ of keeping them.

    @@ -3939,7 +4037,7 @@ not meet the validation constraints. @@ -4111,7 +4209,7 @@ registered.

    @@ -4270,7 +4368,7 @@ as dirty.

    @@ -4427,7 +4525,7 @@ trigger input value validation.

    @@ -4680,7 +4778,7 @@ forcibly set to true.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Dropdown.html b/docs/jsapi/LuCI.ui.Dropdown.html index f5898d37bc..a157c38d59 100644 --- a/docs/jsapi/LuCI.ui.Dropdown.html +++ b/docs/jsapi/LuCI.ui.Dropdown.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3250,7 +3348,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3476,7 +3574,7 @@ choice labels.

    @@ -3620,7 +3718,7 @@ as label text. Choice labels may be any valid value accepted by @@ -3755,7 +3853,7 @@ of keeping them.

    @@ -3828,7 +3926,7 @@ of keeping them.

    @@ -3939,7 +4037,7 @@ an array of strings or null for unset values. @@ -4042,7 +4140,7 @@ not meet the validation constraints. @@ -4214,7 +4312,7 @@ registered.

    @@ -4317,7 +4415,7 @@ widget markup. @@ -4476,7 +4574,7 @@ as dirty.

    @@ -4633,7 +4731,7 @@ trigger input value validation.

    @@ -4760,7 +4858,7 @@ or null values.

    @@ -5478,7 +5576,7 @@ expression. Only applicable when create is true.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time) diff --git a/docs/jsapi/LuCI.ui.DynamicList.html b/docs/jsapi/LuCI.ui.DynamicList.html index 11b6f6332b..12fa533b32 100644 --- a/docs/jsapi/LuCI.ui.DynamicList.html +++ b/docs/jsapi/LuCI.ui.DynamicList.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3251,7 +3349,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3481,7 +3579,7 @@ arbitrary values to the dynamic list.

    @@ -3625,7 +3723,7 @@ as label text. Choice labels may be any valid value accepted by @@ -3699,7 +3797,7 @@ as label text. Choice labels may be any valid value accepted by @@ -3810,7 +3908,7 @@ an array of strings or null for unset values. @@ -3913,7 +4011,7 @@ not meet the validation constraints. @@ -4085,7 +4183,7 @@ registered.

    @@ -4188,7 +4286,7 @@ widget markup. @@ -4347,7 +4445,7 @@ as dirty.

    @@ -4504,7 +4602,7 @@ trigger input value validation.

    @@ -4631,7 +4729,7 @@ or null values.

    @@ -4855,7 +4953,7 @@ it to remain unselected.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.FileUpload.html b/docs/jsapi/LuCI.ui.FileUpload.html index d66ecde649..bb84aafecf 100644 --- a/docs/jsapi/LuCI.ui.FileUpload.html +++ b/docs/jsapi/LuCI.ui.FileUpload.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3250,7 +3348,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3445,7 +3543,7 @@ upload control.

    @@ -3556,7 +3654,7 @@ an array of strings or null for unset values. @@ -3659,7 +3757,7 @@ not meet the validation constraints. @@ -3831,7 +3929,7 @@ registered.

    @@ -3934,7 +4032,7 @@ widget markup. @@ -4093,7 +4191,7 @@ as dirty.

    @@ -4250,7 +4348,7 @@ trigger input value validation.

    @@ -4377,7 +4475,7 @@ or null values.

    @@ -4704,7 +4802,7 @@ ACL setup for the current session.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Hiddenfield.html b/docs/jsapi/LuCI.ui.Hiddenfield.html index 6e8733d702..a8130359dc 100644 --- a/docs/jsapi/LuCI.ui.Hiddenfield.html +++ b/docs/jsapi/LuCI.ui.Hiddenfield.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3250,7 +3348,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3444,7 +3542,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3555,7 +3653,7 @@ an array of strings or null for unset values. @@ -3658,7 +3756,7 @@ not meet the validation constraints. @@ -3830,7 +3928,7 @@ registered.

    @@ -3933,7 +4031,7 @@ widget markup. @@ -4092,7 +4190,7 @@ as dirty.

    @@ -4249,7 +4347,7 @@ trigger input value validation.

    @@ -4376,7 +4474,7 @@ or null values.

    @@ -4458,7 +4556,7 @@ trigger validation runs, e.g. when programmatically altering values.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Select.html b/docs/jsapi/LuCI.ui.Select.html index b6c8676868..6de142fb63 100644 --- a/docs/jsapi/LuCI.ui.Select.html +++ b/docs/jsapi/LuCI.ui.Select.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3251,7 +3349,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3479,7 +3577,7 @@ choice labels.

    @@ -3590,7 +3688,7 @@ an array of strings or null for unset values. @@ -3693,7 +3791,7 @@ not meet the validation constraints. @@ -3865,7 +3963,7 @@ registered.

    @@ -3968,7 +4066,7 @@ widget markup. @@ -4127,7 +4225,7 @@ as dirty.

    @@ -4284,7 +4382,7 @@ trigger input value validation.

    @@ -4411,7 +4509,7 @@ or null values.

    @@ -4807,7 +4905,7 @@ selected yet. Only applicable to the select widget type.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Textarea.html b/docs/jsapi/LuCI.ui.Textarea.html index a39cc8298b..0f383fbddc 100644 --- a/docs/jsapi/LuCI.ui.Textarea.html +++ b/docs/jsapi/LuCI.ui.Textarea.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3249,7 +3347,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3440,7 +3538,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3551,7 +3649,7 @@ an array of strings or null for unset values. @@ -3654,7 +3752,7 @@ not meet the validation constraints. @@ -3826,7 +3924,7 @@ registered.

    @@ -3929,7 +4027,7 @@ widget markup. @@ -4088,7 +4186,7 @@ as dirty.

    @@ -4245,7 +4343,7 @@ trigger input value validation.

    @@ -4372,7 +4470,7 @@ or null values.

    @@ -4756,7 +4854,7 @@ contents.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.Textfield.html b/docs/jsapi/LuCI.ui.Textfield.html index 2e87514e23..d3657a8c9e 100644 --- a/docs/jsapi/LuCI.ui.Textfield.html +++ b/docs/jsapi/LuCI.ui.Textfield.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3249,7 +3347,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3440,7 +3538,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3551,7 +3649,7 @@ an array of strings or null for unset values. @@ -3654,7 +3752,7 @@ not meet the validation constraints. @@ -3826,7 +3924,7 @@ registered.

    @@ -3929,7 +4027,7 @@ widget markup. @@ -4088,7 +4186,7 @@ as dirty.

    @@ -4245,7 +4343,7 @@ trigger input value validation.

    @@ -4372,7 +4470,7 @@ or null values.

    @@ -4684,7 +4782,7 @@ corresponding <input> element is empty.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.changes.html b/docs/jsapi/LuCI.ui.changes.html index ceb09d6a23..37c3aeb76f 100644 --- a/docs/jsapi/LuCI.ui.changes.html +++ b/docs/jsapi/LuCI.ui.changes.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3247,7 +3345,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3332,7 +3430,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3473,7 +3571,7 @@ settings.

    @@ -3546,7 +3644,7 @@ and offer options to revert or apply the shown changes.

    @@ -3664,7 +3762,7 @@ UCI changeset structure.

    @@ -3740,7 +3838,7 @@ complete.

    @@ -3868,7 +3966,7 @@ is removed.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.html b/docs/jsapi/LuCI.ui.html index 1d21b68f65..39222a14fa 100644 --- a/docs/jsapi/LuCI.ui.html +++ b/docs/jsapi/LuCI.ui.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@ external JavaScript, use L.require("ui").then(...).

    - ui.js, line 2929 + ui.js, line 3025 @@ -3340,6 +3438,9 @@ external JavaScript, use L.require("ui").then(...).

    Hiddenfield
    +
    menu
    +
    +
    Select
    @@ -3372,7 +3473,7 @@ external JavaScript, use L.require("ui").then(...).

    - ui.js, line 3109 + ui.js, line 3205 @@ -3602,7 +3703,7 @@ banner element.

    @@ -3916,7 +4017,7 @@ trigger field validation or to bind it to further events. @@ -4053,7 +4154,7 @@ default.

    @@ -4279,7 +4380,7 @@ valid function value. @@ -4427,7 +4528,7 @@ requested indicator was not found. @@ -4503,7 +4604,7 @@ handler as-is without the need to bind it first.

    @@ -4655,7 +4756,7 @@ catched and rendered using LuCI.error() - ui.js, line 3261 + ui.js, line 3357 @@ -4897,7 +4998,7 @@ accepted by LuCI.dom.content().

    @@ -5100,7 +5201,7 @@ or rejecting with null when the connectivity check timed out. @@ -5371,7 +5472,7 @@ changes were made. @@ -5600,7 +5701,7 @@ element.

    @@ -5958,7 +6059,7 @@ cancelled by the user.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.ui.tabs.html b/docs/jsapi/LuCI.ui.tabs.html index 88279f346c..fac9caf107 100644 --- a/docs/jsapi/LuCI.ui.tabs.html +++ b/docs/jsapi/LuCI.ui.tabs.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3248,7 +3346,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3333,7 +3431,7 @@ external JavaScript, use L.require("ui").then(...) and ac @@ -3462,7 +3560,7 @@ DOM node.

    @@ -3615,7 +3713,7 @@ DOM node.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.view.html b/docs/jsapi/LuCI.view.html index 2ea583ebb3..dbf81e9d86 100644 --- a/docs/jsapi/LuCI.view.html +++ b/docs/jsapi/LuCI.view.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3243,7 +3341,7 @@ set of methods to inherit from.

    @@ -3328,7 +3426,7 @@ set of methods to inherit from.

    @@ -3441,7 +3539,7 @@ methods are overwritten with null. @@ -3605,7 +3703,7 @@ is reenabled. @@ -3769,7 +3867,7 @@ is reenabled. @@ -3935,7 +4033,7 @@ is reenabled. @@ -4045,7 +4143,7 @@ the default implementation does nothing.

    @@ -4219,7 +4317,7 @@ to a Node value.
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/LuCI.xhr.html b/docs/jsapi/LuCI.xhr.html index 873d691c0d..99c01420d0 100644 --- a/docs/jsapi/LuCI.xhr.html +++ b/docs/jsapi/LuCI.xhr.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3246,7 +3344,7 @@ request handling.

    @@ -3333,7 +3431,7 @@ request handling.

    @@ -3407,7 +3505,7 @@ request handling.

    @@ -3510,7 +3608,7 @@ already completed. @@ -3587,7 +3685,7 @@ finishes or timed out.

    @@ -3830,7 +3928,7 @@ finishes or timed out.

    @@ -4073,7 +4171,7 @@ finishes or timed out.

    @@ -4183,7 +4281,7 @@ when invoked.

    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:41 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/form.js.html b/docs/jsapi/form.js.html index 258b4897c1..4b90165dba 100644 --- a/docs/jsapi/form.js.html +++ b/docs/jsapi/form.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3219,11 +3317,19 @@
    'use strict';
     'require ui';
     'require uci';
    +'require rpc';
     'require dom';
     'require baseclass';
     
     var scope = this;
     
    +var callSessionAccess = rpc.declare({
    +	object: 'session',
    +	method: 'access',
    +	params: [ 'scope', 'object', 'function' ],
    +	expect: { 'access': false }
    +});
    +
     var CBIJSONConfig = baseclass.extend({
     	__init__: function(data) {
     		data = Object.assign({}, data);
    @@ -3581,6 +3687,20 @@ var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
     		this.data = uci;
     	},
     
    +	/**
    +	 * Toggle readonly state of the form.
    +	 *
    +	 * If set to `true`, the Map instance is marked readonly and any form
    +	 * option elements added to it will inherit the readonly state.
    +	 *
    +	 * If left unset, the Map will test the access permission of the primary
    +	 * uci configuration upon loading and mark the form readonly if no write
    +	 * permissions are granted.
    +	 *
    +	 * @name LuCI.form.Map.prototype#readonly
    +	 * @type boolean
    +	 */
    +
     	/**
     	 * Find all DOM nodes within this Map which match the given search
     	 * parameters. This function is essentially a convenience wrapper around
    @@ -3727,8 +3847,17 @@ var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
     	 * an error.
     	 */
     	load: function() {
    -		return this.data.load(this.parsechain || [ this.config ])
    -			.then(this.loadChildren.bind(this));
    +		var doCheckACL = (!(this instanceof CBIJSONMap) && this.readonly == null);
    +
    +		return Promise.all([
    +			doCheckACL ? callSessionAccess('uci', this.config, 'write') : true,
    +			this.data.load(this.parsechain || [ this.config ])
    +		]).then(L.bind(function(res) {
    +			if (res[0] === false)
    +				this.readonly = true;
    +
    +			return this.loadChildren();
    +		}, this));
     	},
     
     	/**
    @@ -3782,11 +3911,18 @@ var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
     			.then(this.data.save.bind(this.data))
     			.then(this.load.bind(this))
     			.catch(function(e) {
    -				if (!silent)
    -					alert('Cannot save due to invalid values');
    +				if (!silent) {
    +					ui.showModal(_('Save error'), [
    +						E('p', {}, [ _('An error occurred while saving the form:') ]),
    +						E('p', {}, [ E('em', { 'style': 'white-space:pre' }, [ e.message ]) ]),
    +						E('div', { 'class': 'right' }, [
    +							E('button', { 'click': ui.hideModal }, [ _('Dismiss') ])
    +						])
    +					]);
    +				}
     
    -				return Promise.reject();
    -			}).finally(this.renderContents.bind(this));
    +				return Promise.reject(e);
    +			}).then(this.renderContents.bind(this));
     	},
     
     	/**
    @@ -4519,6 +4655,19 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
     	 * @default null
     	 */
     
    +	/**
    +	 * Make option element readonly.
    +	 *
    +	 * This property defaults to the readonly state of the parent form element.
    +	 * When set to `true`, the underlying widget is rendered in disabled state,
    +	 * means its contents cannot be changed and the widget cannot be interacted
    +	 * with.
    +	 *
    +	 * @name LuCI.form.AbstractValue.prototype#readonly
    +	 * @type boolean
    +	 * @default false
    +	 */
    +
     	/**
     	 * Override the cell width of a table or grid section child option.
     	 *
    @@ -4972,8 +5121,10 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
     		    cval = this.cfgvalue(section_id),
     		    fval = active ? this.formvalue(section_id) : null;
     
    -		if (active && !this.isValid(section_id))
    -			return Promise.reject();
    +		if (active && !this.isValid(section_id)) {
    +			var title = this.stripTags(this.title).trim();
    +			return Promise.reject(new TypeError(_('Option "%s" contains an invalid input value.').format(title || this.option)));
    +		}
     
     		if (fval != '' && fval != null) {
     			if (this.forcewrite || !isEqual(cval, fval))
    @@ -4984,8 +5135,8 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
     				return Promise.resolve(this.remove(section_id));
     			}
     			else if (!isEqual(cval, fval)) {
    -				console.log('This should have been catched by isValid()');
    -				return Promise.reject();
    +				var title = this.stripTags(this.title).trim();
    +				return Promise.reject(new TypeError(_('Option "%s" must not be empty.').format(title || this.option)));
     			}
     		}
     
    @@ -5169,13 +5320,15 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
     			createEl.appendChild(E('button', {
     				'class': 'cbi-button cbi-button-add',
     				'title': btn_title || _('Add'),
    -				'click': ui.createHandlerFn(this, 'handleAdd')
    +				'click': ui.createHandlerFn(this, 'handleAdd'),
    +				'disabled': this.map.readonly || null
     			}, [ btn_title || _('Add') ]));
     		}
     		else {
     			var nameEl = E('input', {
     				'type': 'text',
    -				'class': 'cbi-section-create-name'
    +				'class': 'cbi-section-create-name',
    +				'disabled': this.map.readonly || null
     			});
     
     			dom.append(createEl, [
    @@ -5190,7 +5343,8 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
     							return;
     
     						return this.handleAdd(ev, nameEl.value);
    -					})
    +					}),
    +					'disabled': this.map.readonly || null
     				})
     			]);
     
    @@ -5233,7 +5387,8 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
     							'class': 'cbi-button',
     							'name': 'cbi.rts.%s.%s'.format(config_name, cfgsections[i]),
     							'data-section-id': cfgsections[i],
    -							'click': ui.createHandlerFn(this, 'handleRemove', cfgsections[i])
    +							'click': ui.createHandlerFn(this, 'handleRemove', cfgsections[i]),
    +							'disabled': this.map.readonly || null
     						}, [ _('Delete') ])));
     			}
     
    @@ -5609,7 +5764,8 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
     				E('div', {
     					'title': _('Drag to reorder'),
     					'class': 'btn cbi-button drag-handle center',
    -					'style': 'cursor:move'
    +					'style': 'cursor:move',
    +					'disabled': this.map.readonly || null
     				}, '☰')
     			]);
     		}
    @@ -5650,7 +5806,8 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
     				E('button', {
     					'title': btn_title || _('Delete'),
     					'class': 'cbi-button cbi-button-remove',
    -					'click': ui.createHandlerFn(this, 'handleRemove', section_id)
    +					'click': ui.createHandlerFn(this, 'handleRemove', section_id),
    +					'disabled': this.map.readonly || null
     				}, [ btn_title || _('Delete') ])
     			);
     		}
    @@ -5801,6 +5958,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
     		    s = m.section(CBINamedSection, section_id, this.sectiontype);
     
     		m.parent = parent;
    +		m.readonly = parent.readonly;
     
     		s.tabs = this.tabs;
     		s.tab_names = this.tab_names;
    @@ -5848,7 +6006,8 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
     					}, [ _('Dismiss') ]), ' ',
     					E('button', {
     						'class': 'cbi-button cbi-button-positive important',
    -						'click': ui.createHandlerFn(this, 'handleModalSave', m)
    +						'click': ui.createHandlerFn(this, 'handleModalSave', m),
    +						'disabled': m.readonly || null
     					}, [ _('Save') ])
     				])
     			], 'cbi-modal');
    @@ -6135,7 +6294,8 @@ var CBINamedSection = CBIAbstractSection.extend(/** @lends LuCI.form.NamedSectio
     					E('div', { 'class': 'cbi-section-remove right' },
     						E('button', {
     							'class': 'cbi-button',
    -							'click': ui.createHandlerFn(this, 'handleRemove')
    +							'click': ui.createHandlerFn(this, 'handleRemove'),
    +							'disabled': this.map.readonly || null
     						}, [ _('Delete') ])));
     			}
     
    @@ -6150,7 +6310,8 @@ var CBINamedSection = CBIAbstractSection.extend(/** @lends LuCI.form.NamedSectio
     			sectionEl.appendChild(
     				E('button', {
     					'class': 'cbi-button cbi-button-add',
    -					'click': ui.createHandlerFn(this, 'handleAdd')
    +					'click': ui.createHandlerFn(this, 'handleAdd'),
    +					'disabled': this.map.readonly || null
     				}, [ _('Add') ]));
     		}
     
    @@ -6344,7 +6505,8 @@ var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
     				optional: this.optional || this.rmempty,
     				datatype: this.datatype,
     				select_placeholder: this.placeholder || placeholder,
    -				validate: L.bind(this.validate, this, section_id)
    +				validate: L.bind(this.validate, this, section_id),
    +				disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     			});
     		}
     		else {
    @@ -6354,7 +6516,8 @@ var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
     				optional: this.optional || this.rmempty,
     				datatype: this.datatype,
     				placeholder: this.placeholder,
    -				validate: L.bind(this.validate, this, section_id)
    +				validate: L.bind(this.validate, this, section_id),
    +				disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     			});
     		}
     
    @@ -6409,7 +6572,8 @@ var CBIDynamicList = CBIValue.extend(/** @lends LuCI.form.DynamicList.prototype
     			optional: this.optional || this.rmempty,
     			datatype: this.datatype,
     			placeholder: this.placeholder,
    -			validate: L.bind(this.validate, this, section_id)
    +			validate: L.bind(this.validate, this, section_id),
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return widget.render();
    @@ -6474,7 +6638,8 @@ var CBIListValue = CBIValue.extend(/** @lends LuCI.form.ListValue.prototype */ {
     			sort: this.keylist,
     			optional: this.optional,
     			placeholder: this.placeholder,
    -			validate: L.bind(this.validate, this, section_id)
    +			validate: L.bind(this.validate, this, section_id),
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return widget.render();
    @@ -6545,7 +6710,8 @@ var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
     			id: this.cbid(section_id),
     			value_enabled: this.enabled,
     			value_disabled: this.disabled,
    -			validate: L.bind(this.validate, this, section_id)
    +			validate: L.bind(this.validate, this, section_id),
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return widget.render();
    @@ -6584,8 +6750,10 @@ var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
     		if (this.isActive(section_id)) {
     			var fval = this.formvalue(section_id);
     
    -			if (!this.isValid(section_id))
    -				return Promise.reject();
    +			if (!this.isValid(section_id)) {
    +				var title = this.stripTags(this.title).trim();
    +				return Promise.reject(new TypeError(_('Option "%s" contains an invalid input value.').format(title || this.option)));
    +			}
     
     			if (fval == this.default && (this.optional || this.rmempty))
     				return Promise.resolve(this.remove(section_id));
    @@ -6671,7 +6839,8 @@ var CBIMultiValue = CBIDynamicList.extend(/** @lends LuCI.form.MultiValue.protot
     			select_placeholder: this.placeholder,
     			display_items: this.display_size || this.size || 3,
     			dropdown_items: this.dropdown_size || this.size || -1,
    -			validate: L.bind(this.validate, this, section_id)
    +			validate: L.bind(this.validate, this, section_id),
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return widget.render();
    @@ -6763,7 +6932,8 @@ var CBITextValue = CBIValue.extend(/** @lends LuCI.form.TextValue.prototype */ {
     			cols: this.cols,
     			rows: this.rows,
     			wrap: this.wrap,
    -			validate: L.bind(this.validate, this, section_id)
    +			validate: L.bind(this.validate, this, section_id),
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return widget.render();
    @@ -6833,7 +7003,7 @@ var CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype */
     		    hiddenEl = new ui.Hiddenfield(value, { id: this.cbid(section_id) }),
     		    outputEl = E('div');
     
    -		if (this.href)
    +		if (this.href && !((this.readonly != null) ? this.readonly : this.map.readonly))
     			outputEl.appendChild(E('a', { 'href': this.href }));
     
     		dom.append(outputEl.lastChild || outputEl,
    @@ -6954,7 +7124,8 @@ var CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototype
     
     						ev.currentTarget.parentNode.nextElementSibling.value = value;
     						return this.map.save();
    -					}, section_id)
    +					}, section_id),
    +					'disabled': ((this.readonly != null) ? this.readonly : this.map.readonly) || null
     				}, [ btn_title ])
     			]);
     		else
    @@ -7129,7 +7300,8 @@ var CBIFileUpload = CBIValue.extend(/** @lends LuCI.form.FileUpload.prototype */
     			show_hidden: this.show_hidden,
     			enable_upload: this.enable_upload,
     			enable_remove: this.enable_remove,
    -			root_directory: this.root_directory
    +			root_directory: this.root_directory,
    +			disabled: (this.readonly != null) ? this.readonly : this.map.readonly
     		});
     
     		return browserEl.render();
    @@ -7338,7 +7510,7 @@ return baseclass.extend(/** @lends LuCI.form.prototype */ {
             
     
             
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/fs.js.html b/docs/jsapi/fs.js.html index a356962f04..160faf2000 100644 --- a/docs/jsapi/fs.js.html +++ b/docs/jsapi/fs.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@
  • +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3657,7 +3755,7 @@ return FileSystem;
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/index.html b/docs/jsapi/index.html index 59a6b953d0..e510e37dd4 100644 --- a/docs/jsapi/index.html +++ b/docs/jsapi/index.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3244,7 +3342,7 @@
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/luci.js.html b/docs/jsapi/luci.js.html index 33dab57164..4c146ef388 100644 --- a/docs/jsapi/luci.js.html +++ b/docs/jsapi/luci.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3230,6 +3328,8 @@ (function(window, document, undefined) { 'use strict'; + var env = {}; + /* Object.assign polyfill for IE */ if (typeof Object.assign !== 'function') { Object.defineProperty(Object, 'assign', { @@ -4287,7 +4387,7 @@ */ add: function(fn, interval) { if (interval == null || interval <= 0) - interval = window.L ? window.L.env.pollinterval : null; + interval = env.pollinterval || null; if (isNaN(interval) || typeof(fn) != 'function') throw new TypeError('Invalid argument to LuCI.poll.add()'); @@ -4429,7 +4529,7 @@ * To import the class in views, use `'require dom'`, to import it in * external JavaScript, use `L.require("dom").then(...)`. */ - var DOM = Class.singleton(/* @lends LuCI.dom.prototype */ { + var DOM = Class.singleton(/** @lends LuCI.dom.prototype */ { __name__: 'LuCI.dom', /** @@ -4934,7 +5034,7 @@ */ bindClassInstance: function(node, inst) { if (!(inst instanceof Class)) - L.error('TypeError', 'Argument must be a class instance'); + LuCI.prototype.error('TypeError', 'Argument must be a class instance'); return this.data(node, '_class', inst); }, @@ -5041,6 +5141,101 @@ } }); + /** + * @class session + * @memberof LuCI + * @hideconstructor + * @classdesc + * + * The `session` class provides various session related functionality. + */ + var Session = Class.singleton(/** @lends LuCI.session.prototype */ { + __name__: 'LuCI.session', + + /** + * Retrieve the current session ID. + * + * @returns {string} + * Returns the current session ID. + */ + getID: function() { + return env.sessionid || '00000000000000000000000000000000'; + }, + + /** + * Retrieve data from the local session storage. + * + * @param {string} [key] + * The key to retrieve from the session data store. If omitted, all + * session data will be returned. + * + * @returns {*} + * Returns the stored session data or `null` if the given key wasn't + * found. + */ + getLocalData: function(key) { + try { + var sid = this.getID(), + item = 'luci-session-store', + data = JSON.parse(window.sessionStorage.getItem(item)); + + if (!LuCI.prototype.isObject(data) || !data.hasOwnProperty(sid)) { + data = {}; + data[sid] = {}; + } + + if (key != null) + return data[sid].hasOwnProperty(key) ? data[sid][key] : null; + + return data[sid]; + } + catch (e) { + return (key != null) ? null : {}; + } + }, + + /** + * Set data in the local session storage. + * + * @param {string} key + * The key to set in the session data store. + * + * @param {*} value + * The value to store. It will be internally converted to JSON before + * being put in the session store. + * + * @returns {boolean} + * Returns `true` if the data could be stored or `false` on error. + */ + setLocalData: function(key, value) { + if (key == null) + return false; + + try { + var sid = this.getID(), + item = 'luci-session-store', + data = JSON.parse(window.sessionStorage.getItem(item)); + + if (!LuCI.prototype.isObject(data) || !data.hasOwnProperty(sid)) { + data = {}; + data[sid] = {}; + } + + if (value != null) + data[sid][key] = value; + else + delete data[sid][key]; + + window.sessionStorage.setItem(item, JSON.stringify(data)); + + return true; + } + catch (e) { + return false; + } + } + }); + /** * @class view * @memberof LuCI @@ -5050,7 +5245,7 @@ * The `view` class forms the basis of views and provides a standard * set of methods to inherit from. */ - var View = Class.extend(/* @lends LuCI.view.prototype */ { + var View = Class.extend(/** @lends LuCI.view.prototype */ { __name__: 'LuCI.view', __init__: function() { @@ -5059,13 +5254,13 @@ DOM.content(vp, E('div', { 'class': 'spinning' }, _('Loading view…'))); return Promise.resolve(this.load()) - .then(L.bind(this.render, this)) - .then(L.bind(function(nodes) { + .then(LuCI.prototype.bind(this.render, this)) + .then(LuCI.prototype.bind(function(nodes) { var vp = document.getElementById('view'); DOM.content(vp, nodes); DOM.append(vp, this.addFooter()); - }, this)).catch(L.error); + }, this)).catch(LuCI.prototype.error); }, /** @@ -5199,7 +5394,7 @@ */ handleSaveApply: function(ev, mode) { return this.handleSave(ev).then(function() { - L.ui.changes.apply(mode == '0'); + classes.ui.changes.apply(mode == '0'); }); }, @@ -5269,9 +5464,25 @@ * methods are overwritten with `null`. */ addFooter: function() { - var footer = E([]); + var footer = E([]), + vp = document.getElementById('view'), + hasmap = false, + readonly = true; + + vp.querySelectorAll('.cbi-map').forEach(function(map) { + var m = DOM.findClassInstance(map); + if (m) { + hasmap = true; + + if (!m.readonly) + readonly = false; + } + }); + + if (!hasmap) + readonly = !LuCI.prototype.hasViewPermission(); - var saveApplyBtn = this.handleSaveApply ? new L.ui.ComboButton('0', { + var saveApplyBtn = this.handleSaveApply ? new classes.ui.ComboButton('0', { 0: [ _('Save & Apply') ], 1: [ _('Apply unchecked') ] }, { @@ -5279,7 +5490,8 @@ 0: 'btn cbi-button cbi-button-apply important', 1: 'btn cbi-button cbi-button-negative important' }, - click: L.ui.createHandlerFn(this, 'handleSaveApply') + click: classes.ui.createHandlerFn(this, 'handleSaveApply'), + disabled: readonly || null }).render() : E([]); if (this.handleSaveApply || this.handleSave || this.handleReset) { @@ -5287,11 +5499,13 @@ saveApplyBtn, ' ', this.handleSave ? E('button', { 'class': 'cbi-button cbi-button-save', - 'click': L.ui.createHandlerFn(this, 'handleSave') + 'click': classes.ui.createHandlerFn(this, 'handleSave'), + 'disabled': readonly || null }, [ _('Save') ]) : '', ' ', this.handleReset ? E('button', { 'class': 'cbi-button cbi-button-reset', - 'click': L.ui.createHandlerFn(this, 'handleReset') + 'click': classes.ui.createHandlerFn(this, 'handleReset'), + 'disabled': readonly || null }, [ _('Reset') ]) : '' ])); } @@ -5305,7 +5519,8 @@ domParser = null, originalCBIInit = null, rpcBaseURL = null, - sysFeatures = null; + sysFeatures = null, + preloadClasses = null; /* "preload" builtin classes to make the available via require */ var classes = { @@ -5313,41 +5528,30 @@ dom: DOM, poll: Poll, request: Request, + session: Session, view: View }; var LuCI = Class.extend(/** @lends LuCI.prototype */ { __name__: 'LuCI', - __init__: function(env) { + __init__: function(setenv) { document.querySelectorAll('script[src*="/luci.js"]').forEach(function(s) { - if (env.base_url == null || env.base_url == '') { + if (setenv.base_url == null || setenv.base_url == '') { var m = (s.getAttribute('src') || '').match(/^(.*)\/luci\.js(?:\?v=([^?]+))?$/); if (m) { - env.base_url = m[1]; - env.resource_version = m[2]; + setenv.base_url = m[1]; + setenv.resource_version = m[2]; } } }); - if (env.base_url == null) + if (setenv.base_url == null) this.error('InternalError', 'Cannot find url of luci.js'); - env.cgi_base = env.scriptname.replace(/\/[^\/]+$/, ''); - - Object.assign(this.env, env); + setenv.cgi_base = setenv.scriptname.replace(/\/[^\/]+$/, ''); - document.addEventListener('poll-start', function(ev) { - document.querySelectorAll('[id^="xhr_poll_status"]').forEach(function(e) { - e.style.display = (e.id == 'xhr_poll_status_off') ? 'none' : ''; - }); - }); - - document.addEventListener('poll-stop', function(ev) { - document.querySelectorAll('[id^="xhr_poll_status"]').forEach(function(e) { - e.style.display = (e.id == 'xhr_poll_status_on') ? 'none' : ''; - }); - }); + Object.assign(env, setenv); var domReady = new Promise(function(resolveFn, rejectFn) { document.addEventListener('DOMContentLoaded', resolveFn); @@ -5457,12 +5661,13 @@ */ error: function(type, fmt /*, ...*/) { try { - L.raise.apply(L, Array.prototype.slice.call(arguments)); + LuCI.prototype.raise.apply(LuCI.prototype, + Array.prototype.slice.call(arguments)); } catch (e) { if (!e.reported) { - if (L.ui) - L.ui.addNotification(e.name || _('Runtime error'), + if (classes.ui) + classes.ui.addNotification(e.name || _('Runtime error'), E('pre', {}, e.message), 'danger'); else DOM.content(document.querySelector('#maincontent'), @@ -5541,19 +5746,19 @@ if (classes[name] != null) { /* Circular dependency */ if (from.indexOf(name) != -1) - L.raise('DependencyError', + LuCI.prototype.raise('DependencyError', 'Circular dependency: class "%s" depends on "%s"', name, from.join('" which depends on "')); return Promise.resolve(classes[name]); } - url = '%s/%s.js%s'.format(L.env.base_url, name.replace(/\./g, '/'), (L.env.resource_version ? '?v=' + L.env.resource_version : '')); + url = '%s/%s.js%s'.format(env.base_url, name.replace(/\./g, '/'), (env.resource_version ? '?v=' + env.resource_version : '')); from = [ name ].concat(from); var compileClass = function(res) { if (!res.ok) - L.raise('NetworkError', + LuCI.prototype.raise('NetworkError', 'HTTP error %d while loading class file "%s"', res.status, url); var source = res.text(), @@ -5578,7 +5783,7 @@ if (m) { var dep = m[1], as = m[2] || dep.replace(/[^a-zA-Z0-9_]/g, '_'); - depends.push(L.require(dep, from)); + depends.push(LuCI.prototype.require(dep, from)); args += ', ' + as; } else if (!strictmatch.exec(s)) { @@ -5604,7 +5809,7 @@ .format(args, source, res.url)); } catch (error) { - L.raise('SyntaxError', '%s\n in %s:%s', + LuCI.prototype.raise('SyntaxError', '%s\n in %s:%s', error.message, res.url, error.lineNumber || '?'); } @@ -5612,7 +5817,7 @@ _class = _factory.apply(_factory, [window, document, L].concat(instances)); if (!Class.isSubclass(_class)) - L.error('TypeError', '"%s" factory yields invalid constructor', name); + LuCI.prototype.error('TypeError', '"%s" factory yields invalid constructor', name); if (_class.displayName == 'AnonymousClass') _class.displayName = toCamelCase(name + 'Class'); @@ -5641,26 +5846,18 @@ /* DOM setup */ probeRPCBaseURL: function() { - if (rpcBaseURL == null) { - try { - rpcBaseURL = window.sessionStorage.getItem('rpcBaseURL'); - } - catch (e) { } - } + if (rpcBaseURL == null) + rpcBaseURL = Session.getLocalData('rpcBaseURL'); if (rpcBaseURL == null) { var rpcFallbackURL = this.url('admin/ubus'); - rpcBaseURL = Request.get(this.env.ubuspath).then(function(res) { - return (rpcBaseURL = (res.status == 400) ? L.env.ubuspath : rpcFallbackURL); + rpcBaseURL = Request.get(env.ubuspath).then(function(res) { + return (rpcBaseURL = (res.status == 400) ? env.ubuspath : rpcFallbackURL); }, function() { return (rpcBaseURL = rpcFallbackURL); }).then(function(url) { - try { - window.sessionStorage.setItem('rpcBaseURL', url); - } - catch (e) { } - + Session.setLocalData('rpcBaseURL', url); return url; }); } @@ -5669,17 +5866,8 @@ }, probeSystemFeatures: function() { - var sessionid = classes.rpc.getSessionID(); - - if (sysFeatures == null) { - try { - var data = JSON.parse(window.sessionStorage.getItem('sysFeatures')); - - if (this.isObject(data) && this.isObject(data[sessionid])) - sysFeatures = data[sessionid]; - } - catch (e) {} - } + if (sysFeatures == null) + sysFeatures = Session.getLocalData('features'); if (!this.isObject(sysFeatures)) { sysFeatures = classes.rpc.declare({ @@ -5687,14 +5875,7 @@ method: 'getFeatures', expect: { '': {} } })().then(function(features) { - try { - var data = {}; - data[sessionid] = features; - - window.sessionStorage.setItem('sysFeatures', JSON.stringify(data)); - } - catch (e) {} - + Session.setLocalData('features', features); sysFeatures = features; return features; @@ -5704,6 +5885,39 @@ return Promise.resolve(sysFeatures); }, + probePreloadClasses: function() { + if (preloadClasses == null) + preloadClasses = Session.getLocalData('preload'); + + if (!Array.isArray(preloadClasses)) { + preloadClasses = this.resolveDefault(classes.rpc.declare({ + object: 'file', + method: 'list', + params: [ 'path' ], + expect: { 'entries': [] } + })(this.fspath(this.resource('preload'))), []).then(function(entries) { + var classes = []; + + for (var i = 0; i < entries.length; i++) { + if (entries[i].type != 'file') + continue; + + var m = entries[i].name.match(/(.+)\.js$/); + + if (m) + classes.push('preload.%s'.format(m[1])); + } + + Session.setLocalData('preload', classes); + preloadClasses = classes; + + return classes; + }); + } + + return Promise.resolve(preloadClasses); + }, + /** * Test whether a particular system feature is available, such as * hostapd SAE support or an installed firewall. The features are @@ -5742,7 +5956,7 @@ notifySessionExpiry: function() { Poll.stop(); - L.ui.showModal(_('Session expired'), [ + classes.ui.showModal(_('Session expired'), [ E('div', { class: 'alert-message warning' }, _('A new login is required since the authentication session expired.')), E('div', { class: 'right' }, @@ -5755,7 +5969,7 @@ }, _('To login…'))) ]); - L.raise('SessionError', 'Login session is expired'); + LuCI.prototype.raise('SessionError', 'Login session is expired'); }, /* private */ @@ -5769,10 +5983,13 @@ rpcClass.setBaseURL(rpcBaseURL); rpcClass.addInterceptor(function(msg, req) { - if (!L.isObject(msg) || !L.isObject(msg.error) || msg.error.code != -32002) + if (!LuCI.prototype.isObject(msg) || + !LuCI.prototype.isObject(msg.error) || + msg.error.code != -32002) return; - if (!L.isObject(req) || (req.object == 'session' && req.method == 'access')) + if (!LuCI.prototype.isObject(req) || + (req.object == 'session' && req.method == 'access')) return; return rpcClass.declare({ @@ -5780,7 +5997,7 @@ 'method': 'access', 'params': [ 'scope', 'object', 'function' ], 'expect': { access: true } - })('uci', 'luci', 'read').catch(L.notifySessionExpiry); + })('uci', 'luci', 'read').catch(LuCI.prototype.notifySessionExpiry); }); Request.addInterceptor(function(res) { @@ -5792,10 +6009,31 @@ if (!isDenied) return; - L.notifySessionExpiry(); + LuCI.prototype.notifySessionExpiry(); + }); + + document.addEventListener('poll-start', function(ev) { + uiClass.showIndicator('poll-status', _('Refreshing'), function(ev) { + Request.poll.active() ? Request.poll.stop() : Request.poll.start(); + }); + }); + + document.addEventListener('poll-stop', function(ev) { + uiClass.showIndicator('poll-status', _('Paused'), null, 'inactive'); }); - return this.probeSystemFeatures().finally(this.initDOM); + return Promise.all([ + this.probeSystemFeatures(), + this.probePreloadClasses() + ]).finally(LuCI.prototype.bind(function() { + var tasks = []; + + if (Array.isArray(preloadClasses)) + for (var i = 0; i < preloadClasses.length; i++) + tasks.push(this.require(preloadClasses[i])); + + return Promise.all(tasks); + }, this)).finally(this.initDOM); }, /* private */ @@ -5812,7 +6050,38 @@ * @instance * @memberof LuCI */ - env: {}, + env: env, + + /** + * Construct an absolute filesystem path relative to the server + * document root. + * + * @instance + * @memberof LuCI + * + * @param {...string} [parts] + * An array of parts to join into a path. + * + * @return {string} + * Return the joined path. + */ + fspath: function(/* ... */) { + var path = env.documentroot; + + for (var i = 0; i < arguments.length; i++) + path += '/' + arguments[i]; + + var p = path.replace(/\/+$/, '').replace(/\/+/g, '/').split(/\//), + res = []; + + for (var i = 0; i < p.length; i++) + if (p[i] == '..') + res.pop(); + else if (p[i] != '.') + res.push(p[i]); + + return res.join('/'); + }, /** * Construct a relative URL path from the given prefix and parts. @@ -5866,7 +6135,7 @@ * Returns the resulting URL path. */ url: function() { - return this.path(this.env.scriptname, arguments); + return this.path(env.scriptname, arguments); }, /** @@ -5888,7 +6157,7 @@ * Returns the resulting URL path. */ resource: function() { - return this.path(this.env.resource, arguments); + return this.path(env.resource, arguments); }, /** @@ -5910,7 +6179,7 @@ * Returns the resulting URL path. */ media: function() { - return this.path(this.env.media, arguments); + return this.path(env.media, arguments); }, /** @@ -5923,7 +6192,7 @@ * Returns the URL path to the current view. */ location: function() { - return this.path(this.env.scriptname, this.env.requestpath); + return this.path(env.scriptname, env.requestpath); }, @@ -6167,9 +6436,9 @@ */ poll: function(interval, url, args, cb, post) { if (interval !== null && interval <= 0) - interval = this.env.pollinterval; + interval = env.pollinterval; - var data = post ? { token: this.env.token } : null, + var data = post ? { token: env.token } : null, method = post ? 'POST' : 'GET'; if (!/^(?:\/|\S+:\/\/)/.test(url)) @@ -6190,6 +6459,22 @@ }); }, + /** + * Check whether a view has sufficient permissions. + * + * @return {boolean|null} + * Returns `null` if the current session has no permission at all to + * load resources required by the view. Returns `false` if readonly + * permissions are granted or `true` if at least one required ACL + * group is granted with write permissions. + */ + hasViewPermission: function() { + if (!this.isObject(env.nodespec) || !env.nodespec.satisfied) + return null; + + return !env.nodespec.readonly; + }, + /** * Deprecated wrapper around {@link LuCI.poll.remove Poll.remove()}. * @@ -6333,7 +6618,7 @@ */ get: function(url, data, callback, timeout) { this.active = true; - L.get(url, data, this._response.bind(this, callback), timeout); + LuCI.prototype.get(url, data, this._response.bind(this, callback), timeout); }, /** @@ -6360,7 +6645,7 @@ */ post: function(url, data, callback, timeout) { this.active = true; - L.post(url, data, this._response.bind(this, callback), timeout); + LuCI.prototype.post(url, data, this._response.bind(this, callback), timeout); }, /** @@ -6414,12 +6699,12 @@ * Throws an `InternalError` with the message `Not implemented` * when invoked. */ - send_form: function() { L.error('InternalError', 'Not implemented') }, + send_form: function() { LuCI.prototype.error('InternalError', 'Not implemented') }, }); - XHR.get = function() { return window.L.get.apply(window.L, arguments) }; - XHR.post = function() { return window.L.post.apply(window.L, arguments) }; - XHR.poll = function() { return window.L.poll.apply(window.L, arguments) }; + XHR.get = function() { return LuCI.prototype.get.apply(LuCI.prototype, arguments) }; + XHR.post = function() { return LuCI.prototype.post.apply(LuCI.prototype, arguments) }; + XHR.poll = function() { return LuCI.prototype.poll.apply(LuCI.prototype, arguments) }; XHR.stop = Request.poll.remove.bind(Request.poll); XHR.halt = Request.poll.stop.bind(Request.poll); XHR.run = Request.poll.start.bind(Request.poll); @@ -6440,7 +6725,7 @@
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/network.js.html b/docs/jsapi/network.js.html index 80d5f395c5..d11dfe2d46 100644 --- a/docs/jsapi/network.js.html +++ b/docs/jsapi/network.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3326,7 +3424,7 @@ function getProtocolHandlers(cache) { Object.assign(protos, { none: { no_device: false } }); /* Hack: emulate relayd protocol */ - if (!protos.hasOwnProperty('relay')) + if (!protos.hasOwnProperty('relay') && L.hasSystemFeature('relayd')) Object.assign(protos, { relay: { no_device: true } }); Object.assign(_protospecs, protos); @@ -3574,7 +3672,9 @@ function initNetworkState(refresh) { L.resolveDefault(callLuciWirelessDevices(), {}), L.resolveDefault(callLuciHostHints(), {}), getProtocolHandlers(), - uci.load(['network', 'wireless', 'luci']) + L.resolveDefault(uci.load('network')), + L.resolveDefault(uci.load('wireless')), + L.resolveDefault(uci.load('luci')) ]).then(function(data) { var netifd_ifaces = data[0], board_json = data[1], @@ -7372,7 +7472,7 @@ return Network;
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/rpc.js.html b/docs/jsapi/rpc.js.html index a1501a7234..34a41e33c5 100644 --- a/docs/jsapi/rpc.js.html +++ b/docs/jsapi/rpc.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3311,6 +3409,10 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ { ret = msg.result; } else if (Array.isArray(msg.result)) { + if (req.raise && msg.result[0] !== 0) + L.raise('RPCError', 'RPC call to %s/%s failed with ubus code %d: %s', + req.object, req.method, msg.result[0], this.getStatusText(msg.result[0])); + ret = (msg.result.length > 1) ? msg.result[1] : msg.result[0]; } @@ -3446,6 +3548,10 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ { * Specfies an optional filter function which is invoked to transform the * received reply data before it is returned to the caller. * + * @property {boolean} [reject=false] + * If set to `true`, non-zero ubus call status codes are treated as fatal + * error and lead to the rejection of the call promise. The default + * behaviour is to resolve with the call return code value instead. */ /** @@ -3534,7 +3640,8 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ { params: params, priv: priv, object: options.object, - method: options.method + method: options.method, + raise: options.reject }; /* build message object */ @@ -3707,7 +3814,7 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ {
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/uci.js.html b/docs/jsapi/uci.js.html index de42aca25c..d71dc0a054 100644 --- a/docs/jsapi/uci.js.html +++ b/docs/jsapi/uci.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3249,44 +3347,50 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { object: 'uci', method: 'get', params: [ 'config' ], - expect: { values: { } } + expect: { values: { } }, + reject: true }), - callOrder: rpc.declare({ object: 'uci', method: 'order', - params: [ 'config', 'sections' ] + params: [ 'config', 'sections' ], + reject: true }), callAdd: rpc.declare({ object: 'uci', method: 'add', params: [ 'config', 'type', 'name', 'values' ], - expect: { section: '' } + expect: { section: '' }, + reject: true }), callSet: rpc.declare({ object: 'uci', method: 'set', - params: [ 'config', 'section', 'values' ] + params: [ 'config', 'section', 'values' ], + reject: true }), callDelete: rpc.declare({ object: 'uci', method: 'delete', - params: [ 'config', 'section', 'options' ] + params: [ 'config', 'section', 'options' ], + reject: true }), callApply: rpc.declare({ object: 'uci', method: 'apply', - params: [ 'timeout', 'rollback' ] + params: [ 'timeout', 'rollback' ], + reject: true }), callConfirm: rpc.declare({ object: 'uci', - method: 'confirm' + method: 'confirm', + reject: true }), @@ -3765,9 +3869,13 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { c[conf][sid] = {}; /* undelete option */ - if (d[conf] && d[conf][sid]) + if (d[conf] && d[conf][sid]) { d[conf][sid] = d[conf][sid].filter(function(o) { return o !== opt }); + if (d[conf][sid].length == 0) + delete d[conf][sid]; + } + c[conf][sid][opt] = val; } else { @@ -4002,22 +4110,22 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { if (n) for (var conf in n) { for (var sid in n[conf]) { - var r = { + var p = { config: conf, values: { } }; for (var k in n[conf][sid]) { if (k == '.type') - r.type = n[conf][sid][k]; + p.type = n[conf][sid][k]; else if (k == '.create') - r.name = n[conf][sid][k]; + p.name = n[conf][sid][k]; else if (k.charAt(0) != '.') - r.values[k] = n[conf][sid][k]; + p.values[k] = n[conf][sid][k]; } snew.push(n[conf][sid]); - tasks.push(self.callAdd(r.config, r.type, r.name, r.values)); + tasks.push(self.callAdd(p.config, p.type, p.name, p.values)); } pkgs[conf] = true; @@ -4172,7 +4280,7 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ {
    - Documentation generated by JSDoc 3.6.3 on Tue Apr 07 2020 16:33:40 GMT+0200 (Central European Summer Time) + Documentation generated by JSDoc 3.6.3 on Thu Apr 16 2020 13:30:42 GMT+0200 (Central European Summer Time)
    diff --git a/docs/jsapi/ui.js.html b/docs/jsapi/ui.js.html index 3734562794..d20fe4056b 100644 --- a/docs/jsapi/ui.js.html +++ b/docs/jsapi/ui.js.html @@ -74,12 +74,16 @@
  • error
  • +
  • fspath
  • +
  • get
  • halt
  • hasSystemFeature
  • +
  • hasViewPermission
  • +
  • isObject
  • location
  • @@ -331,6 +335,8 @@
  • optional
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -423,6 +429,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -511,6 +519,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -595,6 +605,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -687,6 +699,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -775,6 +789,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -929,6 +945,8 @@
  • placeholder
  • +
  • readonly
  • +
  • rmempty
  • uciconfig
  • @@ -997,6 +1015,10 @@ +
  • + + LuCI.ui.menu + + +
      + +
    + +
      + +
    + +
      + +
    +
  • +
  • LuCI.ui.Select @@ -3220,6 +3318,7 @@ 'require validation'; 'require baseclass'; 'require request'; +'require session'; 'require poll'; 'require dom'; 'require rpc'; @@ -3277,6 +3376,11 @@ var UIElement = baseclass.extend(/** @lends LuCI.ui.AbstractElement.prototype */ * standard validation constraints are checked. The function should return * `true` to accept the given input value. Any other return value type is * converted to a string and treated as validation error message. + * + * @property {boolean} [disabled=false] + * Specifies whether the widget should be rendered in disabled state + * (`true`) or not (`false`). Disabled widgets cannot be interacted with + * and are displayed in a slightly faded style. */ /** @@ -3540,6 +3644,7 @@ var UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ { 'type': this.options.password ? 'password' : 'text', 'class': this.options.password ? 'cbi-input-password' : 'cbi-input-text', 'readonly': this.options.readonly ? '' : null, + 'disabled': this.options.disabled ? '' : null, 'maxlength': this.options.maxlength, 'placeholder': this.options.placeholder, 'value': this.value, @@ -3663,6 +3768,7 @@ var UITextarea = UIElement.extend(/** @lends LuCI.ui.Textarea.prototype */ { 'name': this.options.name, 'class': 'cbi-input-textarea', 'readonly': this.options.readonly ? '' : null, + 'disabled': this.options.disabled ? '' : null, 'placeholder': this.options.placeholder, 'style': !this.options.cols ? 'width:100%' : null, 'cols': this.options.cols, @@ -3775,6 +3881,7 @@ var UICheckbox = UIElement.extend(/** @lends LuCI.ui.Checkbox.prototype */ { 'type': 'checkbox', 'value': this.options.value_enabled, 'checked': (this.value == this.options.value_enabled) ? '' : null, + 'disabled': this.options.disabled ? '' : null, 'data-widget-id': this.options.id ? 'widget.' + this.options.id : null })); @@ -3926,7 +4033,8 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ { 'name': this.options.name, 'size': this.options.size, 'class': 'cbi-input-select', - 'multiple': this.options.multiple ? '' : null + 'multiple': this.options.multiple ? '' : null, + 'disabled': this.options.disabled ? '' : null })); if (this.options.optional) @@ -3956,7 +4064,8 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ { 'type': this.options.multiple ? 'checkbox' : 'radio', 'class': this.options.multiple ? 'cbi-input-checkbox' : 'cbi-input-radio', 'value': keys[i], - 'checked': (this.values.indexOf(keys[i]) > -1) ? '' : null + 'checked': (this.values.indexOf(keys[i]) > -1) ? '' : null, + 'disabled': this.options.disabled ? '' : null }), this.choices[keys[i]] || keys[i] ])); @@ -4181,6 +4290,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ { 'class': 'cbi-dropdown', 'multiple': this.options.multiple ? '' : null, 'optional': this.options.optional ? '' : null, + 'disabled': this.options.disabled ? '' : null }, E('ul')); var keys = Object.keys(this.choices); @@ -5332,7 +5442,8 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */ render: function() { var dl = E('div', { 'id': this.options.id, - 'class': 'cbi-dynlist' + 'class': 'cbi-dynlist', + 'disabled': this.options.disabled ? '' : null }, E('div', { 'class': 'add-item' })); if (this.choices) { @@ -5348,7 +5459,8 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */ 'id': this.options.id ? 'widget.' + this.options.id : null, 'type': 'text', 'class': 'cbi-input-text', - 'placeholder': this.options.placeholder + 'placeholder': this.options.placeholder, + 'disabled': this.options.disabled ? '' : null }); dl.lastElementChild.appendChild(inputEl); @@ -5458,6 +5570,9 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */ var dl = ev.currentTarget, item = findParent(ev.target, '.item'); + if (this.options.disabled) + return; + if (item) { this.removeItem(dl, item); } @@ -5780,7 +5895,8 @@ var UIFileUpload = UIElement.extend(/** @lends LuCI.ui.FileUpload.prototype */ { return this.bind(E('div', { 'id': this.options.id }, [ E('button', { 'class': 'btn', - 'click': UI.prototype.createHandlerFn(this, 'handleFileBrowser') + 'click': UI.prototype.createHandlerFn(this, 'handleFileBrowser'), + 'disabled': this.options.disabled ? '' : null }, label), E('div', { 'class': 'cbi-filebrowser' @@ -6144,6 +6260,84 @@ var UIFileUpload = UIElement.extend(/** @lends LuCI.ui.FileUpload.prototype */ { } }); +/** + * Handle menu. + * + * @constructor menu + * @memberof LuCI.ui + * + * @classdesc + * + * Handles menus. + */ +var UIMenu = baseclass.singleton(/** @lends LuCI.ui.menu.prototype */ { + /** + * @typedef {Object} MenuNode + * @memberof LuCI.ui.menu + + * @property {string} name - The internal name of the node, as used in the URL + * @property {number} order - The sort index of the menu node + * @property {string} [title] - The title of the menu node, `null` if the node should be hidden + * @property {satisified} boolean - Boolean indicating whether the menu enries dependencies are satisfied + * @property {readonly} [boolean] - Boolean indicating whether the menu entries underlying ACLs are readonly + * @property {LuCI.ui.menu.MenuNode[]} [children] - Array of child menu nodes. + */ + + /** + * Load and cache current menu tree. + * + * @returns {Promise<LuCI.ui.menu.MenuNode>} + * Returns a promise resolving to the root element of the menu tree. + */ + load: function() { + if (this.menu == null) + this.menu = session.getLocalData('menu'); + + if (!L.isObject(this.menu)) { + this.menu = request.get(L.url('admin/menu')).then(L.bind(function(menu) { + this.menu = menu.json(); + session.setLocalData('menu', this.menu); + + return this.menu; + }, this)); + } + + return Promise.resolve(this.menu); + }, + + /** + * @param {LuCI.ui.menu.MenuNode} [node] + * The menu node to retrieve the children for. Defaults to the menu's + * internal root node if omitted. + * + * @returns {LuCI.ui.menu.MenuNode[]} + * Returns an array of child menu nodes. + */ + getChildren: function(node) { + var children = []; + + if (node == null) + node = this.menu; + + for (var k in node.children) { + if (!node.children.hasOwnProperty(k)) + continue; + + if (!node.children[k].satisfied) + continue; + + if (!node.children[k].hasOwnProperty('title')) + continue; + + children.push(Object.assign(node.children[k], { name: k })); + } + + return children.sort(function(a, b) { + return ((a.order || 1000) - (b.order || 1000)); + }); + } +}); + /** * @class ui * @memberof LuCI @@ -6665,16 +6859,14 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { /** @private */ getActiveTabState: function() { - var page = document.body.getAttribute('data-page'); + var page = document.body.getAttribute('data-page'), + state = session.getLocalData('tab'); - try { - var val = JSON.parse(window.sessionStorage.getItem('tab')); - if (val.page === page && L.isObject(val.paths)) - return val; - } - catch(e) {} + if (L.isObject(state) && state.page === page && L.isObject(state.paths)) + return state; + + session.setLocalData('tab', null); - window.sessionStorage.removeItem('tab'); return { page: page, paths: {} }; }, @@ -6686,17 +6878,12 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { /** @private */ setActiveTabId: function(pane, tabIndex) { - var path = this.getPathForPane(pane); - - try { - var state = this.getActiveTabState(); - state.paths[path] = tabIndex; + var path = this.getPathForPane(pane), + state = this.getActiveTabState(); - window.sessionStorage.setItem('tab', JSON.stringify(state)); - } - catch (e) { return false; } + state.paths[path] = tabIndex; - return true; + return session.setLocalData('tab', state); }, /** @private */ @@ -7002,26 +7189,13 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { * The number of changes to indicate. */ setIndicator: function(n) { - var i = document.querySelector('.uci_change_indicator'); - if (i == null) { - var poll = document.getElementById('xhr_poll_status'); - i = poll.parentNode.insertBefore(E('a', { - 'href': '#', - 'class': 'uci_change_indicator label notice', - 'click': L.bind(this.displayChanges, this) - }), poll); - } - if (n > 0) { - dom.content(i, [ _('Unsaved Changes'), ': ', n ]); - i.classList.add('flash'); - i.style.display = ''; - document.dispatchEvent(new CustomEvent('uci-new-changes')); + UI.prototype.showIndicator('uci-changes', + '%s: %d'.format(_('Unsaved Changes'), n), + L.bind(this.displayChanges, this)); } else { - i.classList.remove('flash'); - i.style.display = 'none'; - document.dispatchEvent(new CustomEvent('uci-clear-changes')); + UI.prototype.hideIndicator('uci-changes'); } }, @@ -7518,6 +7692,8 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { }); }, + menu: UIMenu, + AbstractElement: UIElement, /* Widgets */ @@ -7546,7 +7722,7 @@ return UI;