2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

fhemweb.js: fixt selectNumbers default 0 setting (Forum #123053)

git-svn-id: https://svn.fhem.de/fhem/trunk@25022 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-09-27 07:11:18 +00:00
parent 1a5d39b2c7
commit 489bca7eb1

View File

@ -841,6 +841,7 @@ FW_inlineModify() // Do not generate a new HTML page upon pressing modify
} }
}); });
// Set and attr
$("div input.psc[type=submit]:not(.get)").click(function(e){ $("div input.psc[type=submit]:not(.get)").click(function(e){
e.preventDefault(); e.preventDefault();
var newDef = typeof cm !== 'undefined' ? var newDef = typeof cm !== 'undefined' ?
@ -1576,7 +1577,7 @@ FW_createSelect(elName, devName, vArr, currVal, set, params, cmd)
vHash[o.value] = 1; vHash[o.value] = 1;
newEl.options[j-1] = o; newEl.options[j-1] = o;
} }
if(currVal) if(typeof(currVal) != "undefined")
$(newEl).val(currVal); $(newEl).val(currVal);
if(elName) if(elName)
$(newEl).attr('name', elName); $(newEl).attr('name', elName);
@ -1643,7 +1644,7 @@ FW_createSelectNumbers(elName, devName, vArr, currVal, set, params, cmd)
k++; k++;
} }
} }
if(currVal) if(typeof(currVal) != "undefined")
$(newEl).val(currVal.toFixed(dp)); $(newEl).val(currVal.toFixed(dp));
if(elName) if(elName)
$(newEl).attr('name', elName); $(newEl).attr('name', elName);