summaryrefslogtreecommitdiff
path: root/www/js/EventDateTimeFilterCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-03-25 16:01:13 -0400
committerPliable Pixels <pliablepixels@gmail.com>2019-03-25 16:01:13 -0400
commit9c4fb098bab9e69b25c969dd2ef87a864e809337 (patch)
treef03e74e1e82c3e07f38539fcdcd7ce0a87a69bfd /www/js/EventDateTimeFilterCtrl.js
parent12f6856f911d8ee7c47f3116ed7f37b6e4ef9752 (diff)
timeline custom range goes to event
Diffstat (limited to 'www/js/EventDateTimeFilterCtrl.js')
-rw-r--r--www/js/EventDateTimeFilterCtrl.js33
1 files changed, 27 insertions, 6 deletions
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;
+ }
+
+
};
}