diff options
| -rw-r--r-- | .DS_Store | bin | 12292 -> 14340 bytes | |||
| -rw-r--r-- | resources/.DS_Store | bin | 10244 -> 10244 bytes | |||
| -rw-r--r-- | resources/ios/.DS_Store | bin | 6148 -> 6148 bytes | |||
| -rw-r--r-- | www/external/android-notification-icons/.DS_Store | bin | 0 -> 8196 bytes | |||
| -rw-r--r-- | www/js/DevOptionsCtrl.js | 20 | ||||
| -rw-r--r-- | www/js/LoginCtrl.js | 22 | ||||
| -rw-r--r-- | www/templates/devoptions.html | 10 | ||||
| -rw-r--r-- | www/templates/eventserversettings.html | 7 | ||||
| -rw-r--r-- | www/templates/login.html | 8 |
9 files changed, 55 insertions, 12 deletions
| Binary files differ diff --git a/resources/.DS_Store b/resources/.DS_Store Binary files differindex 5ec845ea..d446f978 100644 --- a/resources/.DS_Store +++ b/resources/.DS_Store diff --git a/resources/ios/.DS_Store b/resources/ios/.DS_Store Binary files differindex 6295acec..d0ea94a6 100644 --- a/resources/ios/.DS_Store +++ b/resources/ios/.DS_Store diff --git a/www/external/android-notification-icons/.DS_Store b/www/external/android-notification-icons/.DS_Store Binary files differnew file mode 100644 index 00000000..a6cabb45 --- /dev/null +++ b/www/external/android-notification-icons/.DS_Store diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js index e474c6ac..129b84fa 100644 --- a/www/js/DevOptionsCtrl.js +++ b/www/js/DevOptionsCtrl.js @@ -24,6 +24,17 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope' $state.go("events", {"id": 0}, { reload: true }); } }; + + + //---------------------------------------------------------------- + // Save anyway when you exit + //---------------------------------------------------------------- + + $scope.$on('$ionicView.beforeLeave', function () { + saveDevOptions(); + + + }); //------------------------------------------------------------------------- // Lets make sure we set screen dim properly as we enter @@ -40,7 +51,9 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope' //------------------------------------------------------------------ // Perform the login action when the user submits the login form //------------------------------------------------------------------ - $scope.saveDevOptions = function () { + + function saveDevOptions() + { ZMDataModel.zmDebug("SaveDevOptions: called"); if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) { @@ -80,6 +93,11 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope' }).then(function (res) { $ionicSideMenuDelegate.toggleLeft(); }); + } + + $scope.saveDevOptions = function () { + saveDevOptions(); + }; //------------------------------------------------------------------ // controller main diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index a0112969..388ee33a 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -31,9 +31,21 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r $scope.check.isUseEventServer = ($scope.loginData.isUseEventServer == '1') ? true : false; + + //---------------------------------------------------------------- + // Save anyway when you exit + //---------------------------------------------------------------- + + $scope.$on('$ionicView.beforeLeave', function () { + // Don't do this -- it will try to login to ZM + // and go back to the menu + //saveItems(); + }); + + //------------------------------------------------------------------------- // Lets make sure we set screen dim properly as we enter // The problem is we enter other states before we leave previous states @@ -134,8 +146,10 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r //----------------------------------------------------------------------------- // Perform the login action when the user submits the login form //----------------------------------------------------------------------------- - $scope.save = function () { - console.log('Saving login'); + + function saveItems() + { + console.log('Saving login'); /*if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) { $ionicPopup.alert({ @@ -270,6 +284,10 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r }); + } + + $scope.saveItems = function () { + saveItems(); }; diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html index 5b1d2936..78c5dbbb 100644 --- a/www/templates/devoptions.html +++ b/www/templates/devoptions.html @@ -1,10 +1,14 @@ -<ion-view view-title="Developer Settings"> +<ion-view view-title="Dev. Settings"> <ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button> <button data-badge="{{$root.alarmCount}}" class="animated infinite tada button button-icon button-clear ion-ios-bell notification-badge" ng-click="handleAlarms();" ng-if="$root.isAlarm"></button> </ion-nav-buttons> + + <ion-nav-buttons side="right"> + <button class="button button-clear" ng-click="saveDevOptions()">Save</button> + </ion-nav-buttons> <ion-content class="padding"> @@ -59,9 +63,7 @@ toggle-class="toggle-calm">Persist hidden monitors</ion-toggle> </label> - <button class="button button-block button-balanced icon ion-locked" - ng-click="saveDevOptions()"> Save - </button> + </div> </ion-content> </ion-view> diff --git a/www/templates/eventserversettings.html b/www/templates/eventserversettings.html index 68e9f1be..65b9affc 100644 --- a/www/templates/eventserversettings.html +++ b/www/templates/eventserversettings.html @@ -10,8 +10,11 @@ <button class="button button-clear" ng-click="saveItems()">Save</button> </ion-nav-buttons> - <ion-content> - + <ion-content padding="true"> + + <div class="list list-inset"> + Please make sure your ZM settings are configured and saved before you configure the event server + </div> <ion-checkbox ng-model="check.isUseEventServer">use event server</ion-checkbox> <label class="item item-input item-floating-label" ng-if="check.isUseEventServer"> diff --git a/www/templates/login.html b/www/templates/login.html index 8a14981d..df415cd6 100644 --- a/www/templates/login.html +++ b/www/templates/login.html @@ -4,6 +4,10 @@ <button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button> <button data-badge="{{$root.alarmCount}}" class="animated infinite tada button button-icon button-clear ion-ios-bell notification-badge" ng-click="handleAlarms();" ng-if="$root.isAlarm"></button> </ion-nav-buttons> + + <ion-nav-buttons side="right"> + <button class="button button-clear" ng-click="saveItems()">Save</button> + </ion-nav-buttons> <ion-content padding="true" > <div class="list list-inset"> @@ -88,9 +92,7 @@ </ion-toggle> </label> </div> - <button class="button button-block button-balanced icon ion-locked" - ng-click="save()"> Save - </button> + </ion-content> </ion-view> |
