summaryrefslogtreecommitdiffhomepage
path: root/docs/jsapi/form.js.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/jsapi/form.js.html')
-rw-r--r--docs/jsapi/form.js.html386
1 files changed, 359 insertions, 27 deletions
diff --git a/docs/jsapi/form.js.html b/docs/jsapi/form.js.html
index f266a1c27c..a3c8a15480 100644
--- a/docs/jsapi/form.js.html
+++ b/docs/jsapi/form.js.html
@@ -292,8 +292,16 @@
<li data-name="LuCI.form.AbstractSection#cfgsections"><a href="LuCI.form.AbstractSection.html#cfgsections">cfgsections</a></li>
+ <li data-name="LuCI.form.AbstractSection#cfgvalue"><a href="LuCI.form.AbstractSection.html#cfgvalue">cfgvalue</a></li>
+
<li data-name="LuCI.form.AbstractSection#filter"><a href="LuCI.form.AbstractSection.html#filter">filter</a></li>
+ <li data-name="LuCI.form.AbstractSection#formvalue"><a href="LuCI.form.AbstractSection.html#formvalue">formvalue</a></li>
+
+ <li data-name="LuCI.form.AbstractSection#getOption"><a href="LuCI.form.AbstractSection.html#getOption">getOption</a></li>
+
+ <li data-name="LuCI.form.AbstractSection#getUIElement"><a href="LuCI.form.AbstractSection.html#getUIElement">getUIElement</a></li>
+
<li data-name="LuCI.form.AbstractSection#load"><a href="LuCI.form.AbstractSection.html#load">load</a></li>
<li data-name="LuCI.form.AbstractSection#option"><a href="LuCI.form.AbstractSection.html#option">option</a></li>
@@ -333,6 +341,8 @@
<li data-name="LuCI.form.AbstractValue##modalonly"><a href="LuCI.form.AbstractValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.AbstractValue##onchange"><a href="LuCI.form.AbstractValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.AbstractValue##optional"><a href="LuCI.form.AbstractValue.html#optional">optional</a></li>
<li data-name="LuCI.form.AbstractValue##readonly"><a href="LuCI.form.AbstractValue.html#readonly">readonly</a></li>
@@ -423,6 +433,8 @@
<li data-name="LuCI.form.ButtonValue#modalonly"><a href="LuCI.form.ButtonValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.ButtonValue#onchange"><a href="LuCI.form.ButtonValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.ButtonValue#optional"><a href="LuCI.form.ButtonValue.html#optional">optional</a></li>
<li data-name="LuCI.form.ButtonValue#password"><a href="LuCI.form.ButtonValue.html#password">password</a></li>
@@ -513,6 +525,8 @@
<li data-name="LuCI.form.DummyValue#modalonly"><a href="LuCI.form.DummyValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.DummyValue#onchange"><a href="LuCI.form.DummyValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.DummyValue#optional"><a href="LuCI.form.DummyValue.html#optional">optional</a></li>
<li data-name="LuCI.form.DummyValue#password"><a href="LuCI.form.DummyValue.html#password">password</a></li>
@@ -599,6 +613,8 @@
<li data-name="LuCI.form.DynamicList#modalonly"><a href="LuCI.form.DynamicList.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.DynamicList#onchange"><a href="LuCI.form.DynamicList.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.DynamicList#optional"><a href="LuCI.form.DynamicList.html#optional">optional</a></li>
<li data-name="LuCI.form.DynamicList#password"><a href="LuCI.form.DynamicList.html#password">password</a></li>
@@ -693,6 +709,8 @@
<li data-name="LuCI.form.FileUpload#modalonly"><a href="LuCI.form.FileUpload.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.FileUpload#onchange"><a href="LuCI.form.FileUpload.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.FileUpload#optional"><a href="LuCI.form.FileUpload.html#optional">optional</a></li>
<li data-name="LuCI.form.FileUpload#password"><a href="LuCI.form.FileUpload.html#password">password</a></li>
@@ -783,6 +801,8 @@
<li data-name="LuCI.form.FlagValue#modalonly"><a href="LuCI.form.FlagValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.FlagValue#onchange"><a href="LuCI.form.FlagValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.FlagValue#optional"><a href="LuCI.form.FlagValue.html#optional">optional</a></li>
<li data-name="LuCI.form.FlagValue#password"><a href="LuCI.form.FlagValue.html#password">password</a></li>
@@ -873,6 +893,8 @@
<li data-name="LuCI.form.GridSection#modaltitle"><a href="LuCI.form.GridSection.html#modaltitle">modaltitle</a></li>
+ <li data-name="LuCI.form.GridSection#nodescriptions"><a href="LuCI.form.GridSection.html#nodescriptions">nodescriptions</a></li>
+
<li data-name="LuCI.form.GridSection#parentoption"><a href="LuCI.form.GridSection.html#parentoption">parentoption</a></li>
<li data-name="LuCI.form.GridSection#rowcolors"><a href="LuCI.form.GridSection.html#rowcolors">rowcolors</a></li>
@@ -900,8 +922,16 @@
<li data-name="LuCI.form.GridSection#append"><a href="LuCI.form.GridSection.html#append">append</a></li>
+ <li data-name="LuCI.form.GridSection#cfgvalue"><a href="LuCI.form.GridSection.html#cfgvalue">cfgvalue</a></li>
+
<li data-name="LuCI.form.GridSection#filter"><a href="LuCI.form.GridSection.html#filter">filter</a></li>
+ <li data-name="LuCI.form.GridSection#formvalue"><a href="LuCI.form.GridSection.html#formvalue">formvalue</a></li>
+
+ <li data-name="LuCI.form.GridSection#getOption"><a href="LuCI.form.GridSection.html#getOption">getOption</a></li>
+
+ <li data-name="LuCI.form.GridSection#getUIElement"><a href="LuCI.form.GridSection.html#getUIElement">getUIElement</a></li>
+
<li data-name="LuCI.form.GridSection#load"><a href="LuCI.form.GridSection.html#load">load</a></li>
<li data-name="LuCI.form.GridSection#option"><a href="LuCI.form.GridSection.html#option">option</a></li>
@@ -939,6 +969,8 @@
<li data-name="LuCI.form.HiddenValue#modalonly"><a href="LuCI.form.HiddenValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.HiddenValue#onchange"><a href="LuCI.form.HiddenValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.HiddenValue#optional"><a href="LuCI.form.HiddenValue.html#optional">optional</a></li>
<li data-name="LuCI.form.HiddenValue#password"><a href="LuCI.form.HiddenValue.html#password">password</a></li>
@@ -1071,8 +1103,12 @@
<span class="subtitle">Members</span>
+ <li data-name="LuCI.form.ListValue##orientation"><a href="LuCI.form.ListValue.html#orientation">orientation</a></li>
+
<li data-name="LuCI.form.ListValue##size"><a href="LuCI.form.ListValue.html#size">size</a></li>
+ <li data-name="LuCI.form.ListValue##widget"><a href="LuCI.form.ListValue.html#widget">widget</a></li>
+
<li data-name="LuCI.form.ListValue#datatype"><a href="LuCI.form.ListValue.html#datatype">datatype</a></li>
<li data-name="LuCI.form.ListValue#default"><a href="LuCI.form.ListValue.html#default">default</a></li>
@@ -1081,6 +1117,8 @@
<li data-name="LuCI.form.ListValue#modalonly"><a href="LuCI.form.ListValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.ListValue#onchange"><a href="LuCI.form.ListValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.ListValue#optional"><a href="LuCI.form.ListValue.html#optional">optional</a></li>
<li data-name="LuCI.form.ListValue#password"><a href="LuCI.form.ListValue.html#password">password</a></li>
@@ -1225,6 +1263,8 @@
<li data-name="LuCI.form.MultiValue#modalonly"><a href="LuCI.form.MultiValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.MultiValue#onchange"><a href="LuCI.form.MultiValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.MultiValue#optional"><a href="LuCI.form.MultiValue.html#optional">optional</a></li>
<li data-name="LuCI.form.MultiValue#password"><a href="LuCI.form.MultiValue.html#password">password</a></li>
@@ -1324,8 +1364,16 @@
<li data-name="LuCI.form.NamedSection#cfgsections"><a href="LuCI.form.NamedSection.html#cfgsections">cfgsections</a></li>
+ <li data-name="LuCI.form.NamedSection#cfgvalue"><a href="LuCI.form.NamedSection.html#cfgvalue">cfgvalue</a></li>
+
<li data-name="LuCI.form.NamedSection#filter"><a href="LuCI.form.NamedSection.html#filter">filter</a></li>
+ <li data-name="LuCI.form.NamedSection#formvalue"><a href="LuCI.form.NamedSection.html#formvalue">formvalue</a></li>
+
+ <li data-name="LuCI.form.NamedSection#getOption"><a href="LuCI.form.NamedSection.html#getOption">getOption</a></li>
+
+ <li data-name="LuCI.form.NamedSection#getUIElement"><a href="LuCI.form.NamedSection.html#getUIElement">getUIElement</a></li>
+
<li data-name="LuCI.form.NamedSection#load"><a href="LuCI.form.NamedSection.html#load">load</a></li>
<li data-name="LuCI.form.NamedSection#option"><a href="LuCI.form.NamedSection.html#option">option</a></li>
@@ -1367,6 +1415,8 @@
<li data-name="LuCI.form.SectionValue#modalonly"><a href="LuCI.form.SectionValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.SectionValue#onchange"><a href="LuCI.form.SectionValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.SectionValue#optional"><a href="LuCI.form.SectionValue.html#optional">optional</a></li>
<li data-name="LuCI.form.SectionValue#password"><a href="LuCI.form.SectionValue.html#password">password</a></li>
@@ -1457,6 +1507,8 @@
<li data-name="LuCI.form.TableSection##modaltitle"><a href="LuCI.form.TableSection.html#modaltitle">modaltitle</a></li>
+ <li data-name="LuCI.form.TableSection##nodescriptions"><a href="LuCI.form.TableSection.html#nodescriptions">nodescriptions</a></li>
+
<li data-name="LuCI.form.TableSection##rowcolors"><a href="LuCI.form.TableSection.html#rowcolors">rowcolors</a></li>
<li data-name="LuCI.form.TableSection##sectiontitle"><a href="LuCI.form.TableSection.html#sectiontitle">sectiontitle</a></li>
@@ -1492,8 +1544,16 @@
<li data-name="LuCI.form.TableSection#append"><a href="LuCI.form.TableSection.html#append">append</a></li>
+ <li data-name="LuCI.form.TableSection#cfgvalue"><a href="LuCI.form.TableSection.html#cfgvalue">cfgvalue</a></li>
+
<li data-name="LuCI.form.TableSection#filter"><a href="LuCI.form.TableSection.html#filter">filter</a></li>
+ <li data-name="LuCI.form.TableSection#formvalue"><a href="LuCI.form.TableSection.html#formvalue">formvalue</a></li>
+
+ <li data-name="LuCI.form.TableSection#getOption"><a href="LuCI.form.TableSection.html#getOption">getOption</a></li>
+
+ <li data-name="LuCI.form.TableSection#getUIElement"><a href="LuCI.form.TableSection.html#getUIElement">getUIElement</a></li>
+
<li data-name="LuCI.form.TableSection#load"><a href="LuCI.form.TableSection.html#load">load</a></li>
<li data-name="LuCI.form.TableSection#option"><a href="LuCI.form.TableSection.html#option">option</a></li>
@@ -1539,6 +1599,8 @@
<li data-name="LuCI.form.TextValue#modalonly"><a href="LuCI.form.TextValue.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.TextValue#onchange"><a href="LuCI.form.TextValue.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.TextValue#optional"><a href="LuCI.form.TextValue.html#optional">optional</a></li>
<li data-name="LuCI.form.TextValue#password"><a href="LuCI.form.TextValue.html#password">password</a></li>
@@ -1642,8 +1704,16 @@
<li data-name="LuCI.form.TypedSection#cfgsections"><a href="LuCI.form.TypedSection.html#cfgsections">cfgsections</a></li>
+ <li data-name="LuCI.form.TypedSection#cfgvalue"><a href="LuCI.form.TypedSection.html#cfgvalue">cfgvalue</a></li>
+
<li data-name="LuCI.form.TypedSection#filter"><a href="LuCI.form.TypedSection.html#filter">filter</a></li>
+ <li data-name="LuCI.form.TypedSection#formvalue"><a href="LuCI.form.TypedSection.html#formvalue">formvalue</a></li>
+
+ <li data-name="LuCI.form.TypedSection#getOption"><a href="LuCI.form.TypedSection.html#getOption">getOption</a></li>
+
+ <li data-name="LuCI.form.TypedSection#getUIElement"><a href="LuCI.form.TypedSection.html#getUIElement">getUIElement</a></li>
+
<li data-name="LuCI.form.TypedSection#load"><a href="LuCI.form.TypedSection.html#load">load</a></li>
<li data-name="LuCI.form.TypedSection#option"><a href="LuCI.form.TypedSection.html#option">option</a></li>
@@ -1687,6 +1757,8 @@
<li data-name="LuCI.form.Value#modalonly"><a href="LuCI.form.Value.html#modalonly">modalonly</a></li>
+ <li data-name="LuCI.form.Value#onchange"><a href="LuCI.form.Value.html#onchange">onchange</a></li>
+
<li data-name="LuCI.form.Value#optional"><a href="LuCI.form.Value.html#optional">optional</a></li>
<li data-name="LuCI.form.Value#readonly"><a href="LuCI.form.Value.html#readonly">readonly</a></li>
@@ -2520,6 +2592,8 @@
<li data-name="LuCI.session#getLocalData"><a href="LuCI.session.html#getLocalData">getLocalData</a></li>
+ <li data-name="LuCI.session#getToken"><a href="LuCI.session.html#getToken">getToken</a></li>
+
<li data-name="LuCI.session#setLocalData"><a href="LuCI.session.html#setLocalData">setLocalData</a></li>
</ul>
@@ -2670,6 +2744,8 @@
<li data-name="LuCI.ui.AbstractElement#getValue"><a href="LuCI.ui.AbstractElement.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.AbstractElement#isChanged"><a href="LuCI.ui.AbstractElement.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.AbstractElement#isValid"><a href="LuCI.ui.AbstractElement.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.AbstractElement#registerEvents"><a href="LuCI.ui.AbstractElement.html#registerEvents">registerEvents</a></li>
@@ -2678,6 +2754,8 @@
<li data-name="LuCI.ui.AbstractElement#setChangeEvents"><a href="LuCI.ui.AbstractElement.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.AbstractElement#setPlaceholder"><a href="LuCI.ui.AbstractElement.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.AbstractElement#setUpdateEvents"><a href="LuCI.ui.AbstractElement.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.AbstractElement#setValue"><a href="LuCI.ui.AbstractElement.html#setValue">setValue</a></li>
@@ -2748,6 +2826,8 @@
<li data-name="LuCI.ui.Checkbox#getValue"><a href="LuCI.ui.Checkbox.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Checkbox#isChanged"><a href="LuCI.ui.Checkbox.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Checkbox#isChecked"><a href="LuCI.ui.Checkbox.html#isChecked">isChecked</a></li>
<li data-name="LuCI.ui.Checkbox#isValid"><a href="LuCI.ui.Checkbox.html#isValid">isValid</a></li>
@@ -2758,6 +2838,8 @@
<li data-name="LuCI.ui.Checkbox#setChangeEvents"><a href="LuCI.ui.Checkbox.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Checkbox#setPlaceholder"><a href="LuCI.ui.Checkbox.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Checkbox#setUpdateEvents"><a href="LuCI.ui.Checkbox.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Checkbox#setValue"><a href="LuCI.ui.Checkbox.html#setValue">setValue</a></li>
@@ -2798,12 +2880,16 @@
<li data-name="LuCI.ui.Combobox#closeAllDropdowns"><a href="LuCI.ui.Combobox.html#closeAllDropdowns">closeAllDropdowns</a></li>
+ <li data-name="LuCI.ui.Combobox#isChanged"><a href="LuCI.ui.Combobox.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Combobox#isValid"><a href="LuCI.ui.Combobox.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Combobox#registerEvents"><a href="LuCI.ui.Combobox.html#registerEvents">registerEvents</a></li>
<li data-name="LuCI.ui.Combobox#setChangeEvents"><a href="LuCI.ui.Combobox.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Combobox#setPlaceholder"><a href="LuCI.ui.Combobox.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Combobox#setUpdateEvents"><a href="LuCI.ui.Combobox.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Combobox#triggerValidation"><a href="LuCI.ui.Combobox.html#triggerValidation">triggerValidation</a></li>
@@ -2842,12 +2928,16 @@
<li data-name="LuCI.ui.ComboButton#closeAllDropdowns"><a href="LuCI.ui.ComboButton.html#closeAllDropdowns">closeAllDropdowns</a></li>
+ <li data-name="LuCI.ui.ComboButton#isChanged"><a href="LuCI.ui.ComboButton.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.ComboButton#isValid"><a href="LuCI.ui.ComboButton.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.ComboButton#registerEvents"><a href="LuCI.ui.ComboButton.html#registerEvents">registerEvents</a></li>
<li data-name="LuCI.ui.ComboButton#setChangeEvents"><a href="LuCI.ui.ComboButton.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.ComboButton#setPlaceholder"><a href="LuCI.ui.ComboButton.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.ComboButton#setUpdateEvents"><a href="LuCI.ui.ComboButton.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.ComboButton#triggerValidation"><a href="LuCI.ui.ComboButton.html#triggerValidation">triggerValidation</a></li>
@@ -2888,6 +2978,8 @@
<li data-name="LuCI.ui.Dropdown#getValue"><a href="LuCI.ui.Dropdown.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Dropdown#isChanged"><a href="LuCI.ui.Dropdown.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Dropdown#isValid"><a href="LuCI.ui.Dropdown.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Dropdown#registerEvents"><a href="LuCI.ui.Dropdown.html#registerEvents">registerEvents</a></li>
@@ -2896,6 +2988,8 @@
<li data-name="LuCI.ui.Dropdown#setChangeEvents"><a href="LuCI.ui.Dropdown.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Dropdown#setPlaceholder"><a href="LuCI.ui.Dropdown.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Dropdown#setUpdateEvents"><a href="LuCI.ui.Dropdown.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Dropdown#setValue"><a href="LuCI.ui.Dropdown.html#setValue">setValue</a></li>
@@ -2936,6 +3030,8 @@
<li data-name="LuCI.ui.DynamicList#getValue"><a href="LuCI.ui.DynamicList.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.DynamicList#isChanged"><a href="LuCI.ui.DynamicList.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.DynamicList#isValid"><a href="LuCI.ui.DynamicList.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.DynamicList#registerEvents"><a href="LuCI.ui.DynamicList.html#registerEvents">registerEvents</a></li>
@@ -2944,6 +3040,8 @@
<li data-name="LuCI.ui.DynamicList#setChangeEvents"><a href="LuCI.ui.DynamicList.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.DynamicList#setPlaceholder"><a href="LuCI.ui.DynamicList.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.DynamicList#setUpdateEvents"><a href="LuCI.ui.DynamicList.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.DynamicList#setValue"><a href="LuCI.ui.DynamicList.html#setValue">setValue</a></li>
@@ -2980,6 +3078,8 @@
<li data-name="LuCI.ui.FileUpload#getValue"><a href="LuCI.ui.FileUpload.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.FileUpload#isChanged"><a href="LuCI.ui.FileUpload.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.FileUpload#isValid"><a href="LuCI.ui.FileUpload.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.FileUpload#registerEvents"><a href="LuCI.ui.FileUpload.html#registerEvents">registerEvents</a></li>
@@ -2988,6 +3088,8 @@
<li data-name="LuCI.ui.FileUpload#setChangeEvents"><a href="LuCI.ui.FileUpload.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.FileUpload#setPlaceholder"><a href="LuCI.ui.FileUpload.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.FileUpload#setUpdateEvents"><a href="LuCI.ui.FileUpload.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.FileUpload#setValue"><a href="LuCI.ui.FileUpload.html#setValue">setValue</a></li>
@@ -3020,6 +3122,8 @@
<li data-name="LuCI.ui.Hiddenfield#getValue"><a href="LuCI.ui.Hiddenfield.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Hiddenfield#isChanged"><a href="LuCI.ui.Hiddenfield.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Hiddenfield#isValid"><a href="LuCI.ui.Hiddenfield.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Hiddenfield#registerEvents"><a href="LuCI.ui.Hiddenfield.html#registerEvents">registerEvents</a></li>
@@ -3028,6 +3132,8 @@
<li data-name="LuCI.ui.Hiddenfield#setChangeEvents"><a href="LuCI.ui.Hiddenfield.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Hiddenfield#setPlaceholder"><a href="LuCI.ui.Hiddenfield.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Hiddenfield#setUpdateEvents"><a href="LuCI.ui.Hiddenfield.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Hiddenfield#setValue"><a href="LuCI.ui.Hiddenfield.html#setValue">setValue</a></li>
@@ -3098,6 +3204,8 @@
<li data-name="LuCI.ui.Select#getValue"><a href="LuCI.ui.Select.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Select#isChanged"><a href="LuCI.ui.Select.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Select#isValid"><a href="LuCI.ui.Select.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Select#registerEvents"><a href="LuCI.ui.Select.html#registerEvents">registerEvents</a></li>
@@ -3106,6 +3214,8 @@
<li data-name="LuCI.ui.Select#setChangeEvents"><a href="LuCI.ui.Select.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Select#setPlaceholder"><a href="LuCI.ui.Select.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Select#setUpdateEvents"><a href="LuCI.ui.Select.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Select#setValue"><a href="LuCI.ui.Select.html#setValue">setValue</a></li>
@@ -3170,6 +3280,8 @@
<li data-name="LuCI.ui.Textarea#getValue"><a href="LuCI.ui.Textarea.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Textarea#isChanged"><a href="LuCI.ui.Textarea.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Textarea#isValid"><a href="LuCI.ui.Textarea.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Textarea#registerEvents"><a href="LuCI.ui.Textarea.html#registerEvents">registerEvents</a></li>
@@ -3178,6 +3290,8 @@
<li data-name="LuCI.ui.Textarea#setChangeEvents"><a href="LuCI.ui.Textarea.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Textarea#setPlaceholder"><a href="LuCI.ui.Textarea.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Textarea#setUpdateEvents"><a href="LuCI.ui.Textarea.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Textarea#setValue"><a href="LuCI.ui.Textarea.html#setValue">setValue</a></li>
@@ -3214,6 +3328,8 @@
<li data-name="LuCI.ui.Textfield#getValue"><a href="LuCI.ui.Textfield.html#getValue">getValue</a></li>
+ <li data-name="LuCI.ui.Textfield#isChanged"><a href="LuCI.ui.Textfield.html#isChanged">isChanged</a></li>
+
<li data-name="LuCI.ui.Textfield#isValid"><a href="LuCI.ui.Textfield.html#isValid">isValid</a></li>
<li data-name="LuCI.ui.Textfield#registerEvents"><a href="LuCI.ui.Textfield.html#registerEvents">registerEvents</a></li>
@@ -3222,6 +3338,8 @@
<li data-name="LuCI.ui.Textfield#setChangeEvents"><a href="LuCI.ui.Textfield.html#setChangeEvents">setChangeEvents</a></li>
+ <li data-name="LuCI.ui.Textfield#setPlaceholder"><a href="LuCI.ui.Textfield.html#setPlaceholder">setPlaceholder</a></li>
+
<li data-name="LuCI.ui.Textfield#setUpdateEvents"><a href="LuCI.ui.Textfield.html#setUpdateEvents">setUpdateEvents</a></li>
<li data-name="LuCI.ui.Textfield#setValue"><a href="LuCI.ui.Textfield.html#setValue">setValue</a></li>
@@ -3345,17 +3463,7 @@ var CBIJSONConfig = baseclass.extend({
if (!data.hasOwnProperty(sectiontype))
continue;
- if (L.isObject(data[sectiontype])) {
- this.data[sectiontype] = Object.assign(data[sectiontype], {
- '.anonymous': false,
- '.name': sectiontype,
- '.type': sectiontype
- });
-
- section_ids.push(sectiontype);
- num_sections++;
- }
- else if (Array.isArray(data[sectiontype])) {
+ if (Array.isArray(data[sectiontype])) {
for (var i = 0, index = 0; i &lt; data[sectiontype].length; i++) {
var item = data[sectiontype][i],
anonymous, name;
@@ -3383,6 +3491,16 @@ var CBIJSONConfig = baseclass.extend({
});
}
}
+ else if (L.isObject(data[sectiontype])) {
+ this.data[sectiontype] = Object.assign(data[sectiontype], {
+ '.anonymous': false,
+ '.name': sectiontype,
+ '.type': sectiontype
+ });
+
+ section_ids.push(sectiontype);
+ num_sections++;
+ }
}
section_ids.sort(L.bind(function(a, b) {
@@ -3849,12 +3967,15 @@ var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
* an error.
*/
load: function() {
- var doCheckACL = (!(this instanceof CBIJSONMap) &amp;&amp; this.readonly == null);
+ var doCheckACL = (!(this instanceof CBIJSONMap) &amp;&amp; this.readonly == null),
+ loadTasks = [ doCheckACL ? callSessionAccess('uci', this.config, 'write') : true ],
+ configs = this.parsechain || [ this.config ];
- return Promise.all([
- doCheckACL ? callSessionAccess('uci', this.config, 'write') : true,
- this.data.load(this.parsechain || [ this.config ])
- ]).then(L.bind(function(res) {
+ loadTasks.push.apply(loadTasks, configs.map(L.bind(function(config, i) {
+ return i ? L.resolveDefault(this.data.load(config)) : this.data.load(config);
+ }, this)));
+
+ return Promise.all(loadTasks).then(L.bind(function(res) {
if (res[0] === false)
this.readonly = true;
@@ -3918,7 +4039,7 @@ var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
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') ])
+ E('button', { 'class': 'btn', 'click': ui.hideModal }, [ _('Dismiss') ])
])
]);
}
@@ -4369,6 +4490,138 @@ var CBIAbstractSection = CBIAbstractElement.extend(/** @lends LuCI.form.Abstract
return obj;
},
+ /**
+ * Query underlying option configuration values.
+ *
+ * This function is sensitive to the amount of arguments passed to it;
+ * if only one argument is specified, the configuration values of all
+ * options within this section are returned as dictionary.
+ *
+ * If both the section ID and an option name are supplied, this function
+ * returns the configuration value of the specified option only.
+ *
+ * @param {string} section_id
+ * The configuration section ID
+ *
+ * @param {string} [option]
+ * The name of the option to query
+ *
+ * @returns {null|string|string[]|Object&lt;string, null|string|string[]>}
+ * Returns either a dictionary of option names and their corresponding
+ * configuration values or just a single configuration value, depending
+ * on the amount of passed arguments.
+ */
+ cfgvalue: function(section_id, option) {
+ var rv = (arguments.length == 1) ? {} : null;
+
+ for (var i = 0, o; (o = this.children[i]) != null; i++)
+ if (rv)
+ rv[o.option] = o.cfgvalue(section_id);
+ else if (o.option == option)
+ return o.cfgvalue(section_id);
+
+ return rv;
+ },
+
+ /**
+ * Query underlying option widget input values.
+ *
+ * This function is sensitive to the amount of arguments passed to it;
+ * if only one argument is specified, the widget input values of all
+ * options within this section are returned as dictionary.
+ *
+ * If both the section ID and an option name are supplied, this function
+ * returns the widget input value of the specified option only.
+ *
+ * @param {string} section_id
+ * The configuration section ID
+ *
+ * @param {string} [option]
+ * The name of the option to query
+ *
+ * @returns {null|string|string[]|Object&lt;string, null|string|string[]>}
+ * Returns either a dictionary of option names and their corresponding
+ * widget input values or just a single widget input value, depending
+ * on the amount of passed arguments.
+ */
+ formvalue: function(section_id, option) {
+ var rv = (arguments.length == 1) ? {} : null;
+
+ for (var i = 0, o; (o = this.children[i]) != null; i++) {
+ var func = this.map.root ? this.children[i].formvalue : this.children[i].cfgvalue;
+
+ if (rv)
+ rv[o.option] = func.call(o, section_id);
+ else if (o.option == option)
+ return func.call(o, section_id);
+ }
+
+ return rv;
+ },
+
+ /**
+ * Obtain underlying option LuCI.ui widget instances.
+ *
+ * This function is sensitive to the amount of arguments passed to it;
+ * if only one argument is specified, the LuCI.ui widget instances of all
+ * options within this section are returned as dictionary.
+ *
+ * If both the section ID and an option name are supplied, this function
+ * returns the LuCI.ui widget instance value of the specified option only.
+ *
+ * @param {string} section_id
+ * The configuration section ID
+ *
+ * @param {string} [option]
+ * The name of the option to query
+ *
+ * @returns {null|LuCI.ui.AbstractElement|Object&lt;string, null|LuCI.ui.AbstractElement>}
+ * Returns either a dictionary of option names and their corresponding
+ * widget input values or just a single widget input value, depending
+ * on the amount of passed arguments.
+ */
+ getUIElement: function(section_id, option) {
+ var rv = (arguments.length == 1) ? {} : null;
+
+ for (var i = 0, o; (o = this.children[i]) != null; i++)
+ if (rv)
+ rv[o.option] = o.getUIElement(section_id);
+ else if (o.option == option)
+ return o.getUIElement(section_id);
+
+ return rv;
+ },
+
+ /**
+ * Obtain underlying option objects.
+ *
+ * This function is sensitive to the amount of arguments passed to it;
+ * if no option name is specified, all options within this section are
+ * returned as dictionary.
+ *
+ * If an option name is supplied, this function returns the matching
+ * LuCI.form.AbstractValue instance only.
+ *
+ * @param {string} [option]
+ * The name of the option object to obtain
+ *
+ * @returns {null|LuCI.form.AbstractValue|Object&lt;string, LuCI.form.AbstractValue>}
+ * Returns either a dictionary of option names and their corresponding
+ * option instance objects or just a single object instance value,
+ * depending on the amount of passed arguments.
+ */
+ getOption: function(option) {
+ var rv = (arguments.length == 0) ? {} : null;
+
+ for (var i = 0, o; (o = this.children[i]) != null; i++)
+ if (rv)
+ rv[o.option] = o;
+ else if (o.option == option)
+ return o;
+
+ return rv;
+ },
+
/** @private */
renderUCISection: function(section_id) {
var renderTasks = [];
@@ -4447,6 +4700,9 @@ var CBIAbstractSection = CBIAbstractElement.extend(/** @lends LuCI.form.Abstract
var isEqual = function(x, y) {
+ if (typeof(y) == 'object' &amp;&amp; y instanceof RegExp)
+ return (x == null) ? false : y.test(x);
+
if (x != null &amp;&amp; y != null &amp;&amp; typeof(x) != typeof(y))
return false;
@@ -4687,6 +4943,21 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
*/
/**
+ * Register a custom value change handler.
+ *
+ * If this property is set to a function value, the function is invoked
+ * whenever the value of the underlying UI input element is changing.
+ *
+ * The invoked handler function will receive the DOM click element as
+ * first and the underlying configuration section ID as well as the input
+ * value as second and third argument respectively.
+ *
+ * @name LuCI.form.AbstractValue.prototype#onchange
+ * @type function
+ * @default null
+ */
+
+ /**
* Add a dependency contraint to the option.
*
* Dependency constraints allow making the presence of option elements
@@ -4743,6 +5014,10 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
* Equivalent to the previous example.
* &lt;/li>
* &lt;li>
+ * &lt;code>opt.depends({ foo: /test/ })&lt;/code>&lt;br>
+ * Require the value of `foo` to match the regular expression `/test/`.
+ * &lt;/li>
+ * &lt;li>
* &lt;code>opt.depends({ foo: "test", bar: "qrx" })&lt;/code>&lt;br>
* Require the value of `foo` to be `test` and the value of `bar` to be
* `qrx`.
@@ -4764,11 +5039,11 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
* &lt;/li>
* &lt;/ul>
*
- * @param {string|Object&lt;string, string|boolean>} optionname_or_depends
+ * @param {string|Object&lt;string, string|RegExp>} optionname_or_depends
* The name of the option to depend on or an object describing multiple
* dependencies which must be satified (a logical "and" expression).
*
- * @param {string} optionvalue
+ * @param {string} optionvalue|RegExp
* When invoked with a plain option name as first argument, this parameter
* specifies the expected value. In case an object is passed as first
* argument, this parameter is ignored.
@@ -5092,6 +5367,10 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
if (field &amp;&amp; field.classList.contains('hidden') == active) {
field.classList[active ? 'remove' : 'add']('hidden');
+
+ if (dom.matches(field.parentNode, '.td.cbi-value-field'))
+ field.parentNode.classList[active ? 'remove' : 'add']('inactive');
+
return true;
}
@@ -5584,6 +5863,16 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
*/
/**
+ * If set to `true`, the header row with the options descriptions will
+ * not be displayed. By default, descriptions row is automatically displayed
+ * when at least one option has a description.
+ *
+ * @name LuCI.form.TableSection.prototype#nodescriptions
+ * @type boolean
+ * @default false
+ */
+
+ /**
* The `TableSection` implementation does not support option tabbing, so
* its implementation of `tab()` will always throw an exception when
* invoked.
@@ -5720,7 +6009,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
trEls.appendChild(trEl);
}
- if (has_descriptions) {
+ if (has_descriptions &amp;&amp; !this.nodescriptions) {
var trEl = E('div', {
'class': 'tr cbi-section-table-descr ' + anon_class
});
@@ -5739,7 +6028,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
(typeof(opt.width) == 'number') ? opt.width+'px' : opt.width;
}
- if (this.sortable || this.extedit || this.addremove || has_more)
+ if (this.sortable || this.extedit || this.addremove || has_more || has_action)
trEl.appendChild(E('div', {
'class': 'th cbi-section-table-cell cbi-section-actions'
}));
@@ -5915,7 +6204,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
/** @private */
handleModalSave: function(modalMap, ev) {
- return modalMap.save()
+ return modalMap.save(null, true)
.then(L.bind(this.map.load, this.map))
.then(L.bind(this.map.reset, this.map))
.then(ui.hideModal)
@@ -6415,6 +6704,20 @@ var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
},
/** @private */
+ handleValueChange: function(section_id, state, ev) {
+ if (typeof(this.onchange) != 'function')
+ return;
+
+ var value = this.formvalue(section_id);
+
+ if (isEqual(value, state.previousValue))
+ return;
+
+ state.previousValue = value;
+ this.onchange.call(this, ev, section_id, value);
+ },
+
+ /** @private */
renderFrame: function(section_id, in_table, option_index, nodes) {
var config_name = this.uciconfig || this.section.uciconfig || this.map.config,
depend_list = this.transformDepList(section_id),
@@ -6484,6 +6787,9 @@ var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
optionEl.classList.add('hidden');
optionEl.addEventListener('widget-change',
+ L.bind(this.handleValueChange, this, section_id, {}));
+
+ optionEl.addEventListener('widget-change',
L.bind(this.map.checkDepends, this.map));
dom.bindClassInstance(optionEl, this);
@@ -6620,6 +6926,7 @@ var CBIListValue = CBIValue.extend(/** @lends LuCI.form.ListValue.prototype */ {
__init__: function() {
this.super('__init__', arguments);
this.widget = 'select';
+ this.orientation = 'horizontal';
this.deplist = [];
},
@@ -6631,6 +6938,29 @@ var CBIListValue = CBIValue.extend(/** @lends LuCI.form.ListValue.prototype */ {
* @default null
*/
+ /**
+ * Set the type of the underlying form controls.
+ *
+ * May be one of `select` or `radio`. If set to `select`, an HTML
+ * select element is rendered, otherwise a collection of `radio`
+ * elements is used.
+ *
+ * @name LuCI.form.ListValue.prototype#widget
+ * @type string
+ * @default select
+ */
+
+ /**
+ * Set the orientation of the underlying radio or checkbox elements.
+ *
+ * May be one of `horizontal` or `vertical`. Only applies to non-select
+ * widget types.
+ *
+ * @name LuCI.form.ListValue.prototype#orientation
+ * @type string
+ * @default horizontal
+ */
+
/** @private */
renderWidget: function(section_id, option_index, cfgvalue) {
var choices = this.transformChoices();
@@ -6638,7 +6968,9 @@ var CBIListValue = CBIValue.extend(/** @lends LuCI.form.ListValue.prototype */ {
id: this.cbid(section_id),
size: this.size,
sort: this.keylist,
+ widget: this.widget,
optional: this.optional,
+ orientation: this.orientation,
placeholder: this.placeholder,
validate: L.bind(this.validate, this, section_id),
disabled: (this.readonly != null) ? this.readonly : this.map.readonly
@@ -7372,22 +7704,22 @@ var CBISectionValue = CBIValue.extend(/** @lends LuCI.form.SectionValue.prototyp
/** @override */
load: function(section_id) {
- return this.subsection.load();
+ return this.subsection.load(section_id);
},
/** @override */
parse: function(section_id) {
- return this.subsection.parse();
+ return this.subsection.parse(section_id);
},
/** @private */
renderWidget: function(section_id, option_index, cfgvalue) {
- return this.subsection.render();
+ return this.subsection.render(section_id);
},
/** @private */
checkDepends: function(section_id) {
- this.subsection.checkDepends();
+ this.subsection.checkDepends(section_id);
return CBIValue.prototype.checkDepends.apply(this, [ section_id ]);
},
@@ -7512,7 +7844,7 @@ return baseclass.extend(/** @lends LuCI.form.prototype */ {
<footer>
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Apr 16 2020 15:41:08 GMT+0200 (Central European Summer Time)
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 06 2020 17:58:02 GMT+0200 (Central European Summer Time)
</footer>
</div>
</div>