Commit f13bdc10 authored by Benoit Lavenier's avatar Benoit Lavenier

[fix] Tablet: increase modal height

[fix] Tablet: fix popup layout, when keyboard open in landscape mode - fix #829
[fix] Tablet: add missing padding (list result, etc.)
[fix] Popover: fix freeze after open a popover
[fix] Transfer modal: open then close modal can freeze the app
[fix] Grapĥ: use independant legend option (e.g. scale on a graph are no more linked)
[fix] Fix theme color, in meta tags and manifest.json
[enh] Auto enable fullscreen on small screen, and add a button to toggle
parent 22ede842
......@@ -24,10 +24,16 @@
<preference name="DisallowOverscroll" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="4000" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="xwalkVersion" value="19" />
<preference name="xwalkMultipleApk" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="26" />
<!-- issue #833 -->
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000" />
<preference name="StatusBarStyle" value="lightcontent" />
<allow-navigation href="*" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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?",
"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>",
"MEMBERSHIP_OUT": "This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",
......
......@@ -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?",
"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>",
"MEMBERSHIP_OUT": "This operation is <b>irreversible</b>.<br/></br/><b>Are you sure you want to terminate your membership?</b>",
......
......@@ -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é ?",
"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>",
"MEMBERSHIP_OUT": "Cette opération est <b>irréversible</b>.<br/></br/>Êtes-vous sûr de vouloir <b>résilier votre compte membre</b> ?",
......
......@@ -2,12 +2,12 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width, minimal-ui">
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes, width=device-width, minimal-ui">
<title>Cesium</title>
<link rel="icon" href="img/favicon.ico">
<meta name="theme-color" content="#1a237e">
<meta name="theme-color" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="img/logo_57px.png">
......@@ -53,6 +53,14 @@
<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">
<h3 style="text-align: center; padding-top: 25px; "><b>Cesium</b></h3>
......@@ -94,6 +102,7 @@
<script src="lib/ionic/js/angular/ui-leaflet.js"></script>
<script src="js/vendor/ion-digit-keyboard.min.js"></script>
<script src="lib/ionic/js/angular/angular-chart.min.js"></script>
<script src="lib/ionic/js/angular/angular-fullscreen.js"></script>
<script src="js/vendor/base58.js" async></script>
<!--removeIf(android)-->
......
......@@ -78,29 +78,20 @@ angular.module('cesium-api', ['ionic', 'ionic-material', 'ngMessages', 'pascalpr
/* -- show/hide locales popup -- */
$scope.showLocalesPopover = function(event) {
if (!$scope.localesPopover) {
// Fill locales
$scope.locales = angular.copy(csSettings.locales);
$ionicPopover.fromTemplateUrl('templates/api/locales_popover.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/api/locales_popover.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.localesPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.localesPopover.remove();
});
$scope.localesPopover.show(event);
});
}
else {
$scope.localesPopover.show(event);
}
}
});
};
$scope.hideLocalesPopover = function() {
if ($scope.localesPopover) {
$scope.localesPopover.hide();
$scope.localesPopover = null;
}
};
})
......
......@@ -6,6 +6,9 @@
// 'starter.controllers' is found in controllers.js
angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht.translate',
'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier', 'ImageCropper', 'ion-digit-keyboard',
// removeIf(device)
'FBAngular', // angulmar-fullscreen
// endRemoveIf(device)
// removeIf(no-device)
'ngCordova',
// endRemoveIf(no-device)
......@@ -74,7 +77,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
.catch(function(err) {
preventStateChange = false;
// If cancel, redirect to home, if no current state
if (err == 'CANCELLED' && !$state.current.name) {
if (err === 'CANCELLED' && !$state.current.name) {
return $state.go('app.home');
}
});
......@@ -93,7 +96,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
.catch(function(err) {
preventStateChange = false;
// If cancel, redirect to home, if no current state
if (err == 'CANCELLED' && !$state.current.name) {
if (err === 'CANCELLED' && !$state.current.name) {
return $state.go('app.home');
}
});
......@@ -136,5 +139,11 @@ 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();
};
})
;
......@@ -74,7 +74,6 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $
$scope.login = csWallet.isLogin();
$scope.auth = csWallet.isAuth();
$scope.motion = UIUtils.motion.default;
$scope.smallscreen = UIUtils.screen.isSmall();
$scope.showHome = function() {
$ionicHistory.nextViewOptions({
......@@ -350,6 +349,12 @@ 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;
......
......@@ -702,29 +702,20 @@ function BlockViewController($scope, $ionicPopover, $state, UIUtils, BMA, csCurr
$scope.popoverData.unlockConditions = $scope.toUnlockUIArray(output.unlockTree);
// Open popover
if (!$scope.unlockConditionPopover) {
$ionicPopover.fromTemplateUrl('templates/blockchain/unlock_condition_popover.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/blockchain/unlock_condition_popover.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.unlockConditionPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.unlockConditionPopover.remove();
});
$scope.unlockConditionPopover.show(event);
});
}
else {
$scope.unlockConditionPopover.show(event);
}
}
});
};
$scope.hideUnlockConditionsPopover = function() {
if ($scope.unlockConditionPopover) {
$scope.unlockConditionPopover.hide();
if ($scope.popoverData) {
delete $scope.popoverData.unlockConditions;
}
$scope.unlockConditionPopover = null;
}
};
......
......@@ -327,26 +327,20 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, Modals, BMA
/* -- popover -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/currency/popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/currency/popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
}
......
......@@ -124,7 +124,9 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
options: {
loop: false,
effect: 'slide',
speed: 500
speed: 500,
pager: false,
showPager: false
}
};
$scope.slideBehavior = {};
......
......@@ -532,7 +532,7 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
})
.catch(function(err) {
if (err && err == 'CANCELLED') {
if (err && err === 'CANCELLED') {
$scope.removeKeyFile();
return;
}
......@@ -597,38 +597,26 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
};
/* -- popover -- */
$scope.showMethodsPopover = function(event) {
if (event.defaultPrevented) return;
if (!$scope.methodsPopover) {
$ionicPopover.fromTemplateUrl('templates/login/popover_methods.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl :'templates/login/popover_methods.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.methodsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.methodsPopover.remove();
});
$scope.methodsPopover.show(event)
.then(function() {
UIUtils.ink({selector: '.popover-login-methods .item'});
});
});
}
else {
$scope.methodsPopover.show(event);
}
UIUtils.ink({selector: '.popover-login-methods .item'});
}
})
};
$scope.hideMethodsPopover = function() {
if ($scope.methodsPopover) {
$scope.methodsPopover.hide();
$scope.methodsPopover = null;
}
};
// Default action
$scope.init();
......
......@@ -283,26 +283,20 @@ function NetworkLookupController($scope, $state, $location, $ionicPopover, $win
/* -- popover -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/network/lookup_popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/network/lookup_popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
......
......@@ -350,26 +350,20 @@ function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $ti
/* -- modals & popover -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/settings/popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/settings/popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
......
......@@ -110,7 +110,7 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc
{
decimal: true,
decimalSeparator: '.',
resizeContent: true
resizeContent:false
});
$scope.digitKeyboardVisible = false;
}
......@@ -169,6 +169,7 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc
// Make to sure to load full wallet data (balance)
return wallet.login({sources: true, silent: true})
.then(function(data) {
if (!wallet || $scope.$$destroyed) return; // user have cancelled before end of load
$scope.walletData = data;
$scope.formData.walletId = wallet.id;
$scope.onUseRelativeChanged();
......@@ -198,7 +199,7 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc
}
})
.catch(function(err){
if (err == 'CANCELLED') return $scope.cancel(); // close the modal
if (err === 'CANCELLED') return $scope.cancel(); // close the modal
UIUtils.onError('ERROR.LOGIN_FAILED')(err);
});
};
......@@ -206,6 +207,7 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc
$scope.cancel = function() {
$scope.closeModal();
wallet = null;
};
// When changing use relative UD
......@@ -370,11 +372,13 @@ function TransferModalController($scope, $q, $translate, $timeout, $filter, $foc
$scope.addComment = function() {
$scope.formData.useComment = true;
// Focus on comment field
// removeIf(device)
if ($scope.commentInputId) {
$timeout(function() {
$focus($scope.commentInputId);
}, 200);
}
// endRemoveIf(device)
};
/* -- modals -- */
......
......@@ -106,7 +106,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
UIUtils.loading.hide(); // loading could have be open (e.g. new account)
})
.catch(function(err){
if (err == 'CANCELLED') {
if (err === 'CANCELLED') {
$scope.showHome();
}
});
......@@ -223,7 +223,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
UIUtils.loading.hide();
})
.catch(function(err) {
if (err == 'CANCELLED') throw err;
if (err === 'CANCELLED') throw err;
if (err && err.ucode != BMA.errorCodes.MEMBERSHIP_ALREADY_SEND) {
console.error("[wallet] Node: already membership", err);
UIUtils.loading.hide();
......@@ -277,7 +277,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
// Send membership
.then($scope.doMembershipIn)
.catch(function(err) {
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;
if (!wallet.data.uid) {
UIUtils.onError('ERROR.SEND_IDENTITY_FAILED')(err);
}
......@@ -372,7 +372,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
}
})
.catch(function(err){
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;
UIUtils.loading.hide();
UIUtils.alert.error(err);
});
......@@ -403,7 +403,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
})
.then($scope.doMembershipIn)
.catch(function(err){
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;
UIUtils.loading.hide();
UIUtils.alert.error(err);
});
......@@ -436,7 +436,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
})
.then($scope.doMembershipIn)
.catch(function(err){
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;
UIUtils.loading.hide();
UIUtils.alert.error(err);
});
......@@ -603,27 +603,22 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
/* -- popovers -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/wallet/popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/wallet/popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
......@@ -738,7 +733,7 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location,
UIUtils.loading.hide(); // loading could have be open (e.g. during login phase)
})
.catch(function(err){
if (err == 'CANCELLED') {
if (err === 'CANCELLED') {
$scope.showHome();
}
});
......@@ -957,21 +952,14 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location,
}, []);
// Open popover
if (!$scope.lockedOutputsPopover) {
$ionicPopover.fromTemplateUrl('templates/wallet/tx_locked_outputs_popover.html', {
scope: $scope
}).then(function(popover) {
$scope.lockedOutputsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.lockedOutputsPopover.remove();
});
$scope.lockedOutputsPopover.show(event);
});
}
else {
$scope.lockedOutputsPopover.show(event);
}
UIUtils.popover.show(event, {
templateUrl: 'templates/wallet/tx_locked_outputs_popover.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
}
});
};
$scope.hideLockedOutputsPopover = function() {
......@@ -980,6 +968,7 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location,
if ($scope.popoverData) {
delete $scope.popoverData.unlockConditions;
}
$scope.lockedOutputsPopover = null;
}
};
......@@ -1314,7 +1303,7 @@ function WalletSecurityModalController($scope, UIUtils, csWallet, $translate, pa
}
})
.catch(function(err) {
if (err && err == 'CANCELLED') return;
if (err && err === 'CANCELLED') return;
UIUtils.alert.error('ERROR.SALT_OR_PASSWORD_NOT_CONFIRMED', 'ERROR.LOGIN_FAILED');
return;
})
......@@ -1378,7 +1367,7 @@ function WalletSecurityModalController($scope, UIUtils, csWallet, $translate, pa
})
.catch(function(err){
if (err && err == 'CANCELLED') return;
if (err && err === 'CANCELLED') return;
UIUtils.onError('ERROR.DOWNLOAD_REVOCATION_FAILED')(err);
})
;
......@@ -1401,7 +1390,7 @@ function WalletSecurityModalController($scope, UIUtils, csWallet, $translate, pa
return $scope.revokeIdentity();
})
.catch(function (err) {
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;
UIUtils.onError('ERROR.REVOCATION_FAILED')(err);
});
};
......
......@@ -382,26 +382,20 @@ function WalletListController($scope, $controller, $state, $timeout, $q, $transl
/* -- popovers -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/wallet/list/popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/wallet/list/popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
......
......@@ -590,29 +590,22 @@ function WotLookupController($scope, $state, $q, $timeout, $focus, $location, $i
/* -- show/hide popup -- */
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/wot/lookup_popover_actions.html', {
scope: $scope
}).then(function(popover) {
UIUtils.popover.show(event, {
templateUrl: 'templates/wot/lookup_popover_actions.html',
scope: $scope,
autoremove: true,
afterShow: function(popover) {
$scope.actionsPopover = popover;
//Cleanup the popover when we're done with it!
$scope.$on('$destroy', function() {
$scope.actionsPopover.remove();
});
$scope.actionsPopover.show(event);
});
}
else {
$scope.actionsPopover.show(event);
}
}
});
};
$scope.hideActionsPopover = function() {
if ($scope.actionsPopover) {
$scope.actionsPopover.hide();
$scope.actionsPopover = null;
}
};
}
function WotLookupModalController($scope, $controller, $focus, csWallet, parameters){
......@@ -822,7 +815,7 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
});
})
.catch(function(err) {
if (err == 'CANCELLED') return;
if (err === 'CANCELLED') return;