From d40eac3257fc36d08e09e06d701c245f467ffae3 Mon Sep 17 00:00:00 2001
From: systemcrash args array beginning with
diff --git a/jsapi/LuCI.dom.html b/jsapi/LuCI.dom.html
index 8e9efc97a7..9c9524984d 100644
--- a/jsapi/LuCI.dom.html
+++ b/jsapi/LuCI.dom.html
@@ -6436,7 +6436,7 @@ ignored, else not.
key value is used as captio
@@ -7693,7 +7693,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.DynamicList.html b/jsapi/LuCI.form.DynamicList.html
index 175b4ab803..388cb7efea 100644
--- a/jsapi/LuCI.form.DynamicList.html
+++ b/jsapi/LuCI.form.DynamicList.html
@@ -3664,7 +3664,7 @@ predefined choices. It builds upon the
@@ -7237,7 +7237,7 @@ was neither a string nor a function.
@@ -7544,7 +7544,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.FileUpload.html b/jsapi/LuCI.form.FileUpload.html
index adfd632434..8720ff7c33 100644
--- a/jsapi/LuCI.form.FileUpload.html
+++ b/jsapi/LuCI.form.FileUpload.html
@@ -3663,7 +3663,7 @@ offers the ability to browse, upload and select remote files.
@@ -7544,7 +7544,7 @@ was neither a string nor a function.
@@ -7851,7 +7851,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.FlagValue.html b/jsapi/LuCI.form.FlagValue.html
index 1f1f9f03bf..ca6281337d 100644
--- a/jsapi/LuCI.form.FlagValue.html
+++ b/jsapi/LuCI.form.FlagValue.html
@@ -3663,7 +3663,7 @@ implement a simple checkbox element.
@@ -5651,7 +5651,7 @@ argument, this parameter is ignored.
@@ -6633,7 +6633,7 @@ so it may return promises if overridden by user code.
@@ -7058,7 +7058,7 @@ entities decoded.
@@ -7428,7 +7428,7 @@ was neither a string nor a function.
@@ -7735,7 +7735,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.GridSection.html b/jsapi/LuCI.form.GridSection.html
index d311c6ec16..89016599d2 100644
--- a/jsapi/LuCI.form.GridSection.html
+++ b/jsapi/LuCI.form.GridSection.html
@@ -3676,7 +3676,7 @@ documentation for details.
@@ -4637,7 +4637,7 @@ The default is null, means inheriting from the parent form.
@@ -6193,7 +6193,7 @@ descendant of AbstractValue.
@@ -6448,7 +6448,7 @@ entities decoded.
@@ -7136,7 +7136,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.HiddenValue.html b/jsapi/LuCI.form.HiddenValue.html
index 0b0c55e2a7..24b7ad891d 100644
--- a/jsapi/LuCI.form.HiddenValue.html
+++ b/jsapi/LuCI.form.HiddenValue.html
@@ -3668,7 +3668,7 @@ distorted form layout when rendering the option element.
@@ -7241,7 +7241,7 @@ was neither a string nor a function.
@@ -7548,7 +7548,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.JSONMap.html b/jsapi/LuCI.form.JSONMap.html
index c59734b0bd..17372d4622 100644
--- a/jsapi/LuCI.form.JSONMap.html
+++ b/jsapi/LuCI.form.JSONMap.html
@@ -6006,7 +6006,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.ListValue.html b/jsapi/LuCI.form.ListValue.html
index 667ccdb8e3..af9599e070 100644
--- a/jsapi/LuCI.form.ListValue.html
+++ b/jsapi/LuCI.form.ListValue.html
@@ -3664,7 +3664,7 @@ It builds upon the LuCI.ui.Select
@@ -7384,7 +7384,7 @@ was neither a string nor a function.
@@ -7719,7 +7719,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.Map.html b/jsapi/LuCI.form.Map.html
index d2a0bddc96..b0a6238517 100644
--- a/jsapi/LuCI.form.Map.html
+++ b/jsapi/LuCI.form.Map.html
@@ -5985,7 +5985,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.MultiValue.html b/jsapi/LuCI.form.MultiValue.html
index 6b70658b66..30ab626a43 100644
--- a/jsapi/LuCI.form.MultiValue.html
+++ b/jsapi/LuCI.form.MultiValue.html
@@ -3664,7 +3664,7 @@ select dropdown element.
@@ -7385,7 +7385,7 @@ was neither a string nor a function.
@@ -7692,7 +7692,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.NamedSection.html b/jsapi/LuCI.form.NamedSection.html
index 581d561b1f..f793836eff 100644
--- a/jsapi/LuCI.form.NamedSection.html
+++ b/jsapi/LuCI.form.NamedSection.html
@@ -3665,7 +3665,7 @@ specified when constructing the class instance.
@@ -4197,7 +4197,7 @@ this property will hold a reference to the parent option instance.
@@ -5644,7 +5644,7 @@ not meeting the validation constraints of their respective elements.
@@ -6590,7 +6590,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.RichListValue.html b/jsapi/LuCI.form.RichListValue.html
index a57ac38d40..af69f1a0ec 100644
--- a/jsapi/LuCI.form.RichListValue.html
+++ b/jsapi/LuCI.form.RichListValue.html
@@ -3665,7 +3665,7 @@ It builds upon the LuCI.form.ListValue<
@@ -7536,7 +7536,7 @@ was neither a string nor a function.
@@ -7871,7 +7871,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.SectionValue.html b/jsapi/LuCI.form.SectionValue.html
index 3d8dc9224e..846926af38 100644
--- a/jsapi/LuCI.form.SectionValue.html
+++ b/jsapi/LuCI.form.SectionValue.html
@@ -3663,7 +3663,7 @@ element container, allowing to nest form sections into other sections.
@@ -5107,7 +5107,7 @@ within the given specific section.
@@ -5503,7 +5503,7 @@ argument, this parameter is ignored.
@@ -6301,7 +6301,7 @@ returns false.
@@ -6484,7 +6484,7 @@ so it may return promises if overridden by user code.
@@ -6635,7 +6635,7 @@ validation constraints.
@@ -7278,7 +7278,7 @@ was neither a string nor a function.
@@ -7424,7 +7424,7 @@ or a plain text string. If omitted, the key value is used as captio
@@ -7575,7 +7575,7 @@ its write() implementation is a no-op.
diff --git a/jsapi/LuCI.form.TableSection.html b/jsapi/LuCI.form.TableSection.html
index 633278221e..6ea5e0b751 100644
--- a/jsapi/LuCI.form.TableSection.html
+++ b/jsapi/LuCI.form.TableSection.html
@@ -4627,7 +4627,7 @@ The default is null, means inheriting from the parent form.
@@ -7108,7 +7108,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.TextValue.html b/jsapi/LuCI.form.TextValue.html
index 04f9c21b9e..aa5643fd64 100644
--- a/jsapi/LuCI.form.TextValue.html
+++ b/jsapi/LuCI.form.TextValue.html
@@ -3663,7 +3663,7 @@
@@ -7591,7 +7591,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.TypedSection.html b/jsapi/LuCI.form.TypedSection.html
index 26f889b4ea..468f87b1bd 100644
--- a/jsapi/LuCI.form.TypedSection.html
+++ b/jsapi/LuCI.form.TypedSection.html
@@ -6797,7 +6797,7 @@ was neither a string nor a function.
diff --git a/jsapi/LuCI.form.Value.html b/jsapi/LuCI.form.Value.html
index b82c19ba4a..f2290d40b2 100644
--- a/jsapi/LuCI.form.Value.html
+++ b/jsapi/LuCI.form.Value.html
@@ -3664,7 +3664,7 @@
@@ -6713,7 +6713,7 @@ implement alternative removal logic, e.g. to retain the original value.
@@ -7343,7 +7343,7 @@ was neither a string nor a function.
@@ -7650,7 +7650,7 @@ before it is written.
diff --git a/jsapi/LuCI.form.html b/jsapi/LuCI.form.html
index 0c3a910adb..534b594f41 100644
--- a/jsapi/LuCI.form.html
+++ b/jsapi/LuCI.form.html
@@ -3693,7 +3693,7 @@ m.render().then(function(node) {
@@ -3849,7 +3849,7 @@ m.render().then(function(node) {
diff --git a/jsapi/LuCI.fs.html b/jsapi/LuCI.fs.html
index 47cf5c8db7..868b61183b 100644
--- a/jsapi/LuCI.fs.html
+++ b/jsapi/LuCI.fs.html
@@ -6035,7 +6035,7 @@ the failure reason.
diff --git a/jsapi/LuCI.headers.html b/jsapi/LuCI.headers.html
index d6055dbf6c..366c27a116 100644
--- a/jsapi/LuCI.headers.html
+++ b/jsapi/LuCI.headers.html
@@ -4051,7 +4051,7 @@ Note: Header-Names are case-insensitive.
diff --git a/jsapi/LuCI.html b/jsapi/LuCI.html
index 9892a8687e..768d0db322 100644
--- a/jsapi/LuCI.html
+++ b/jsapi/LuCI.html
@@ -8458,7 +8458,7 @@ else null.
diff --git a/jsapi/LuCI.network.Device.html b/jsapi/LuCI.network.Device.html
index 7649b7c947..114f616b4c 100644
--- a/jsapi/LuCI.network.Device.html
+++ b/jsapi/LuCI.network.Device.html
@@ -6416,7 +6416,7 @@ when it is down or absent.
diff --git a/jsapi/LuCI.network.Hosts.html b/jsapi/LuCI.network.Hosts.html
index 6262907a37..c8fccdd25b 100644
--- a/jsapi/LuCI.network.Hosts.html
+++ b/jsapi/LuCI.network.Hosts.html
@@ -4977,7 +4977,7 @@ is used as hint.
diff --git a/jsapi/LuCI.network.Protocol.html b/jsapi/LuCI.network.Protocol.html
index 0d873d71cc..69bea2f736 100644
--- a/jsapi/LuCI.network.Protocol.html
+++ b/jsapi/LuCI.network.Protocol.html
@@ -8311,7 +8311,7 @@ configuration.
diff --git a/jsapi/LuCI.network.WifiDevice.html b/jsapi/LuCI.network.WifiDevice.html
index db6ff72eb0..6935c9b96c 100644
--- a/jsapi/LuCI.network.WifiDevice.html
+++ b/jsapi/LuCI.network.WifiDevice.html
@@ -5354,7 +5354,7 @@ configuration.
diff --git a/jsapi/LuCI.network.WifiNetwork.html b/jsapi/LuCI.network.WifiNetwork.html
index 8c28fdc8db..7c94965264 100644
--- a/jsapi/LuCI.network.WifiNetwork.html
+++ b/jsapi/LuCI.network.WifiNetwork.html
@@ -7938,7 +7938,7 @@ configuration.
diff --git a/jsapi/LuCI.network.html b/jsapi/LuCI.network.html
index 380ccea0b2..fe953d887d 100644
--- a/jsapi/LuCI.network.html
+++ b/jsapi/LuCI.network.html
@@ -9881,7 +9881,7 @@ conjunction with quality to calculate a quality percentage.
- Documentation generated by JSDoc 3.6.11 on Mon Nov 25 2024 20:38:21 GMT+0000 (Coordinated Universal Time)
+ Documentation generated by JSDoc 3.6.11 on Wed Nov 27 2024 20:43:36 GMT+0000 (Coordinated Universal Time)
diff --git a/jsapi/LuCI.poll.html b/jsapi/LuCI.poll.html
index ec21d08a92..67d4ec01fc 100644
--- a/jsapi/LuCI.poll.html
+++ b/jsapi/LuCI.poll.html
@@ -4434,7 +4434,7 @@ run to begin with.
diff --git a/jsapi/LuCI.request.html b/jsapi/LuCI.request.html
index 4c17e2b8d3..8d6fd3ac2d 100644
--- a/jsapi/LuCI.request.html
+++ b/jsapi/LuCI.request.html
@@ -5369,7 +5369,7 @@ instances as sole argument during the HTTP request transfer.
diff --git a/jsapi/LuCI.request.poll.html b/jsapi/LuCI.request.poll.html
index b994314440..fda32263aa 100644
--- a/jsapi/LuCI.request.poll.html
+++ b/jsapi/LuCI.request.poll.html
@@ -4553,7 +4553,7 @@ else null.
diff --git a/jsapi/LuCI.response.html b/jsapi/LuCI.response.html
index 786cff8c53..42e3375c11 100644
--- a/jsapi/LuCI.response.html
+++ b/jsapi/LuCI.response.html
@@ -4511,7 +4511,7 @@ using String() and treated as response text.
diff --git a/jsapi/LuCI.rpc.html b/jsapi/LuCI.rpc.html
index 677d8f031b..e4a254b4aa 100644
--- a/jsapi/LuCI.rpc.html
+++ b/jsapi/LuCI.rpc.html
@@ -5842,7 +5842,7 @@ to the expect and filter declarations.
diff --git a/jsapi/LuCI.session.html b/jsapi/LuCI.session.html
index 14ee3162e0..8550481cfa 100644
--- a/jsapi/LuCI.session.html
+++ b/jsapi/LuCI.session.html
@@ -4281,7 +4281,7 @@ being put in the session store.
diff --git a/jsapi/LuCI.uci.html b/jsapi/LuCI.uci.html
index bafc96e335..16bf6d6efd 100644
--- a/jsapi/LuCI.uci.html
+++ b/jsapi/LuCI.uci.html
@@ -7598,7 +7598,7 @@ associated name as arguments.
diff --git a/jsapi/LuCI.ui.AbstractElement.html b/jsapi/LuCI.ui.AbstractElement.html
index 3b824661f9..9be715afd5 100644
--- a/jsapi/LuCI.ui.AbstractElement.html
+++ b/jsapi/LuCI.ui.AbstractElement.html
@@ -5385,7 +5385,7 @@ and are displayed in a slightly faded style.
diff --git a/jsapi/LuCI.ui.Checkbox.html b/jsapi/LuCI.ui.Checkbox.html
index e48b02e94f..97b6ce9a10 100644
--- a/jsapi/LuCI.ui.Checkbox.html
+++ b/jsapi/LuCI.ui.Checkbox.html
@@ -5499,7 +5499,7 @@ it is required for HTML based form submissions.
diff --git a/jsapi/LuCI.ui.ComboButton.html b/jsapi/LuCI.ui.ComboButton.html
index 7359560dff..ecdd7b15e2 100644
--- a/jsapi/LuCI.ui.ComboButton.html
+++ b/jsapi/LuCI.ui.ComboButton.html
@@ -5529,7 +5529,7 @@ choice value as second argument.
diff --git a/jsapi/LuCI.ui.Combobox.html b/jsapi/LuCI.ui.Combobox.html
index ee878b6e65..d9c81b5509 100644
--- a/jsapi/LuCI.ui.Combobox.html
+++ b/jsapi/LuCI.ui.Combobox.html
@@ -5432,7 +5432,7 @@ forcibly set to true.
diff --git a/jsapi/LuCI.ui.Dropdown.html b/jsapi/LuCI.ui.Dropdown.html
index 7ce065439f..0439d20cc5 100644
--- a/jsapi/LuCI.ui.Dropdown.html
+++ b/jsapi/LuCI.ui.Dropdown.html
@@ -6230,7 +6230,7 @@ expression. Only applicable when create is true.
diff --git a/jsapi/LuCI.ui.DynamicList.html b/jsapi/LuCI.ui.DynamicList.html
index 8420499a38..3b31999c83 100644
--- a/jsapi/LuCI.ui.DynamicList.html
+++ b/jsapi/LuCI.ui.DynamicList.html
@@ -3901,7 +3901,7 @@ arbitrary values to the dynamic list.
@@ -4045,7 +4045,7 @@ as label text. Choice labels may be any valid value accepted by
@@ -4221,7 +4221,7 @@ as label text. Choice labels may be any valid value accepted by
@@ -5256,7 +5256,7 @@ trigger input value validation.
@@ -5607,7 +5607,7 @@ it to remain unselected.
diff --git a/jsapi/LuCI.ui.FileUpload.html b/jsapi/LuCI.ui.FileUpload.html
index c9146f7fc8..ac6debe677 100644
--- a/jsapi/LuCI.ui.FileUpload.html
+++ b/jsapi/LuCI.ui.FileUpload.html
@@ -3670,7 +3670,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3967,7 +3967,7 @@ upload control.
@@ -4458,7 +4458,7 @@ registered.
@@ -5002,7 +5002,7 @@ trigger input value validation.
@@ -5530,7 +5530,7 @@ ACL setup for the current session.
diff --git a/jsapi/LuCI.ui.Hiddenfield.html b/jsapi/LuCI.ui.Hiddenfield.html
index aff667ee54..e980c3cf1c 100644
--- a/jsapi/LuCI.ui.Hiddenfield.html
+++ b/jsapi/LuCI.ui.Hiddenfield.html
@@ -3670,7 +3670,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3966,7 +3966,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -4457,7 +4457,7 @@ registered.
@@ -5001,7 +5001,7 @@ trigger input value validation.
@@ -5210,7 +5210,7 @@ trigger validation runs, e.g. when programmatically altering values.
diff --git a/jsapi/LuCI.ui.Select.html b/jsapi/LuCI.ui.Select.html
index 35be4e8c66..117dd666de 100644
--- a/jsapi/LuCI.ui.Select.html
+++ b/jsapi/LuCI.ui.Select.html
@@ -5562,7 +5562,7 @@ selected yet. Only applicable to the select widget type.
diff --git a/jsapi/LuCI.ui.Textarea.html b/jsapi/LuCI.ui.Textarea.html
index 9570e487c3..862a370acc 100644
--- a/jsapi/LuCI.ui.Textarea.html
+++ b/jsapi/LuCI.ui.Textarea.html
@@ -5508,7 +5508,7 @@ contents.
diff --git a/jsapi/LuCI.ui.Textfield.html b/jsapi/LuCI.ui.Textfield.html
index d00ae10f1d..9a11900932 100644
--- a/jsapi/LuCI.ui.Textfield.html
+++ b/jsapi/LuCI.ui.Textfield.html
@@ -5436,7 +5436,7 @@ corresponding <input> element is empty.
diff --git a/jsapi/LuCI.ui.changes.html b/jsapi/LuCI.ui.changes.html
index 445eba8aff..c7628125ba 100644
--- a/jsapi/LuCI.ui.changes.html
+++ b/jsapi/LuCI.ui.changes.html
@@ -3667,7 +3667,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3752,7 +3752,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3893,7 +3893,7 @@ settings.
@@ -3966,7 +3966,7 @@ and offer options to revert or apply the shown changes.
@@ -4084,7 +4084,7 @@ UCI changeset structure.
@@ -4160,7 +4160,7 @@ complete.
@@ -4288,7 +4288,7 @@ is removed.
diff --git a/jsapi/LuCI.ui.html b/jsapi/LuCI.ui.html
index 2a6ad91751..68151f35ae 100644
--- a/jsapi/LuCI.ui.html
+++ b/jsapi/LuCI.ui.html
@@ -3664,7 +3664,7 @@ external JavaScript, use L.require("ui").then(...).
@@ -3795,7 +3795,7 @@ external JavaScript, use L.require("ui").then(...).
@@ -4057,7 +4057,7 @@ banner element.
@@ -4371,7 +4371,7 @@ trigger field validation or to bind it to further events.
@@ -4508,7 +4508,7 @@ default.
@@ -4734,7 +4734,7 @@ valid function value.
@@ -4882,7 +4882,7 @@ requested indicator was not found.
@@ -4958,7 +4958,7 @@ handler as-is without the need to bind it first.
@@ -5110,7 +5110,7 @@ caught and rendered using LuCI.error()
- ui.js, line 3918
+ ui.js, line 4017
@@ -5352,7 +5352,7 @@ accepted by LuCI.dom.content().
@@ -5555,7 +5555,7 @@ or rejecting with null when the connectivity check timed out.
@@ -5829,7 +5829,7 @@ changes were made.
@@ -6058,7 +6058,7 @@ element.
@@ -6416,7 +6416,7 @@ cancelled by the user.
diff --git a/jsapi/LuCI.ui.menu.html b/jsapi/LuCI.ui.menu.html
index 07da113794..b7a4dcbcce 100644
--- a/jsapi/LuCI.ui.menu.html
+++ b/jsapi/LuCI.ui.menu.html
@@ -3662,7 +3662,7 @@
@@ -3751,7 +3751,7 @@
@@ -3823,7 +3823,7 @@ next page load.
@@ -3972,7 +3972,7 @@ internal root node if omitted.
@@ -4335,7 +4335,7 @@ internal root node if omitted.
diff --git a/jsapi/LuCI.ui.tabs.html b/jsapi/LuCI.ui.tabs.html
index 18b83bb6f3..089a7f01da 100644
--- a/jsapi/LuCI.ui.tabs.html
+++ b/jsapi/LuCI.ui.tabs.html
@@ -3668,7 +3668,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3753,7 +3753,7 @@ external JavaScript, use L.require("ui").then(...) and ac
@@ -3882,7 +3882,7 @@ DOM node.
@@ -4035,7 +4035,7 @@ DOM node.
diff --git a/jsapi/LuCI.view.html b/jsapi/LuCI.view.html
index 8c3de16938..1c0931337b 100644
--- a/jsapi/LuCI.view.html
+++ b/jsapi/LuCI.view.html
@@ -4639,7 +4639,7 @@ to a Node value.
diff --git a/jsapi/LuCI.xhr.html b/jsapi/LuCI.xhr.html
index 7a6093c2fc..6849b52acb 100644
--- a/jsapi/LuCI.xhr.html
+++ b/jsapi/LuCI.xhr.html
@@ -4603,7 +4603,7 @@ when invoked.
diff --git a/jsapi/form.js.html b/jsapi/form.js.html
index f335b9d5e7..cf951ff005 100644
--- a/jsapi/form.js.html
+++ b/jsapi/form.js.html
@@ -6390,7 +6390,6 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
handleDragStart: function(ev) {
if (!scope.dragState || !scope.dragState.node.classList.contains('drag-handle')) {
scope.dragState = null;
- ev.preventDefault();
return false;
}
@@ -6401,6 +6400,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
/** @private */
handleDragOver: function(ev) {
+ if (scope.dragState === null ) return;
var n = scope.dragState.targetNode,
r = scope.dragState.rect,
t = r.top + r.height / 2;
@@ -6421,6 +6421,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
/** @private */
handleDragEnter: function(ev) {
+ if (scope.dragState === null ) return;
scope.dragState.rect = ev.currentTarget.getBoundingClientRect();
scope.dragState.targetNode = ev.currentTarget;
},
@@ -6446,6 +6447,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
/** @private */
handleDrop: function(ev) {
+ if (scope.dragState === null ) return;
var s = scope.dragState;
if (s.node && s.targetNode) {
@@ -8666,7 +8668,7 @@ return baseclass.extend(/** @lends LuCI.form.prototype */ {
diff --git a/jsapi/fs.js.html b/jsapi/fs.js.html
index a12bcfb5f0..215ae2024c 100644
--- a/jsapi/fs.js.html
+++ b/jsapi/fs.js.html
@@ -4077,7 +4077,7 @@ return FileSystem;
diff --git a/jsapi/index.html b/jsapi/index.html
index 9d7be62de9..4d17f43359 100644
--- a/jsapi/index.html
+++ b/jsapi/index.html
@@ -3664,7 +3664,7 @@ is the central JSDoc 3.6.11 on Mon Nov 25 2024 20:38:21 GMT+0000 (Coordinated Universal Time)
+ Documentation generated by JSDoc 3.6.11 on Wed Nov 27 2024 20:43:36 GMT+0000 (Coordinated Universal Time)
diff --git a/jsapi/luci.js.html b/jsapi/luci.js.html
index d0940c734b..9971012072 100644
--- a/jsapi/luci.js.html
+++ b/jsapi/luci.js.html
@@ -7110,7 +7110,7 @@
diff --git a/jsapi/network.js.html b/jsapi/network.js.html
index 47fdc941ea..bcf5811a09 100644
--- a/jsapi/network.js.html
+++ b/jsapi/network.js.html
@@ -8085,7 +8085,7 @@ return Network;
diff --git a/jsapi/rpc.js.html b/jsapi/rpc.js.html
index 1910152ddd..78af1017cd 100644
--- a/jsapi/rpc.js.html
+++ b/jsapi/rpc.js.html
@@ -4133,7 +4133,7 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ {
diff --git a/jsapi/uci.js.html b/jsapi/uci.js.html
index b9790c6b9d..48bf9e36a4 100644
--- a/jsapi/uci.js.html
+++ b/jsapi/uci.js.html
@@ -4690,7 +4690,7 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ {
diff --git a/jsapi/ui.js.html b/jsapi/ui.js.html
index 8d4d32095e..fc2c4127bc 100644
--- a/jsapi/ui.js.html
+++ b/jsapi/ui.js.html
@@ -5903,9 +5903,98 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */
this.addItem(dl, this.values[i], label);
}
+ this.initDragAndDrop(dl);
+
return this.bind(dl);
},
+ /** @private */
+ initDragAndDrop: function(dl) {
+ let draggedItem = null;
+ let placeholder = null;
+
+ dl.addEventListener('dragstart', (e) => {
+ if (e.target.classList.contains('item')) {
+ draggedItem = e.target;
+ e.target.classList.add('dragging');
+ }
+ });
+
+ dl.addEventListener('dragend', (e) => e.target.classList.remove('dragging'));
+
+ dl.addEventListener('dragover', (e) => e.preventDefault());
+
+ dl.addEventListener('dragenter', (e) => e.target.classList.add('drag-over'));
+
+ dl.addEventListener('dragleave', (e) => e.target.classList.remove('drag-over'));
+
+ dl.addEventListener('drop', (e) => {
+ e.preventDefault();
+ e.target.classList.remove('drag-over');
+ const target = e.target.classList.contains('item') ? e.target : dl.querySelector('.add-item');
+ dl.insertBefore(draggedItem, target);
+ });
+
+ dl.addEventListener('click', (e) => {
+ if (e.target.closest('.item')) {
+ const span = e.target.closest('.item').querySelector('SPAN');
+ if (span) {
+ const range = document.createRange();
+ range.selectNodeContents(span);
+ const selection = window.getSelection();
+ if (selection.rangeCount === 0 || selection.toString().length === 0) {
+ selection.removeAllRanges();
+ selection.addRange(range);
+ } else selection.removeAllRanges();
+ }
+ }
+ });
+
+ dl.addEventListener('touchstart', (e) => {
+ const touch = e.touches[0];
+ const target = e.target.closest('.item');
+ if (target) {
+ draggedItem = target;
+
+ placeholder = draggedItem.cloneNode(true);
+ placeholder.className = 'placeholder';
+ placeholder.style.height = `${draggedItem.offsetHeight}px`;
+ draggedItem.parentNode.insertBefore(placeholder, draggedItem.nextSibling);
+ draggedItem.classList.add('dragging')
+ }
+ });
+
+ dl.addEventListener('touchmove', (e) => {
+ if (draggedItem) {
+ const touch = e.touches[0];
+ const currentY = touch.clientY;
+
+ const items = Array.from(dl.querySelectorAll('.item'));
+ const target = items.find(item => {
+ const rect = item.getBoundingClientRect();
+ return currentY > rect.top && currentY < rect.bottom;
+ });
+
+ if (target && target !== draggedItem) {
+ const insertBefore = currentY < target.getBoundingClientRect().top + target.offsetHeight / 2;
+ dl.insertBefore(placeholder, insertBefore ? target : target.nextSibling);
+ }
+
+ e.preventDefault();
+ }
+ });
+
+ dl.addEventListener('touchend', (e) => {
+ if (draggedItem && placeholder) {
+ dl.insertBefore(draggedItem, placeholder);
+ draggedItem.classList.remove('dragging')
+ placeholder.parentNode.removeChild(placeholder);
+ placeholder = null;
+ draggedItem = null;
+ }
+ });
+ },
+
/** @private */
bind: function(dl) {
dl.addEventListener('click', L.bind(this.handleClick, this));
@@ -5925,7 +6014,7 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */
/** @private */
addItem: function(dl, value, text, flash) {
var exists = false,
- new_item = E('div', { 'class': flash ? 'item flash' : 'item', 'tabindex': 0 }, [
+ new_item = E('div', { 'class': flash ? 'item flash' : 'item', 'tabindex': 0, 'draggable': true }, [
E('span', {}, [ text || value ]),
E('input', {
'type': 'hidden',
@@ -5997,7 +6086,17 @@ var UIDynamicList = UIElement.extend(/** @lends LuCI.ui.DynamicList.prototype */
return;
if (item) {
- this.removeItem(dl, item);
+ // Get bounding rectangle of the item
+ var rect = item.getBoundingClientRect();
+
+ // Get computed styles for the ::after pseudo-element
+ var afterStyles = window.getComputedStyle(item, '::after');
+ var afterWidth = parseFloat(afterStyles.width) || 0;
+
+ // Check if the click is within the ::after region
+ if (rect.right - ev.clientX <= afterWidth) {
+ this.removeItem(dl, item);
+ }
}
else if (matchesElem(ev.target, '.cbi-button-add')) {
var input = ev.target.previousElementSibling;
@@ -8663,7 +8762,7 @@ return UI;
--
2.30.2