diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-12-31 09:42:44 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-12-31 09:42:44 -0500 |
| commit | 58d83ee94b9d3c682f28d8763423edc121e458cf (patch) | |
| tree | 62c26fc311aa61d2c0070d25f183836555928558 /www | |
| parent | 8421165caf3f17441b89257d06fec75f93e8e2ec (diff) | |
Make sure swipe does not show flags is alarms/scrub is on #388
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventCtrl.js | 14 | ||||
| -rw-r--r-- | www/templates/events.html | 17 |
2 files changed, 25 insertions, 6 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index bde55b86..a5ddc44d 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -950,6 +950,15 @@ angular.module('zmApp.controllers') }; + $scope.alarmSwipe = function(e) + { + + //alert ("HERE"); + console.log ("HERE"); + e.stopPropagation(); + e.preventDefault(); + }; + $scope.toggleMotionOutline = function() { $scope.outlineMotion = !$scope.outlineMotion; @@ -2079,6 +2088,7 @@ angular.module('zmApp.controllers') } event.Event.ShowScrub = !event.Event.ShowScrub; + //console.log ("SCRUBBING IS "+event.Event.ShowScrub); // $ionicScrollDelegate.resize(); //console.log ("GROUP TYPE IS " + groupType); @@ -2088,8 +2098,8 @@ angular.module('zmApp.controllers') if (groupType == 'alarms') { - $ionicListDelegate.canSwipeItems(false); - NVRDataModel.debug ("Disabling flag swipe as alarms are swipable"); + // $ionicListDelegate.canSwipeItems(false); + //NVRDataModel.debug ("Disabling flag swipe as alarms are swipable"); $scope.alarm_images = []; event.Event.height = (eventsListDetailsHeight + eventsListScrubHeight); $ionicScrollDelegate.resize(); diff --git a/www/templates/events.html b/www/templates/events.html index a14452bc..b739b19a 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -126,7 +126,9 @@ <span translate="kOutlineMotion"></span>:{{outlineMotion}} </button> </p> - <ion-scroll direction="x" overflow-scroll="false"> + + + <ion-scroll direction="x" overflow-scroll="false" on-swipe-left="alarmSwipe($event)"> <span ng-repeat="alarm in alarm_images | selectFrames: typeOfFrames"> <figure class = "animated slideInLeft" style="display:inline-block"> @@ -138,6 +140,8 @@ </figure> </span> </ion-scroll> + + </div> </div> <div ng-if="groupType=='scrub'"> @@ -192,11 +196,16 @@ <ion-delete-button class="ion-minus-circled" ng-click="deleteEvent(event.Event.Id, $index)"> </ion-delete-button> - - <ion-option-button ng-if="event.Event.Archived == 1" class="button-balanced" ng-click= "archiveUnarchiveEvent($index,event.Event.Id)">{{'kUnflag' | translate}}</ion-option-button> + + VAL:{{event.Event.ShowScrub}} - <ion-option-button ng-if="event.Event.Archived == 0" class="button-assertive" ng-click="archiveUnarchiveEvent($index, event.Event.Id)" >{{'kFlag' | translate}}</ion-option-button> + + + <ion-option-button ng-if="event.Event.Archived == 1 && !event.Event.ShowScrub" class="button-balanced" ng-click= "archiveUnarchiveEvent($index,event.Event.Id)">{{'kUnflag' | translate}}</ion-option-button> + <ion-option-button ng-if="event.Event.Archived == 0 && !event.Event.ShowScrub" class="button-assertive" ng-click="archiveUnarchiveEvent($index, event.Event.Id)" >{{'kFlag' | translate}}</ion-option-button> + + <!-- hack to make sure swipe left displays well if there is no content and our list height is set to a larger height, the swipe display acts weird --> |
