diff options
| author | ARC <arjunrc@gmail.com> | 2015-04-28 12:33:43 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-04-28 12:33:43 -0400 |
| commit | 1ae553e8e300eb3ce602626d3f3b761c9c6e317a (patch) | |
| tree | 50cf98f7ba006863346de9fe7f9b05150a5ab330 /www/js/MonitorCtrl.js | |
| parent | ab7867fb10b939744feeb2e05b168f24dfae5219 (diff) | |
Added monitor live view
Diffstat (limited to 'www/js/MonitorCtrl.js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 2db85aa5..ec919c1d 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -1,13 +1,43 @@ // controller for Monitor View -angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', function ($scope, ZMDataModel, message,$ionicSideMenuDelegate) { +angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', function ($scope, ZMDataModel, message,$ionicSideMenuDelegate, $ionicLoading, $ionicModal) { $scope.monitors = []; + $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); } + $scope.openModal = function (mid) { + console.log("Open Monitor Modal"); + + $scope.monitorId = mid; + $scope.LoginData = ZMDataModel.getLogin(); + $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + $scope.modal.show(); + }; + $scope.closeModal = function () { + console.log("Close Monitor Modal"); + $scope.modal.hide(); + + }; + //Cleanup the modal when we're done with it! + $scope.$on('$destroy', function () { + console.log("Destroy Monitor Modal"); + $scope.modal.remove(); + }); + +// This is a modal to show the monitor footage + $ionicModal.fromTemplateUrl('templates/monitors-modal.html', { + scope: $scope, + animation: 'slide-in-up' + }) + .then(function (modal) { + $scope.modal = modal; + + }); + console.log("***EVENTS: Waiting for Monitors to load before I proceed"); $scope.monitors = message; |
