diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-04-02 16:43:35 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-04-02 16:43:35 -0400 |
| commit | 3677b13a59fb77df778aff01d8e815150f6ec86b (patch) | |
| tree | 0b60009590d8b10d2849b04f8b8a9efbbcb124c8 /www | |
| parent | 11fb620b9234b174aa232ec51a2555aec6dcb7dd (diff) | |
#209 and #215 - have fun
Former-commit-id: 4b8bd8773014a7f6d34b011494e6451ae15b326f
Diffstat (limited to 'www')
| -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 | ||||
| -rw-r--r-- | www/templates/events.html | 5 | ||||
| -rw-r--r-- | www/templates/timeline-modal.html | 2 |
7 files changed, 49 insertions, 10 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); diff --git a/www/templates/events.html b/www/templates/events.html index 51af9d22..d4ef85a7 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -107,6 +107,11 @@ <span style="float:right"> <div ng-if="event.Event.EndTime"> + + <button class="button button-small icon icon-left ion-stats-bars" + ng-click="closeIfOpen(event);analyzeEvent(event)" > Analyze + </button> + <button class="button button-small icon icon-left ion-ios-eye" ng-click="toggleGroupScrub(event,$index,event.Event.Frames)" > Scrub </button> diff --git a/www/templates/timeline-modal.html b/www/templates/timeline-modal.html index 26de8e44..73dc27f3 100644 --- a/www/templates/timeline-modal.html +++ b/www/templates/timeline-modal.html @@ -14,7 +14,7 @@ </div> <center> <h5>Showing {{graphType}} frames </h5> - <p>double-tap exits. touch/mouse-over and drag over bars to see frames</p> + <p>double-tap exits. touch/mouse-over and drag over items to see frames</p> {{errorDetails}} |
