From b1249a55c8c24f43ed6cbd1cecee95098f16dd57 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Wed, 23 Dec 2015 18:02:17 +0000 Subject: [PATCH] fhemweb_readingsGroup.js: use mapping only for textField label git-svn-id: https://svn.fhem.de/fhem/trunk@10241 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb_readingsGroup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fhem/www/pgm2/fhemweb_readingsGroup.js b/fhem/www/pgm2/fhemweb_readingsGroup.js index 977ce1225..0da7d324f 100644 --- a/fhem/www/pgm2/fhemweb_readingsGroup.js +++ b/fhem/www/pgm2/fhemweb_readingsGroup.js @@ -18,7 +18,9 @@ FW_readingsGroupReadyFn() { $(this).find("[rg-fhemWidget-label]").each(function() { var txt = $(this).attr('rg-fhemWidget-label'); - $(this).find('div').first().contents().first().replaceWith(txt); + var contents = $(this).find('div').first().contents(); + if( contents.size() == 2 ) + contents.first().replaceWith(txt); }); }); }