From 9cdc24caa83a0224b39ce4c9afc5215fb0bc7477 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 27 Dec 2017 08:45:48 +0000 Subject: [PATCH] fhemweb.js: fix RawDef/Probably assoc. with & codeMirror (Forum #81595) git-svn-id: https://svn.fhem.de/fhem/trunk@15701 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/01_FHEMWEB.pm | 2 ++ fhem/www/pgm2/fhemweb.js | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 1dd0e0c6c..d0b689e1a 100644 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -235,6 +235,8 @@ FW_Define($$) return "Usage: define FHEMWEB [IPV6:] [global]" if($port !~ m/^(IPV6:)?\d+$/ || ($global && $global ne "global")); + FW_Undef($hash) if($hash->{OLDDEF}); # modify + foreach my $pe ("fhemSVG", "openautomation", "default") { FW_readIcons($pe); } diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 9584fc18c..24ab5d29f 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -641,7 +641,7 @@ function FW_inlineModify() // Do not generate a new HTML page upon pressing modify { var cm; - + if( typeof AddCodeMirror == 'function' ) { // init codemirror for FW_style edit textarea AddCodeMirror($('textarea[name="data"]')); @@ -720,21 +720,24 @@ FW_rawDef() var textAreaStyle = typeof AddCodeMirror == 'function'?'opacity:0':''; $("#content").append('
'+ - '