From: LASER-Yi Date: Tue, 20 Jan 2026 17:25:27 +0000 (+0800) Subject: luci-base: fix JSDoc errors in form.Flag and form.Button X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d52b59cbf0bd10efa190803edc768d38540dd40c;p=openwrt-luci.git luci-base: fix JSDoc errors in form.Flag and form.Button Fix incorrect @lends, @name, @class, and @classdesc annotations to match the actual public API (LuCI.form.Flag and LuCI.form.Button). Signed-off-by: LASER-Yi --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index e7c68b21e0..de6c12290d 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4308,13 +4308,13 @@ const CBIRangeSliderValue = CBIValue.extend(/** @lends LuCI.form.RangeSliderValu }); /** - * @class FlagValue + * @class Flag * @memberof LuCI.form * @augments LuCI.form.Value * @hideconstructor * @classdesc * - * The `FlagValue` element builds upon the {@link LuCI.ui.Checkbox} widget to + * The `Flag` element builds upon the {@link LuCI.ui.Checkbox} widget to * implement a simple checkbox element. * * @param {LuCI.form.Map|LuCI.form.JSONMap} form @@ -4338,7 +4338,7 @@ const CBIRangeSliderValue = CBIValue.extend(/** @lends LuCI.form.RangeSliderValu * @param {string} [description] * The description text of the option element. */ -const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ { +const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.Flag.prototype */ { __name__: 'CBI.FlagValue', __init__(...args) { @@ -4352,7 +4352,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ /** * Sets the input value to use for the checkbox checked state. * - * @name LuCI.form.FlagValue.prototype#enabled + * @name LuCI.form.Flag.prototype#enabled * @type string * @default 1 */ @@ -4360,7 +4360,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ /** * Sets the input value to use for the checkbox unchecked state. * - * @name LuCI.form.FlagValue.prototype#disabled + * @name LuCI.form.Flag.prototype#disabled * @type string * @default 0 */ @@ -4374,7 +4374,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ * value will be shown as a tooltip. If the return value of the function * is `null` no tooltip will be set. * - * @name LuCI.form.FlagValue.prototype#tooltip + * @name LuCI.form.Flag.prototype#tooltip * @type string|function * @default null */ @@ -4385,7 +4385,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ * If set, this icon will be shown for the default one. * This could also be a png icon from the resources directory. * - * @name LuCI.form.FlagValue.prototype#tooltipicon + * @name LuCI.form.Flag.prototype#tooltipicon * @type string * @default 'ℹ️'; */ @@ -4743,13 +4743,13 @@ const CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype }); /** - * @class ButtonValue + * @class Button * @memberof LuCI.form * @augments LuCI.form.Value * @hideconstructor * @classdesc * - * The `ButtonValue` element wraps a {@link LuCI.ui.Hiddenfield} widget and + * The `Button` element wraps a {@link LuCI.ui.Hiddenfield} widget and * renders the underlying UCI option or default value as readonly text. * * @param {LuCI.form.Map|LuCI.form.JSONMap} form @@ -4773,7 +4773,7 @@ const CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype * @param {string} [description] * The description text of the option element. */ -const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototype */ { +const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.Button.prototype */ { __name__: 'CBI.ButtonValue', /** @@ -4789,7 +4789,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp * * The default of `null` means the option title is used as caption. * - * @name LuCI.form.ButtonValue.prototype#inputtitle + * @name LuCI.form.Button.prototype#inputtitle * @type string|function * @default null */ @@ -4805,7 +4805,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp * * The default of `null` means a neutral button styling is used. * - * @name LuCI.form.ButtonValue.prototype#inputstyle + * @name LuCI.form.Button.prototype#inputstyle * @type string * @default null */ @@ -4822,7 +4822,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp * DOM click element as the first and the underlying configuration section ID * as the second argument. * - * @name LuCI.form.ButtonValue.prototype#onclick + * @name LuCI.form.Button.prototype#onclick * @type function * @default null */