diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-15 14:22:57 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-15 14:22:57 -0500 |
| commit | f4c6ca2e3d1bc5f986d4a6907d06d3ea20e8c701 (patch) | |
| tree | be3b51d8090a37c2a973de6d8176b6cae261e805 /www/js/EventCtrl.js | |
| parent | 778d33929e90b9c454e3ee76e561bb40be66378c (diff) | |
#467 - initial support to launch external URLs to view specific event (and fixes for monitor)
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index e12d2f32..26d47d33 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -121,10 +121,34 @@ angular.module('zmApp.controllers') getInitialEvents(); setupWatchers(); footerExpand(); + // now do event playback if asked + + if (parseInt($rootScope.tappedEid) > 0) { + NVRDataModel.debug (" Trying ot live play " + $rootScope.tappedEid); + playSpecificEvent($rootScope.tappedEid); + + } + },100); }); + + function playSpecificEvent (eid) { + NVRDataModel.log ("Stuffing EID to play back "+ eid); + $rootScope.tappedEid = 0; + var event = { + Event: { + Id:eid + } + + }; + $scope.event = event; + $scope.currentEvent = event; + openModal(event); + + } + $scope.$on('$ionicView.beforeEnter', function() { @@ -140,6 +164,8 @@ angular.module('zmApp.controllers') NVRDataModel.log("EventCtrl called with: EID=" + $scope.id + " playEvent = " + $scope.showEvent); + + // This is the only view that hardcodes row size due to // collection repeat, so lets re-get the text size if it has changed // note that there may be a delay as its a callback - so might involve @@ -2778,6 +2804,11 @@ angular.module('zmApp.controllers') $scope.openModal = function(event) { + openModal(event); + + }; + + function openModal (event) { NVRDataModel.debug("unbinding eventCtrl watchers as modal has its own"); ionRangeWatcher(); mycarouselWatcher(); @@ -2812,8 +2843,7 @@ angular.module('zmApp.controllers') var ld = NVRDataModel.getLogin(); }); - - }; + } //-------------------------------------------------------- //We need to destroy because we are instantiating |
