From 9c4fb098bab9e69b25c969dd2ef87a864e809337 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 25 Mar 2019 16:01:13 -0400 Subject: timeline custom range goes to event --- www/js/EventDateTimeFilterCtrl.js | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'www/js/EventDateTimeFilterCtrl.js') diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index 07eea5db..51ebe91f 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -47,7 +47,7 @@ angular.module('zmApp.controllers') // going back will only retain that monitor ID // so lets reload with all monitors // - //console.log (">>> BACKVIEW="+$ionicHistory.backTitle()); + if ($ionicHistory.backTitle() == 'Timeline') { $ionicHistory.nextViewOptions({ @@ -119,14 +119,35 @@ angular.module('zmApp.controllers') // // var startDate = moment(temp).format("YYYY-MM-DD hh:mm:ss"); NVR.debug("DateTimeFilter: From/To is now: " + $rootScope.fromString + " & " + $rootScope.toString); + $ionicHistory.nextViewOptions({ disableBack: true }); - $state.go("app.events", { - "id": 0, - "playEvent": false - }); - return; + + console.log (" >>>>>>>> BACK VIEW = "+$ionicHistory.backTitle()); + + if ($ionicHistory.backTitle() == 'Timeline') { + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("app.timeline", { + "id": 0, + "playEvent": false + }); + return; + } else // in events, backview is undefined? + { + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("app.events", { + "id": 0, + "playEvent": false + }); + return; + } + + }; } -- cgit v1.2.3