From fbc612ce9fb5b23a5358d103adce79ac1575143c Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sat, 19 Sep 2015 18:10:39 -0400 Subject: event pullup and filter related fixes --- www/js/EventDateTimeFilterCtrl.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'www/js/EventDateTimeFilterCtrl.js') diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index 66dac51e..5169c939 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -5,7 +5,7 @@ angular.module('zmApp.controllers') - .controller('zmApp.EventDateTimeFilterCtrl', ['$scope', '$ionicSlideBoxDelegate', '$ionicSideMenuDelegate', '$rootScope', '$ionicHistory', 'ZMDataModel', function ($scope, $ionicScrollDelegate,$ionicSideMenuDelegate, $rootScope, $ionicHistory, ZMDataModel) { + .controller('zmApp.EventDateTimeFilterCtrl', ['$scope', '$ionicSlideBoxDelegate', '$ionicSideMenuDelegate', '$rootScope', '$ionicHistory', 'ZMDataModel', '$state', function ($scope, $ionicScrollDelegate,$ionicSideMenuDelegate, $rootScope, $ionicHistory, ZMDataModel, $state) { $scope.removeFilters = function() { @@ -16,7 +16,17 @@ $scope.removeFilters = function() $rootScope.toTime=""; $rootScope.fromString=""; $rootScope.toString=""; - $ionicHistory.goBack(); + + // if you come here via the events pullup + // you are looking at a specific monitor ID + // going back will only retain that monitor ID + // so lets reload with all monitors + $ionicHistory.nextViewOptions({ + disableBack: true + }); + $state.go("events", {"id":0}); + + //$ionicHistory.goBack(); }; $scope.saveFilters = function() -- cgit v1.2.3