summaryrefslogtreecommitdiff
path: root/www/js/DevOptionsCtrl.js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-06-04 11:31:09 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-06-04 11:31:09 -0400
commitc76e9d5c78e0cd48f938218dc97fb67e7bcac51d (patch)
tree78832a6e30e9c41b48e51bf9b4690884d5c67f9d /www/js/DevOptionsCtrl.js
parent21bc78c65d0a8b852e88f3e464b4d6fcf2bc96fd (diff)
Created new screen for developer options, removed simulation mode (its practically useless)
Diffstat (limited to 'www/js/DevOptionsCtrl.js')
-rw-r--r--www/js/DevOptionsCtrl.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
new file mode 100644
index 00000000..9bb5a759
--- /dev/null
+++ b/www/js/DevOptionsCtrl.js
@@ -0,0 +1,36 @@
+/* jshint -W041 */
+/* jslint browser: true*/
+/* 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'
+ });
+ }
+
+
+ if ((parseInt($scope.loginData.maxFPS) <0) || (parseInt($scope.loginData.maxFPS)>30))
+ {
+ $scope.loginData.maxFPS='3';
+ }
+
+
+ ZMDataModel.setLogin($scope.loginData);
+ };
+
+
+}]);