LUCI behaviour

Karl Palsson karlp at tweak.net.au
Fri Oct 22 02:54:15 PDT 2021


Paul D <newtwen at gmail.com> wrote:
> 
> If I use js e.g. :
> 
> o = ss.option(form.TextValue, 'blah', _('blah'), _('blah.'));
> o.optional = true; o.monospace = true;
> 
> 
> And add either:
> 
> o.width = "500px";
> 
> or:
> 
> o.width = "60ch";
> 
> I do not get the desired effect. Is this normal?
> 
> Here (
> https://openwrt.github.io/luci/jsapi/LuCI.form.TextValue.html )
> it says about width:
> 
> ======
> When the property is set to a string value, it is applied as-is
> to the CSS width property.
> 
> This property has no effect on options that are not children of
> grid or table section elements.
> ======
> 
> How does one know that it's a child of said element? ( Is it
> talking about HTML elements? Or LUCI? Also, which 'options'? )

I can answer this at least.  If you are in a 

s = m.section(form.GridSection, 'blah, _('blah blah'));
or
s = m.section(form.TableSection.....

You will be able to use the width property. Otherwise, no affect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP-digital-signature.html
Type: application/pgp-signature
Size: 1175 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20211022/7b14aa97/attachment.sig>


More information about the openwrt-devel mailing list