diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-31 08:22:26 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-31 08:22:26 -0400 |
| commit | 5214cdac945bc95cc18f449e91188f6f3c53d3e2 (patch) | |
| tree | b40baf3db7a893a68d5c0aaf4286324cb7457bec /www/js/StateCtrl.js | |
| parent | 49263c5ddd92c4374b23cff4273c1e6460823f80 (diff) | |
placeholder code for bookmarks - not enabled
Diffstat (limited to 'www/js/StateCtrl.js')
| -rw-r--r-- | www/js/StateCtrl.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js index a278c55d..d845d02a 100644 --- a/www/js/StateCtrl.js +++ b/www/js/StateCtrl.js @@ -4,8 +4,8 @@ // controller for State View -angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', '$timeout', '$ionicHistory', '$translate', function ( - $ionicPopup, $scope, zm, NVRDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout, $ionicHistory, $translate) { +angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', '$timeout', '$ionicHistory', '$translate', '$stateParams', function ( + $ionicPopup, $scope, zm, NVRDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout, $ionicHistory, $translate, $stateParams) { //---------------------------------------------------------------------- // Controller main @@ -63,6 +63,16 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup' $scope.$on('$ionicView.enter', function () { // console.log("**VIEW ** Montage Ctrl Entered"); NVRDataModel.setAwake(false); + + }); + + $scope.$on('$ionicView.afterEnter', function () { + // console.log("**VIEW ** Montage Ctrl Entered"); + + console.log ("STATE SHORTCUT: " + JSON.stringify($stateParams)); + $stateParams.shortcut && $stateParams.shortcut.fn && + $scope[$stateParams.shortcut.fn]($stateParams.shortcut.fnargs); // jshint ignore:line + }); //--------------------------------------------------------- @@ -121,6 +131,10 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup' // Allows the user to select a custom run state //--------------------------------------------------------- $scope.selectCustomState = function () { + selectCustomState(); + }; + + function selectCustomState() { $scope.myopt = { selectedState: "" }; @@ -158,7 +172,7 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup' controlZM($scope.myopt.selectedState); } }); - }; + } //---------------------------------------------------------------------- // returns disk space in gigs taken up by events |
