diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 6 | ||||
| -rw-r--r-- | www/js/EventCtrl.js | 22 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 11 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/TimelineModalCtrl.js | 9 |
5 files changed, 43 insertions, 9 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 96c55a9d..3633d384 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -74,7 +74,7 @@ angular.module('zmApp.controllers') 'use24hr':false, 'packeryPositions':'', 'packerySizes':'', - 'timelineModalGraphType':'alarmed', + 'timelineModalGraphType':'all', }; @@ -447,8 +447,8 @@ angular.module('zmApp.controllers') if (typeof timelineModalGraphType == 'undefined') { - zmDebug ("timeline graph type not set. Setting to alarmed"); - loginData.timelineModalGraphType = 'alarmed'; + zmDebug ("timeline graph type not set. Setting to all"); + loginData.timelineModalGraphType = 'all'; } diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 085893f7..a489cb0e 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1255,6 +1255,24 @@ angular.module('zmApp.controllers') return basePath; } + $scope.analyzeEvent = function(ev) + { + $scope.event = ev; + $ionicModal.fromTemplateUrl('templates/timeline-modal.html', { + scope: $scope, // give ModalCtrl access to this scope + animation: 'slide-in-up', + id:'analyze', + }) + .then(function (modal) { + $scope.modal = modal; + + + + + $scope.modal.show(); + + }); + }; //-------------------------------------------------------- //This is called when we first tap on an event to see @@ -1265,6 +1283,7 @@ angular.module('zmApp.controllers') //-------------------------------------------------------- $scope.openModal = function (event) { + //ZMDataModel.zmDebug("EventCtrl: Open Modal with Base path " + relativepath); $scope.event = event; @@ -1287,7 +1306,8 @@ angular.module('zmApp.controllers') $ionicModal.fromTemplateUrl('templates/events-modal.html', { scope: $scope, - animation: 'slide-in-up' + animation: 'slide-in-up', + id:'footage', }) .then(function (modal) { $scope.modal = modal; diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index ca811e9e..d0fa2991 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -647,7 +647,10 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }); - $scope.$on('modal.shown', function () { + $scope.$on('modal.shown', function (e,m) { + + if (m.id != 'footage') + return; var ld = ZMDataModel.getLogin(); $scope.loginData = ZMDataModel.getLogin(); @@ -696,7 +699,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }); - $scope.$on('modal.removed', function () { + $scope.$on('modal.removed', function (e,m) { + + if (m.id != 'footage') + return; + $scope.isModalActive = false; //console.log("**MODAL REMOVED: Stopping modal timer"); diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index eb11f03d..1a2814e7 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -142,7 +142,9 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla $scope.event = ev; $ionicModal.fromTemplateUrl('templates/timeline-modal.html', { scope: $scope, // give ModalCtrl access to this scope - animation: 'slide-in-up' + animation: 'slide-in-up', + id:'analyze', + }) .then(function (modal) { $scope.modal = modal; diff --git a/www/js/TimelineModalCtrl.js b/www/js/TimelineModalCtrl.js index 0b33006c..05a94696 100644 --- a/www/js/TimelineModalCtrl.js +++ b/www/js/TimelineModalCtrl.js @@ -133,8 +133,10 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' }; - $scope.$on('modal.removed', function () { + $scope.$on('modal.removed', function (e,m) { + if (m.id != 'analyze') + return; //Graph2d.destroy(); tcGraph.destroy(); // Execute action @@ -144,7 +146,10 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' // init drawing here //------------------------------------------------------ - $scope.$on('modal.shown', function () { + $scope.$on('modal.shown', function (e,m) { + + if (m.id != 'analyze') + return; $scope.graphWidth=$rootScope.devWidth-30; ZMDataModel.zmLog ("Setting init graph width to " + $scope.graphWidth); |
