summaryrefslogtreecommitdiff
path: root/www/js/FirstUseCtrl.js
diff options
context:
space:
mode:
authorBoskSpb <bosk@mail.ru>2016-12-15 01:05:35 +0300
committerGitHub <noreply@github.com>2016-12-15 01:05:35 +0300
commitebf2e82f9687110b0237245169f2ae20f18382c0 (patch)
treeffd2f53566b2351e8c345124c47fe5a7f4509908 /www/js/FirstUseCtrl.js
parente2f15230ac9c4c90b483914398886c70f7d6dd04 (diff)
parent1d9625d30bec5929164fb53b237fa4995f6991f5 (diff)
Merge pull request #1 from pliablepixels/master
updating
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
+}]);