diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index cd34aadd40f489fc03de4868e79c8d7e683741ae..6749473f242e72d526596a84b09b992922cbce0a 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -798,6 +798,7 @@ "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Security warning</b>", "CERTIFY_RULES_TITLE_UID": "Certify {{uid}}", "CERTIFY_RULES": "<b class=\"assertive\">Don't certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?", + "FULLSCREEN": "View the application in full screen?", "EXIT_APP": "Close the application ?", "TRANSFER": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>", "TRANSFER_ALL": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>", diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 54ed594d8d74435029a31c8c98f0ce32fbe45585..378db495a54c815e83d76310db4d000eb00a83aa 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -798,6 +798,7 @@ "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Security warning</b>", "CERTIFY_RULES_TITLE_UID": "Certify {{uid}}", "CERTIFY_RULES": "<b class=\"assertive\">Don't certify an account</b> if you believe that: <ul><li>1.) the issuers identity might be faked.<li>2.) the issuer already has another certified account.<li>3.) the issuer purposely or carelessly violates rule 1 or 2 (he certifies faked or double accounts).</ul></small><br/>Are you sure you want to certify this identity?", + "FULLSCREEN": "View the application in full screen?", "EXIT_APP": "Close the application ?", "TRANSFER": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li></ul><br/><b>Are-you sure you want to do this transfer?</b>", "TRANSFER_ALL": "<b>Transfer summary:</b><br/><br/><ul><li> - From: <b>{{from}}</b></li><li> - To: <b>{{to}}</b></li><li> - Amount: <b>{{amount}} {{unit}}</b></li><li> - Comment: <i>{{comment}}</i></li><br/><li> - Rest : <b>{{restAmount}} {{unit}}</b> to <b>{{restTo}}</b></li></ul><br/><b>Are-you sure you want to do this transfer?</b>", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index e05fd87fed31f8b94795f11fc87fe8d0a54773fc..6b08675f72bb32fe8bcee77d6c48e871f281a639 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -798,6 +798,7 @@ "POPUP_SECURITY_WARNING_TITLE": "<i class=\"icon ion-alert-circled\"></i> <b>Avertissement de sécurité</b>", "CERTIFY_RULES_TITLE_UID": "Certifier {{uid}}", "CERTIFY_RULES": "<b class=\"assertive\">Ne PAS certifier</b> un compte si vous pensez que :<br/><br/><ul><li>1.) il ne correspond pas à une personne <b>physique et vivante</b>.<li>2.) son propriétaire <b>possède un autre compte</b> déjà certifié.<li>3.) son propriétaire viole (volontairement ou non) la règle 1 ou 2 (par exemple en certifiant des comptes factices ou en double).</ul><br/><b>Êtes-vous sûr</b> de vouloir néanmoins certifier cette identité ?", + "FULLSCREEN": "Afficher l'application en plein écran ?", "EXIT_APP": "Fermer l'application ?", "TRANSFER": "<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>", "TRANSFER_ALL": "<b>Récapitulatif du virement</b> :<br/><br/><ul><li> - De : {{from}}</li><li> - A : <b>{{to}}</b></li><li> - Montant : <b>{{amount}} {{unit}}</b></li><li> - Commentaire : <i>{{comment}}</i></li><br/><li> - Reste : <b>{{restAmount}} {{unit}}</b> à <b>{{restTo}}</b></li></ul><br/><b>Êtes-vous sûr de vouloir effectuer ce virement ?</b>", diff --git a/www/index.html b/www/index.html index 6d3c668e97dcc1370294fa4e9cd9c16bf79bbd28..4001695644cbf51270d0ef953ba802644b8904be 100644 --- a/www/index.html +++ b/www/index.html @@ -54,13 +54,7 @@ <body ng-app="cesium" id="cesium" ng-strict-di="true" window-exit-unauth="true" ng-class="{'nobackdrop': $root.tour, 'expert-mode': $root.settings.expertMode}"> - <!-- Enable fullscreen mode on small device (on a web browser) --> - <!--removeIf(device)--> - <div class="popover-backdrop visible-xs visible-sm" - ng-click="enableFullscreen($event)" - ng-if="forceFullscreen"> - </div> - <!--endRemoveIf(device)--> + <ion-nav-view> <div class="loader"> diff --git a/www/js/app.js b/www/js/app.js index a250e46a4b81367be8764632998d33217432aef2..b16ac85257d00778c4687ac696d6f3524d2afa66 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -138,10 +138,5 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht // Start plugins eager services PluginService.start(); - $rootScope.forceFullscreen = UIUtils.screen.isSmall(); - $rootScope.enableFullscreen = function() { - delete $rootScope.forceFullscreen; - UIUtils.screen.fullscreen.all(); - }; }) ; diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index e56f099702e2fc6f6ae5f65c391faaf3bf3898f1..df0a751d9b30df72da446e8cfce38868de148a9c 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -74,6 +74,7 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ $scope.login = csWallet.isLogin(); $scope.auth = csWallet.isAuth(); $scope.motion = UIUtils.motion.default; + $scope.fullscreen = UIUtils.screen.fullscreen.isEnabled(); $scope.showHome = function() { $ionicHistory.nextViewOptions({ @@ -348,13 +349,6 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ }) .catch(UIUtils.onError()); }; - - // Full screen - $scope.toggleFullscreen = function() { - UIUtils.screen.fullscreen.toggleAll(); - $scope.fullscreen = UIUtils.screen.fullscreen.isEnabled(); - }; - // Do authentification $scope.doAuth = function(options) { var wallet = options && options.wallet || csWallet; @@ -410,7 +404,6 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ return Modals.showHelp(parameters); }; - //////////////////////////////////////// // Useful popovers //////////////////////////////////////// @@ -444,7 +437,7 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ }; //////////////////////////////////////// - // Link managment (fix issue #) + // Link management (fix issue #) //////////////////////////////////////// $scope.openLink = function($event, uri, options) { @@ -479,6 +472,34 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ return $scope.motion.show(options); }; + + //////////////////////////////////////// + // Fullscreen mode + //////////////////////////////////////// + + $scope.askFullscreen = function() { + var skip = $scope.fullscreen || !UIUtils.screen.isSmall() || !Device.isWeb(); + if (skip) return; + + return UIUtils.alert.confirm('CONFIRM.FULLSCREEN', null, { + cancelText: 'COMMON.BTN_NO', + okText: 'COMMON.BTN_YES' + }) + .then(function(confirm) { + if (!confirm) return; + $scope.toggleFullscreen(); + }); + }; + + $scope.toggleFullscreen = function() { + $scope.fullscreen = !UIUtils.screen.fullscreen.isEnabled(); + UIUtils.screen.fullscreen.toggleAll(); + }; + + // removeIf(device) + // Ask switching fullscreen + $scope.askFullscreen(); + // endRemoveIf(device) } diff --git a/www/templates/menu.html b/www/templates/menu.html index 67c67baf9846e2c8ba6ad03eedc07dd9214bf481..daf1999cbef4126ab914aa8f659f170f087f4203 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -81,14 +81,16 @@ <a ng-if="login" class="button-icon" ng-click="logout({askConfirm: true})" style="position: absolute; top: 5px; left: 5px; z-index: 999;"> <i class="icon light ion-android-exit"></i> </a> - <!-- fullscreen --> - <a class="button-icon visible-xs visible-sm" - ng-if="!forceFullscreen" - ng-click="toggleFullscreen()" style="position: absolute; top: 5px; right: 5px; z-index: 999;"> - <i class="icon ion-arrow-expand dark" - ng-class="{'ion-arrow-shrink': !fullscreen}" - ></i> + + <!-- Fullscreen button --> + <!-- removeIf(device) --> + <a ng-if="::$root.device.isWeb()" + ng-click="toggleFullscreen()" + class="button-icon" + style="position: absolute; top: 5px; right: 5px; z-index: 999;"> + <i class="icon ion-arrow-expand dark" ng-class="{'ion-arrow-shrink': fullscreen}"></i> </a> + <!-- endRemoveIf(device) --> </div> </ion-header-bar>