2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 20:17:45 +00:00

fhemweb.js: show set results in a dialog, not FW_errmsg (Forum #38875)

git-svn-id: https://svn.fhem.de/fhem/trunk@8916 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-07-08 11:05:35 +00:00
parent 588f4ea4af
commit 38564381c6

View File

@ -354,7 +354,16 @@ FW_replaceLink(el)
return; return;
$(el).removeAttr("href"); $(el).removeAttr("href");
$(el).removeAttr("onclick"); $(el).removeAttr("onclick");
$(el).click(function() { FW_cmd(attr+"&XHR=1"); }); $(el).click(function() {
FW_cmd(attr+"&XHR=1", function(txt){
if(!txt)
return;
if(ma[2].match(/=set/)) // Forum #38875
FW_okDialog(txt, el);
else
FW_errmsg(txt, 5000);
});
});
$(el).css("cursor", "pointer"); $(el).css("cursor", "pointer");
} }