summaryrefslogtreecommitdiff
path: root/www/js/FirstUseCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/FirstUseCtrl.js')
-rw-r--r--www/js/FirstUseCtrl.js67
1 files changed, 35 insertions, 32 deletions
diff --git a/www/js/FirstUseCtrl.js b/www/js/FirstUseCtrl.js
index 8df81f82..e5692188 100644
--- a/www/js/FirstUseCtrl.js
+++ b/www/js/FirstUseCtrl.js
@@ -2,74 +2,79 @@
/* jslint browser: true*/
/* global cordova,StatusBar,angular,console */
-angular.module('zmApp.controllers').controller('zmApp.FirstUseCtrl', ['$scope', '$ionicSideMenuDelegate', 'zm', '$stateParams', '$ionicHistory', '$state', 'NVRDataModel', '$rootScope', '$ionicPopup', '$translate', function ($scope, $ionicSideMenuDelegate, zm, $stateParams, $ionicHistory, $state, NVRDataModel, $rootScope, $ionicPopup, $translate) {
- $scope.openMenu = function () {
+angular.module('zmApp.controllers').controller('zmApp.FirstUseCtrl', ['$scope', '$ionicSideMenuDelegate', 'zm', '$stateParams', '$ionicHistory', '$state', 'NVRDataModel', '$rootScope', '$ionicPopup', '$translate', function($scope, $ionicSideMenuDelegate, zm, $stateParams, $ionicHistory, $state, NVRDataModel, $rootScope, $ionicPopup, $translate)
+{
+ $scope.openMenu = function()
+ {
$ionicSideMenuDelegate.toggleLeft();
};
-
-
//-------------------------------------------------------------------------
// Controller Main
//------------------------------------------------------------------------
- $scope.$on('$ionicView.enter', function () {
+ $scope.$on('$ionicView.enter', function()
+ {
//console.log("**VIEW ** FirstUse Ctrl Entered");
$ionicSideMenuDelegate.canDragContent(true);
-
});
- $scope.switchLang = function () {
+ $scope.switchLang = function()
+ {
$scope.lang = NVRDataModel.getLanguages();
$scope.myopt = {
lang: ""
};
- $rootScope.zmPopup = $ionicPopup.show({
+ $rootScope.zmPopup = $ionicPopup.show(
+ {
scope: $scope,
template: '<ion-radio-fix ng-repeat="item in lang" ng-value="item.value" ng-model="myopt.lang"> {{item.text}} </ion-radio-fix>',
-
title: $translate.instant('kSelectLanguage'),
buttons: [
+ {
+ text: $translate.instant('kButtonCancel'),
+ onTap: function(e)
{
- text: $translate.instant('kButtonCancel'),
- onTap: function (e) {
- //return "CANCEL";
- }
+ //return "CANCEL";
+ }
- },
+ },
+ {
+ text: $translate.instant('kButtonOk'),
+ onTap: function(e)
{
- text: $translate.instant('kButtonOk'),
- onTap: function (e) {
- NVRDataModel.log("Language selected:" + $scope.myopt.lang);
- NVRDataModel.setDefaultLanguage($scope.myopt.lang, true);
+ NVRDataModel.log("Language selected:" + $scope.myopt.lang);
+ NVRDataModel.setDefaultLanguage($scope.myopt.lang, true);
+ //return "OK";
- //return "OK";
-
- }
- }
- ]
+ }
+ }]
});
-
};
- $scope.goToLogin = function () {
- $ionicHistory.nextViewOptions({
+ $scope.goToLogin = function()
+ {
+ $ionicHistory.nextViewOptions(
+ {
disableAnimate: false,
disableBack: true
});
- $state.go("login", {
+ $state.go("login",
+ {
"wizard": false
});
return;
};
- $scope.goToWizard = function () {
- $ionicHistory.nextViewOptions({
+ $scope.goToWizard = function()
+ {
+ $ionicHistory.nextViewOptions(
+ {
disableAnimate: false,
disableBack: true
});
@@ -77,6 +82,4 @@ angular.module('zmApp.controllers').controller('zmApp.FirstUseCtrl', ['$scope',
return;
};
-
-
-}]); \ No newline at end of file
+}]);