From 5e7d231a702b087542da7e4d19534ae9b375a5ca Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 27 Aug 2016 19:01:51 -0400 Subject: eliminate JSHint 'prefer array literal notation' warning and use kAll Former-commit-id: 3c2665b549b7de527f6a00ed06112897f707b8b9 --- www/js/MonitorCtrl.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'www/js/MonitorCtrl.js') diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 885796f0..e56ae47d 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -83,11 +83,17 @@ angular.module('zmApp.controllers') //----------------------------------------------------------------------- $scope.changeConfig = function (monitorName, monitorId, enabled, func) { var checked = false; + + if (monitorName == 'All') + { + monitorName = $translate.instant('kAll'); + } + //console.log("called with " + monitorId + ":" + enabled + ":" + func); if (enabled == '1') checked = true; //if monitorId is not specified, all monitors will be changed - var monitorsIds = new Array(); + var monitorsIds = []; if (monitorId == '') { for (var i = 0; i < $scope.monitors.length; i++) { monitorsIds[i] = $scope.monitors[i].Monitor.Id; @@ -128,8 +134,8 @@ angular.module('zmApp.controllers') mymonitorsIds: monitorsIds, myfunc: func, myenabled: checked, - myfailedIds: new Array(), - mypromises: new Array() + myfailedIds: [], + mypromises: [] }; $rootScope.zmPopup = $ionicPopup.show({ -- cgit v1.2.3