summaryrefslogtreecommitdiff
path: root/www/js/DevOptionsCtrl.js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-06-24 18:47:42 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-06-24 18:47:42 -0400
commit855a0e8ddc273b58066530a1b55a946021dfc56e (patch)
tree26550033e855a31a265fc2da4da3df0cc2733dc1 /www/js/DevOptionsCtrl.js
parentd442629aa825aab6bc55ab6be19e3aba060867fe (diff)
Cleaned up code, commented, preparing for HTTPS via CordovaHTTP
Diffstat (limited to 'www/js/DevOptionsCtrl.js')
-rw-r--r--www/js/DevOptionsCtrl.js45
1 files changed, 25 insertions, 20 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index 7c9cfce7..f332bc50 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -3,41 +3,46 @@
/* global cordova,StatusBar,angular,console */
angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', function ($scope, $rootScope, $ionicModal, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading) {
+
+
$scope.openMenu = function () {
$ionicSideMenuDelegate.toggleLeft();
};
- $scope.loginData = ZMDataModel.getLogin();
+//------------------------------------------------------------------
+// Perform the login action when the user submits the login form
+//------------------------------------------------------------------
+ $scope.saveDevOptions = function () {
+ console.log('Saving Dev Options');
+ if (parseInt($scope.loginData.maxMontage) > 10) {
+ $ionicPopup.alert({
+ title: 'Note',
+ template: 'You have selected to view more than 10 monitors in the Montage screen. Note that this is very resource intensive and may load the server or cause issues in the application. If you are not sure, please consider limiting this value to 10'
+ });
+ }
- // Perform the login action when the user submits the login form
- $scope.saveDevOptions = function () {
- console.log('Saving Dev Options');
+ if ((parseInt($scope.loginData.maxFPS) < 0) || (parseInt($scope.loginData.maxFPS) > 30)) {
+ $scope.loginData.maxFPS = '3';
+ }
- if (parseInt($scope.loginData.maxMontage) > 10) {
- $ionicPopup.alert({
- title: 'Note',
- template: 'You have selected to view more than 10 monitors in the Montage screen. Note that this is very resource intensive and may load the server or cause issues in the application. If you are not sure, please consider limiting this value to 10'
- });
- }
+ if ((parseInt($scope.loginData.montageQuality) < 10) || (parseInt($scope.loginData.montageQuality) > 70)) {
+ $scope.loginData.montageQuality = '50';
+ }
- if ((parseInt($scope.loginData.maxFPS) <0) || (parseInt($scope.loginData.maxFPS)>30))
- {
- $scope.loginData.maxFPS='3';
- }
- if ((parseInt($scope.loginData.montageQuality) <10) || (parseInt($scope.loginData.montageQuality)>70))
- {
- $scope.loginData.montageQuality='50';
- }
+ ZMDataModel.setLogin($scope.loginData);
+};
+ //------------------------------------------------------------------
+ // controller main
+ //------------------------------------------------------------------
+ $scope.loginData = ZMDataModel.getLogin();
- ZMDataModel.setLogin($scope.loginData);
- };
}]);