mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
01_FHEMWEB.pm/fhemweb.js: add :textField-longNL modifier (Forum #53393)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11489 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9c5a28ecf5
commit
120f834808
@ -3509,6 +3509,8 @@ FW_widgetOverride($$)
|
|||||||
is displayed.</li>
|
is displayed.</li>
|
||||||
<li>if the modifier is ":textField-long", is like textField, but upon
|
<li>if the modifier is ":textField-long", is like textField, but upon
|
||||||
clicking on the input field a textArea (60x25) will be opened.</li>
|
clicking on the input field a textArea (60x25) will be opened.</li>
|
||||||
|
<li>if the modifier is ":textField-longNL", the behaviour is the same
|
||||||
|
as :textField-long, but no label is displayed.</li>
|
||||||
|
|
||||||
<li>if the modifier is of the form
|
<li>if the modifier is of the form
|
||||||
":slider,<min>,<step>,<max>[,1]", then a
|
":slider,<min>,<step>,<max>[,1]", then a
|
||||||
|
@ -793,14 +793,15 @@ FW_createTextField(elName, devName, vArr, currVal, set, params, cmd)
|
|||||||
if(vArr.length != 1 ||
|
if(vArr.length != 1 ||
|
||||||
(vArr[0] != "textField" &&
|
(vArr[0] != "textField" &&
|
||||||
vArr[0] != "textFieldNL" &&
|
vArr[0] != "textFieldNL" &&
|
||||||
vArr[0] != "textField-long") ||
|
vArr[0] != "textField-long" &&
|
||||||
|
vArr[0] != "textField-longNL") ||
|
||||||
(params && params.length))
|
(params && params.length))
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
||||||
var is_long = (vArr[0] == "textField-long");
|
var is_long = (vArr[0].indexOf("long") > 0);
|
||||||
|
|
||||||
var newEl = $("<div style='display:inline-block'>").get(0);
|
var newEl = $("<div style='display:inline-block'>").get(0);
|
||||||
if(set && set != "state" && vArr[0] != "textFieldNL")
|
if(set && set != "state" && vArr[0].indexOf("NL") < 0)
|
||||||
$(newEl).append(set+":");
|
$(newEl).append(set+":");
|
||||||
$(newEl).append('<input type="text" size="30">');
|
$(newEl).append('<input type="text" size="30">');
|
||||||
var inp = $(newEl).find("input").get(0);
|
var inp = $(newEl).find("input").get(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user