mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
fhemweb.js: optional size parameter for the multiple widget (Forum #135850)
git-svn-id: https://svn.fhem.de/fhem/trunk@28196 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0a88408868
commit
e70762d61e
@ -2047,8 +2047,11 @@ FW_createMultiple(elName, devName, vArr, currVal, set, params, cmd)
|
|||||||
if(vArr.length < 2 || (vArr[0]!="multiple" && vArr[0]!="multiple-strict") ||
|
if(vArr.length < 2 || (vArr[0]!="multiple" && vArr[0]!="multiple-strict") ||
|
||||||
(params && params.length))
|
(params && params.length))
|
||||||
return undefined;
|
return undefined;
|
||||||
|
var iSize = 30;
|
||||||
|
if(vArr[vArr.length-1].charAt(0) == "#")
|
||||||
|
iSize = vArr.pop().substr(1);
|
||||||
|
|
||||||
var newEl = $('<input type="text" size="30" readonly>').get(0);
|
var newEl = $('<input type="text" size="'+iSize+'" readonly>').get(0);
|
||||||
if(currVal)
|
if(currVal)
|
||||||
$(newEl).val(currVal);
|
$(newEl).val(currVal);
|
||||||
if(elName)
|
if(elName)
|
||||||
@ -2418,25 +2421,25 @@ FW_rescueClient(pid, key)
|
|||||||
<li>noArg - show no input field.</li>
|
<li>noArg - show no input field.</li>
|
||||||
<li>time - show a JavaScript driven timepicker.<br>
|
<li>time - show a JavaScript driven timepicker.<br>
|
||||||
Example: attr FS20dev widgetOverride on-till:time</li>
|
Example: attr FS20dev widgetOverride on-till:time</li>
|
||||||
<li>textField[,placeholder,tfsize] - show an input field. tfsize is the size
|
<li>textField[,placeholder,inputSize] - show an input field.<br>
|
||||||
attribute for the input field, defaults to 30. <br>
|
inputSize is the size attribute for the input field, defaults to 30. <br>
|
||||||
Example: attr WEB widgetOverride room:textField</li>
|
Example: attr WEB widgetOverride room:textField,Name_Of_The_Room,20</li>
|
||||||
<li>textFieldNL[,placeholder,tfsize] - show the input field and hide the
|
<li>textFieldNL[,placeholder,inputSize] - show the input field and hide the
|
||||||
label.</li>
|
label.</li>
|
||||||
<li>textField-long[,sizePct,tfsize] - show an input-field, but upon
|
<li>textField-long[,sizePct,inputSize] - show an input-field, but upon
|
||||||
clicking on the input field open a textArea.
|
clicking on the input field open a textArea.
|
||||||
sizePct specifies the size of the dialog relative to the screen, in
|
sizePct specifies the size of the dialog relative to the screen, in
|
||||||
percent. Default is 75</li>
|
percent. Default is 75</li>
|
||||||
<li>textFieldNL-long[,sizePct,tfsize] - the behaviour is the same
|
<li>textFieldNL-long[,sizePct,inputSize] - the behaviour is the same
|
||||||
as :textField-long, but no label is displayed.</li>
|
as :textField-long, but no label is displayed.</li>
|
||||||
<li>slider,<min>,<step>,<max>[,1] - show
|
<li>slider,<min>,<step>,<max>[,1] - show
|
||||||
a JavaScript driven slider. The optional ,1 at the end
|
a JavaScript driven slider. The optional ,1 at the end
|
||||||
avoids the rounding of floating-point numbers.</li>
|
avoids the rounding of floating-point numbers.</li>
|
||||||
<li>multiple,<val1>,<val2>,..." - present a
|
<li>multiple,<val1>,<val2>,...[,#inputSize]" - present a
|
||||||
multiple-value-selector with an additional textfield. The result is
|
multiple-value-selector with an additional textfield. The result is
|
||||||
comman separated.</li>
|
comman separated.</li>
|
||||||
<li>multiple-strict,<val1>,<val2>,... - like :multiple, but
|
<li>multiple-strict,<val1>,<val2>,...[,#inputSize]
|
||||||
without the textfield.</li>
|
- like multiple, but without the textfield.</li>
|
||||||
<li>selectnumbers,<min>,<step>,<max>,<number of
|
<li>selectnumbers,<min>,<step>,<max>,<number of
|
||||||
digits after decimal point>,lin|log10" - display a select widget
|
digits after decimal point>,lin|log10" - display a select widget
|
||||||
generated with values from min to max with step.<br>
|
generated with values from min to max with step.<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user