From 80166a1ab54eeb42989c9cecd3ba21bbad94fa75 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 22 Dec 2021 11:25:46 -0500 Subject: [PATCH] Fix preset labels not being populated and causing javascript errors when they are. --- web/skins/classic/views/js/watch.js.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/web/skins/classic/views/js/watch.js.php b/web/skins/classic/views/js/watch.js.php index 04a6c0757..be8065d12 100644 --- a/web/skins/classic/views/js/watch.js.php +++ b/web/skins/classic/views/js/watch.js.php @@ -60,16 +60,16 @@ var mode = ""; var monitorData = new Array(); monitorData[monitorData.length] = { - 'id': Id() ?>, - 'width': ViewWidth() ?>, - 'height':ViewHeight() ?>, - 'url': 'UrlToIndex() ?>', - 'onclick': function(){window.location.assign( '?view=watch&mid=Id() ?>' );}, - 'type': 'Type() ?>', - 'refresh': 'Refresh() ?>' + 'id': Id() ?>, + 'width': ViewWidth() ?>, + 'height':ViewHeight() ?>, + 'url': 'UrlToIndex() ?>', + 'onclick': function(){window.location.assign( '?view=watch&mid=Id() ?>' );}, + 'type': 'Type() ?>', + 'refresh': 'Refresh() ?>' }; ; var labels = new Array(); Id())) as $row) { $label = $labels[$row['Preset']] = $row['Label']; - echo 'labels['. validInt($index) .'] = \''.validJsStr($label).'\''; + echo 'labels['. validInt($row['Preset']) .'] = \''.validJsStr($label).'\';'.PHP_EOL; } ?> var deleteString = "";