From 2b64fd6c6c8f48b56e84fee3e5c4c51971b82210 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 31 Mar 2020 21:30:38 +0200 Subject: docs: update js api docs Signed-off-by: Jo-Philipp Wich --- docs/jsapi/LuCI.ui.Hiddenfield.html | 2944 +++++++++++++++++++++++++++++++++++ 1 file changed, 2944 insertions(+) create mode 100644 docs/jsapi/LuCI.ui.Hiddenfield.html (limited to 'docs/jsapi/LuCI.ui.Hiddenfield.html') diff --git a/docs/jsapi/LuCI.ui.Hiddenfield.html b/docs/jsapi/LuCI.ui.Hiddenfield.html new file mode 100644 index 0000000000..40fe47f8c0 --- /dev/null +++ b/docs/jsapi/LuCI.ui.Hiddenfield.html @@ -0,0 +1,2944 @@ + + + + + Class: Hiddenfield + + + + + + + + + + + + + + + + + +
+ + +
+

Class: Hiddenfield

+ + + + +
+ +
+

+ LuCI.ui. + + Hiddenfield +

+ +

The Hiddenfield class implements an HTML <input type="hidden"> field +which allows to store form data without exposing it to the user.

+

UI widget instances are usually not supposed to be created by view code +directly, instead they're implicitely created by LuCI.form when +instantiating CBI forms.

+

This class is automatically instantiated as part of LuCI.ui. To use it +in views, use 'require ui' and refer to ui.Hiddenfield. To import it in +external JavaScript, use L.require("ui").then(...) and access the +Hiddenfield property of the class instance value.

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

+ + new LuCI.ui.Hiddenfield(value, options) +

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

Instantiate a hidden input field widget.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
value + + +string +| + +Array.<string> + + + + + + null + + + + + optional + + + + + +

The initial input value.

options + + +LuCI.ui.AbstractElement.InitOptions + + + + + + + + + optional + + + + + +

Object describing the widget specific options to initialize the hidden input.

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

Extends

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

Methods

+ +
+ +
+
+

+ + inherited + + getValue(){string|Array.<string>|null} +

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

Read the current value of the input widget.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + string + | + + Array.<string> + | + + null + + + The current value of the input element. For simple inputs like text +fields or selects, the return value type will be a - possibly empty - +string. Complex widgets such as DynamicList instances may result in +an array of strings or null for unset values.
+ + + + +
+ + + +
+
+

+ + inherited + + isValid(){boolean} +

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

Check whether the current input value is valid.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + boolean + + + Returns true if the current input value is valid or false if it does +not meet the validation constraints.
+ + + + +
+ + + +
+
+

+ + inherited + + registerEvents(targetNode, synevent, events) +

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

Dispatch a custom (synthetic) event in response to received events.

+

Sets up event handlers on the given target DOM node for the given event +names that dispatch a custom event of the given type to the widget root +DOM node.

+

The primary purpose of this function is to set up a series of custom +uniform standard events such as widget-update, validation-success, +validation-failure etc. which are triggered by various different +widget specific native DOM events.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
targetNode + + +Node + + + + + +

Specifies the DOM node on which the native event listeners should be +registered.

synevent + + +string + + + + + +

The name of the custom event to dispatch to the widget root DOM node.

events + + +Array.<string> + + + + + +

The native DOM events for which event handlers should be registered.

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

+ + inherited + + render(){Node} +

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

Render the widget, setup event listeners and return resulting markup.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + Node + + + Returns a DOM Node or DocumentFragment containing the rendered +widget markup.
+ + + + +
+ + + +
+
+

+ + inherited + + setChangeEvents(targetNode, events) +

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

Setup listeners for native DOM events that may change the widget value.

+

Sets up event handlers on the given target DOM node for the given event +names which may cause the input value to change completely, such as +change events in a select menu. In contrast to update events, such +change events will not trigger input value validation but they may cause +field dependencies to get re-evaluated and will mark the input widget +as dirty.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
targetNode + + +Node + + + + + + + + + + +

Specifies the DOM node on which the event listeners should be registered.

events + + +string + + + + + + + + + + repeatable + + +

The DOM events for which event handlers should be registered.

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

+ + inherited + + setUpdateEvents(targetNode, events) +

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

Setup listeners for native DOM events that may update the widget value.

+

Sets up event handlers on the given target DOM node for the given event +names which may cause the input value to update, such as keyup or +onclick events. In contrast to change events, such update events will +trigger input value validation.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
targetNode + + +Node + + + + + + + + + + +

Specifies the DOM node on which the event listeners should be registered.

events + + +string + + + + + + + + + + repeatable + + +

The DOM events for which event handlers should be registered.

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

+ + inherited + + setValue(value) +

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

Set the current value of the input widget.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +string +| + +Array.<string> +| + +null + + + + + +

The value to set the input element to. For simple inputs like text +fields or selects, the value should be a - possibly empty - string. +Complex widgets such as DynamicList instances may accept string array +or null values.

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

+ + inherited + + triggerValidation() +

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

Force validation of the current input value.

+

Usually input validation is automatically triggered by various DOM events +bound to the input widget. In some cases it is required though to manually +trigger validation runs, e.g. when programmatically altering values.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+ + + + + + + +
+ Documentation generated by JSDoc 3.6.3 on Tue Mar 31 2020 21:30:33 GMT+0200 (Central European Summer Time) +
+
+
+ + + + \ No newline at end of file -- cgit v1.2.3