Fix alert messages
This commit is contained in:
parent
ce2f0a08db
commit
f69e980d71
4 changed files with 23 additions and 18 deletions
|
|
@ -5,7 +5,7 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
var self = this;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var ok_msg = gettextCatalog.getString('OK');
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close(ok_msg);
|
||||
$modalInstance.close(accept_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
|
|
@ -76,11 +76,11 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 2) {
|
||||
if (buttonIndex == 1) {
|
||||
_deleteWallet();
|
||||
}
|
||||
},
|
||||
confirm_msg, [cancel_msg, ok_msg]
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else {
|
||||
_modalDeleteWallet();
|
||||
|
|
@ -104,4 +104,4 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
}
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
this.error = null;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var ok_msg = gettextCatalog.getString('OK');
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close(ok_msg);
|
||||
$modalInstance.close(accept_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
|
|
@ -57,14 +57,14 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 2) {
|
||||
if (buttonIndex == 1) {
|
||||
_deleteWallet();
|
||||
}
|
||||
},
|
||||
confirm_msg, [cancel_msg, ok_msg]
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else {
|
||||
_modalDeleteWallet();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -89,6 +89,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
$rootScope.$digest();
|
||||
});
|
||||
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
// walletHome
|
||||
|
||||
|
||||
|
|
@ -1072,7 +1076,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
};
|
||||
|
||||
this.confirmDialog = function(msg, cb) {
|
||||
if (isCordova) {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
msg,
|
||||
function(buttonIndex) {
|
||||
|
|
@ -1083,7 +1087,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
} else {
|
||||
return cb(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else if (isChromeApp) {
|
||||
// No feedback, alert/confirm not supported.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue