mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
01_FHEMWEB.pm/fhemweb.js: fix inplace "set" when reading with same name is present.
git-svn-id: https://svn.fhem.de/fhem/trunk@14042 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e562ae1d4e
commit
4733615719
@ -1241,7 +1241,7 @@ FW_makeTable($$$@)
|
||||
FW_pO "<td><div class=\"dval\">$v$t</div></td>";
|
||||
} else {
|
||||
$t = "" if(!$t);
|
||||
FW_pO "<td><div informId=\"$name-$n\">$v</div></td>";
|
||||
FW_pO "<td><div class=\"dval\" informId=\"$name-$n\">$v</div></td>";
|
||||
FW_pO "<td><div informId=\"$name-$n-ts\">$t</div></td>";
|
||||
}
|
||||
} else {
|
||||
|
@ -640,8 +640,7 @@ FW_inlineModify() // Do not generate a new HTML page upon pressing modify
|
||||
var cmd = $(this).attr("name")+"="+$(this).attr("value")+" "+newDef;
|
||||
var isDef = true;
|
||||
|
||||
if(newDef == undefined ||
|
||||
$(this).attr("value").indexOf("modify") != 0) {
|
||||
if(newDef == undefined || $(this).attr("value").indexOf("modify") != 0) {
|
||||
isDef = false;
|
||||
var div = $(this).closest("div.makeSelect");
|
||||
var devName = $(div).attr("dev"),
|
||||
@ -651,13 +650,13 @@ FW_inlineModify() // Do not generate a new HTML page upon pressing modify
|
||||
var ifid = (devName+"-"+arg).replace(/([^_a-z0-9])/gi,
|
||||
function(m){ return "\\"+m });
|
||||
if($(".dval[informid="+ifid+"]").length == 0) {
|
||||
console.log(this);
|
||||
log("PSC reload");
|
||||
$(this).unbind('click').click();// No element found to replace, reload
|
||||
return;
|
||||
}
|
||||
newDef = $(this).closest("form").find("input:text").val();
|
||||
if(newDef == undefined)
|
||||
newDef = $(this).closest("form").find("select:last").val();
|
||||
newDef = $(this).closest("form").find("input[name^=val]").val();
|
||||
cmd = $(this).attr("name")+"="+cmd+" "+devName+" "+arg+" "+newDef;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user