fix prevent click

This commit is contained in:
Javier 2016-04-11 11:14:49 -03:00
parent d13379e2d1
commit 2d8663171c
2 changed files with 5 additions and 9 deletions

View File

@ -24,7 +24,7 @@
<div class="m20b" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
</div>
<ul class="no-bullet m0">
<li ng-click="isDeletingWallet || preferences.deleteWallet()">
<li ng-click="preferences.deleteWallet()">
<div class="right" ng-style="{'color':index.backgroundColor}" ng-show="!isDeletingWallet">
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
</div>

View File

@ -39,15 +39,13 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
modalInstance.result.then(function(ok) {
if (ok) {
$timeout(function() {
$scope.isDeletingWallet = true;
_deleteWallet();
}, 100);
_deleteWallet();
}
});
};
var _deleteWallet = function() {
$scope.isDeletingWallet = true;
var fc = profileService.focusedClient;
var name = fc.credentials.walletName;
var walletName = (fc.alias || '') + ' [' + name + ']';
@ -67,15 +65,13 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
};
this.deleteWallet = function() {
if ($scope.isDeletingWallet) return;
if (isCordova) {
navigator.notification.confirm(
delete_msg,
function(buttonIndex) {
if (buttonIndex == 1) {
$timeout(function() {
$scope.isDeletingWallet = true;
_deleteWallet();
}, 100);
_deleteWallet();
}
},
confirm_msg, [accept_msg, cancel_msg]