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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8916 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-07-08 11:05:35 +00:00
parent 81fde773a8
commit 2121e36fb8

View File

@@ -354,7 +354,16 @@ FW_replaceLink(el)
return;
$(el).removeAttr("href");
$(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");
}