From 209350739dd5dd42a8269e42547070dba3295699 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Fri, 20 Oct 2017 17:21:52 +0200 Subject: [PATCH] [fix] Join: always enable the button, on IOS - fix #554 --- www/js/controllers/join-controllers.js | 9 +++++---- www/js/services/device-services.js | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/www/js/controllers/join-controllers.js b/www/js/controllers/join-controllers.js index cd7a6b1bd..457e4d4b7 100644 --- a/www/js/controllers/join-controllers.js +++ b/www/js/controllers/join-controllers.js @@ -105,7 +105,7 @@ function JoinChooseAccountTypeModalController($scope, $state, Modals, UIUtils, c } -function JoinModalController($scope, $state, $interval, $timeout, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) { +function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) { 'ngInject'; $scope.formData = { @@ -122,8 +122,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.slideBehavior = {}; $scope.loading = true; - - $scope.isLicenseRead = false; + $scope.isLicenseRead = Device.isIOS(); // always enable the button, on IOS fix #554 $scope.showUsername = false; $scope.showPassword = false; $scope.formData.computing=false; @@ -144,7 +143,9 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt if ( $scope.licenseFileUrl.substring($scope.licenseFileUrl.length - 3) != '.txt') { $scope.licenseFileUrl = $scope.licenseFileUrl + '.html'; } - $scope.startListenLicenseBottom(); + if (!$scope.isLicenseRead) { + $scope.startListenLicenseBottom(); + } } } diff --git a/www/js/services/device-services.js b/www/js/services/device-services.js index 54db54fa9..f5198edc9 100644 --- a/www/js/services/device-services.js +++ b/www/js/services/device-services.js @@ -141,6 +141,10 @@ angular.module('cesium.device.services', ['cesium.utils.services', 'cesium.setti } }; + exports.isIOS = function() { + return !!navigator.userAgent.match(/iPhone | iPad | iPod/i) || ionic.Platform.isIOS(); + }; + exports.ready = function() { if (started) return $q.when(); return startPromise || exports.start(); -- GitLab