From 1ca4ac0a2d28e7ffb675c38913308d859fcc96a3 Mon Sep 17 00:00:00 2001 From: Ellert <> Date: Fri, 14 May 2021 18:08:18 +0000 Subject: [PATCH] doif.js: tolerate dots in element-id, cleanup git-svn-id: https://svn.fhem.de/fhem/trunk@24438 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/www/pgm2/doif.js | 18 +++++------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 625e5672c..f321afe02 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: doif.js: tolerate dots in element id, cleanup - feature: 89_FULLY: Implemented some new commands - bugfix: 98_serviced: interval not starting after FHEM start - feature: 98_serviced: add attr disabledForIntervals diff --git a/fhem/www/pgm2/doif.js b/fhem/www/pgm2/doif.js index f070dc9c2..0c98b5bcb 100644 --- a/fhem/www/pgm2/doif.js +++ b/fhem/www/pgm2/doif.js @@ -13,16 +13,6 @@ function doifUpdateCell(doifname,attrname,attrcont,content,style) { }); } -/*function doifUpdateIconColor(doifname,doifid,fillcolor) { - $("table[uitabid='DOIF-"+doifname+"']").find("svg."+doifid).each(function() { - if(fillcolor.length>0) { - var html = $(this).html().replace(/fill=\".*?\"/gi,'fill="'+fillcolor+'"') - .replace(/fill:.*?[;\s]/gi,'fill:'+fillcolor+';'); - $(this).html(html); - } - }); -}*/ - function doifTablePopUp(hash,name,doif,table) { FW_cmd(FW_root+"?cmd={DOIF_RegisterEvalAll(\$defs{"+name+"},\""+name+"\",\""+table+"\")}&XHR=1", function(data){ var uit = $("[uitabid='DOIF-"+doif+"']"); @@ -52,11 +42,13 @@ $(window).ready(function(){ } if(room !== undefined && nodl !== undefined && nodl != "") { var re1 = new RegExp(nodl); - if (room !="all" && room.match(re1)) - $('#'+uitabid).closest('tr').css('display','none'); + if (room !="all" && room.match(re1)) { + var rem = document.getElementById(uitabid); + $(rem).closest('tr').css('display','none'); + } } if($(this).attr("doifnostate") == 1) { - $('#'+uitabid).remove(); + document.getElementById(uitabid).remove(); } }); });