From bd20fa0596f7fd8bbf5a66f5a60a54912bb60b4e Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Wed, 20 May 2020 17:30:33 +0000 Subject: [PATCH] dashboard.js: Dashboard no longer requires dummy readingsgroup git-svn-id: https://svn.fhem.de/fhem/trunk@21981 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/www/pgm2/dashboard.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index a8f08fc04..ee7b0f62e 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. + - bugfix: dashboard.js: Dashboard no longer requires dummy readingsgroup - feature: 72_XiaomiDevice: new device SmartFan1X, S5 Max vacuum water box - feature: 48_BlinkCamera: Support for BlinkMini - en/disable + thumbnail - change: 93_DbRep: improve 'restore' setlist, revised comRef diff --git a/fhem/www/pgm2/dashboard.js b/fhem/www/pgm2/dashboard.js index 8e85bfd4b..385a6fe62 100644 --- a/fhem/www/pgm2/dashboard.js +++ b/fhem/www/pgm2/dashboard.js @@ -2,9 +2,10 @@ // dashboard.js //########################################################################################################################################### // Released : 14.11.2013 Sascha Hermann -// Modified : 24.09.2019 Heiko Maaz +// Modified : 19.05.2020 Heiko Maaz // // Version : +// 2.0.9: FW_readingsGroupReadyFn in if-condition, avoid "ReferenceError: FW_readingsGroupReadyFn is not defined" // 2.0.8: dashboard_load_tab(tabIndex) test of defined fhemUrl // 2.0.7: Insert Configdialog for Tabs. Change handling of parameters in both directions. // 2.0.6: change Set and Detail Button. @@ -538,7 +539,10 @@ function dashboard_init_tab(tabIndex) { makeResizable('#dashboard_tab' + tabIndex + ' .dashboard_widget'); // call the initialization of reading groups - FW_readingsGroupReadyFn($('#dashboard_tab' + tabIndex)); + if (typeof FW_readingsGroupReadyFn == 'function') { + FW_readingsGroupReadyFn($('#dashboard_tab' + tabIndex)); + } + // FW_readingsGroupReadyFn($('#dashboard_tab' + tabIndex)); // 19.05.2020 V2.0.9 if ((DashboardConfigHash['lockstate'] == "lock") || (dashboard_buttonbar == "hidden")) { dashboard_setlock(tabIndex);