2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

fhemweb.js: replaceLink (Forum #33766), first number for the slider (Forum #33861)

git-svn-id: https://svn.fhem.de/fhem/trunk@8029 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-02-18 16:20:29 +00:00
parent 5d6e0f9938
commit be4ff3bee6

View File

@ -239,7 +239,7 @@ FW_okDialog(txt, parent)
});
FW_replaceWidgets(div);
FW_replaceLink(div); // Forum #33766
$(div).find("a[href]").each(function(){FW_replaceLink(this);}); //Forum #33766
if(parent)
$(div).dialog( "option", "position", {
@ -765,8 +765,8 @@ FW_createSlider(elName, devName, vArr, currVal, set, params, cmd)
sh.ontouchstart = function(e) { touchFn(e, mouseDown); }
newEl.setValueFn = function(arg) {
arg = arg.replace(/[^\d.\-]/g, ""); // remove non numbers
currVal = (arg == "" ? min : parseFloat(arg));
var res = arg.match(/[\d.\-]+/); // extract first number
currVal = (res ? parseFloat(res[0]) : min);
if(currVal < min || currVal > max)
currVal = min;
newEl.activateFn();