From 38564381c6d3869eef49405787e6b566566c3cd7 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 8 Jul 2015 11:05:35 +0000 Subject: [PATCH] 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 --- fhem/www/pgm2/fhemweb.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index a8e6aef17..58ae7bdbc 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -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"); }