diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-27 19:01:51 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-27 19:01:51 -0400 |
| commit | 5e7d231a702b087542da7e4d19534ae9b375a5ca (patch) | |
| tree | c4cd9f07e90ac35ed741cb232357b9b9a3e64ee7 | |
| parent | 6f61ef7e4b5f1240bc2c08b31fad1eed4c34979b (diff) | |
eliminate JSHint 'prefer array literal notation' warning and use kAll
Former-commit-id: 3c2665b549b7de527f6a00ed06112897f707b8b9
| -rw-r--r-- | www/js/MonitorCtrl.js | 12 |
1 files changed, 9 insertions, 3 deletions
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({ |
