summaryrefslogtreecommitdiff
path: root/www/js/DevOptionsCtrl.js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-09-29 14:48:08 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-09-29 14:48:08 -0400
commitbd2e8b0aec872b74fe0ec52feec14d3bf3900986 (patch)
treea6878b7a4f322b6f26b59afa2cfe7c878a9f3ab7 /www/js/DevOptionsCtrl.js
parent054bd7beffd8cc304f48f1b1369c118a28bbbf73 (diff)
code formatting
Diffstat (limited to 'www/js/DevOptionsCtrl.js')
-rw-r--r--www/js/DevOptionsCtrl.js70
1 files changed, 37 insertions, 33 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index b711a373..98ee9160 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -2,7 +2,7 @@
/* 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', function ($scope, $rootScope, $ionicModal,zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading) {
+angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', function ($scope, $rootScope, $ionicModal, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading) {
$scope.openMenu = function () {
@@ -21,47 +21,51 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
ZMDataModel.setAwake(false);
});
-//------------------------------------------------------------------
-// Perform the login action when the user submits the login form
-//------------------------------------------------------------------
+ //------------------------------------------------------------------
+ // Perform the login action when the user submits the login form
+ //------------------------------------------------------------------
$scope.saveDevOptions = function () {
- ZMDataModel.zmDebug ("SaveDevOptions: called");
+ ZMDataModel.zmDebug("SaveDevOptions: called");
+
+ if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) {
+ $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'
+ });
+ ZMDataModel.zmDebug("SaveDevOptions: " + $scope.loginData.maxMontage +
+ " monitors for montage");
+ }
- if (parseInt($scope.loginData.maxMontage) > zm.safeMontageLimit) {
- $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'
- });
- ZMDataModel.zmDebug ("SaveDevOptions: " + $scope.loginData.maxMontage + " monitors for montage");
- }
+ if ((parseInt($scope.loginData.maxFPS) < 0) || (parseInt($scope.loginData.maxFPS) > zm.maxFPS)) {
+ $scope.loginData.maxFPS = zm.defaultFPS.toString();
+ }
- if ((parseInt($scope.loginData.maxFPS) < 0) || (parseInt($scope.loginData.maxFPS) > zm.maxFPS)) {
- $scope.loginData.maxFPS = zm.defaultFPS.toString();
- }
-
- if (parseInt($scope.loginData.refeshSec) <=0)
- {
- ZMDataModel.zmDebug ("SaveDevOptions: refresh sec was too low at " + $scope.loginData.refreshSec+ " reset to 1");
- $scope.loginData.refreshSec=1;
-
- }
+ if (parseInt($scope.loginData.refeshSec) <= 0) {
+ ZMDataModel.zmDebug("SaveDevOptions: refresh sec was too low at " +
+ $scope.loginData.refreshSec + " reset to 1");
+ $scope.loginData.refreshSec = 1;
+ }
- if ((parseInt($scope.loginData.montageQuality) < zm.safeMontageLimit) || (parseInt($scope.loginData.montageQuality) > 70)) {
- $scope.loginData.montageQuality = zm.defaultMontageQuality.toString();
- }
+ if ((parseInt($scope.loginData.montageQuality) < zm.safeMontageLimit) ||
+ (parseInt($scope.loginData.montageQuality) > 70)) {
+ $scope.loginData.montageQuality = zm.defaultMontageQuality.toString();
+ }
- ZMDataModel.zmDebug ("SaveDevOptions: Saving to disk");
- ZMDataModel.setLogin($scope.loginData);
+
+ ZMDataModel.zmDebug("SaveDevOptions: Saving to disk");
+ ZMDataModel.setLogin($scope.loginData);
$ionicPopup.alert({
- title: 'Settings Saved',
- template: 'Please explore the menu and enjoy zmNinja!'
- }).then(function(res) { $ionicSideMenuDelegate.toggleLeft();});
-};
- //------------------------------------------------------------------
+ title: 'Settings Saved',
+ template: 'Please explore the menu and enjoy zmNinja!'
+ }).then(function (res) {
+ $ionicSideMenuDelegate.toggleLeft();
+ });
+ };
+ //------------------------------------------------------------------
// controller main
//------------------------------------------------------------------
@@ -70,4 +74,4 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
-}]);
+}]); \ No newline at end of file