diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DevOptionsCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/EventCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/LowVersionCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/ModalCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/app.js | 21 |
5 files changed, 26 insertions, 5 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js index f64613e4..e474c6ac 100644 --- a/www/js/DevOptionsCtrl.js +++ b/www/js/DevOptionsCtrl.js @@ -2,11 +2,13 @@ /* jslint browser: true*/ /* global cordova,StatusBar,angular,console */ -angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', '$ionicHistory','$state', function ($scope, $rootScope, $ionicModal, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading, $ionicHistory, $state) { +angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', '$ionicHistory','$state', function ($scope, $rootScope, $ionicModal, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading, $ionicHistory, $state) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); + // $scope.this.will.crash = 1; + }; //---------------------------------------------------------------- diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index c2c22304..caa25672 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -125,7 +125,7 @@ angular.module('zmApp.controllers') } else $scope.monitors = message; - console.log ("********** GOT MONITORS " + JSON.stringify($scope.monitors)); + // console.log ("********** GOT MONITORS " + JSON.stringify($scope.monitors)); //$scope.monitors = message; diff --git a/www/js/LowVersionCtrl.js b/www/js/LowVersionCtrl.js index 3e93dcd0..54d5644f 100644 --- a/www/js/LowVersionCtrl.js +++ b/www/js/LowVersionCtrl.js @@ -15,7 +15,7 @@ $scope.openMenu = function () { //------------------------------------------------------------------------ $scope.$on('$ionicView.enter', function () { console.log("**VIEW ** LowVersion Ctrl Entered"); - $ionicSideMenuDelegate.canDragContent(false); + $ionicSideMenuDelegate.canDragContent(true); $scope.requiredVersion = zm.minAppVersion; $scope.currentVersion = $stateParams.ver; diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 9cba8697..25bcbf5c 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -55,7 +55,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco content: '', background: '#2F4F4F', - isOpen: false, + isOpen: true, toggleOnClick: false, button: { cssClass: "fa fa-arrows-alt", diff --git a/www/js/app.js b/www/js/app.js index ddf23ffb..8ebe7801 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -484,6 +484,11 @@ angular.module('zmApp', [ var loginData = ZMDataModel.getLogin(); + //$rootScope.exceptionMessage({reason:exception, cause:cause}); + $rootScope.exceptionMessage = function(error) + { + ZMDataModel.zmDebug("**EXCEPTION**"+error.reason+" caused by " + error.cause); + }; // This code takes care of trapping the Android back button // and takes it to the menu. @@ -706,7 +711,21 @@ angular.module('zmApp', [ //------------------------------------------------------------------ // My route map connecting menu options to their respective templates and controllers -.config(function ($stateProvider, $urlRouterProvider, $httpProvider, $ionicConfigProvider) { +.config(function ($stateProvider, $urlRouterProvider, $httpProvider, $ionicConfigProvider, $provide) { + + + $provide.decorator("$exceptionHandler", ['$delegate','$injector', function($delegate, $injector) { + return function(exception, cause) { + + + var $rootScope = $injector.get("$rootScope"); + $rootScope.exceptionMessage({reason:exception, cause:cause}); + + $delegate(exception, cause); + + }; + }]); + // If you do this, Allow Origin can't be * //$httpProvider.defaults.withCredentials = true; $httpProvider.interceptors.push('timeoutHttpIntercept'); |
