Skip to content

Commit

Permalink
#1012 don't show monitors that are hidden in filters
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Jan 23, 2021
1 parent 2efa5b0 commit efaedfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions www/js/EventDateTimeFilterCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ angular.module('zmApp.controllers')
}
else {
for (var i=0; i < $scope.monitors.length; i++) {
//console.log ($scope.monitors[i].Monitor.Id + " IS "+$scope.monitors[i].Monitor.listDisplay);
if ($scope.monitors[i].Monitor.isChecked == undefined)
$scope.monitors[i].Monitor.isChecked = true;
if ($scope.monitors[i].Monitor.isChecked == true)
Expand All @@ -60,6 +61,11 @@ angular.module('zmApp.controllers')
$scope.monitorsExpanded = !$scope.monitorsExpanded;

};

$scope.onlyUnhidden = function (item) {
//console.log (' STATUS IS '+item.Monitor.listDisplay);
return item.Monitor.listDisplay != 'noshow';
};
//--------------------------------------------------------------------------
// Clears filters
//--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions www/templates/events-date-time-filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<ion-item class="custom-list" ng-click="toggleMonitors()">
<i class="icon" ng-class="monitorsExpanded ? 'ion-minus' : 'ion-plus'"></i> &nbsp;Filter Monitors
</ion-item>
<ion-item class="item-accordion" ng-show="monitorsExpanded" ng-repeat="monitor in monitors">
<ion-item class="item-accordion" ng-show="monitorsExpanded" ng-repeat="monitor in monitors | filter:onlyUnhidden">

<span class="item-checkbox">

{{monitor.Monitor.Name}}
<label class="checkbox">
<input type="checkbox" ng-model="monitor.Monitor.isChecked">
Expand Down

0 comments on commit efaedfa

Please sign in to comment.