use scope only - preferences (advanced)
This commit is contained in:
parent
fb56ad7505
commit
9163127dca
22 changed files with 238 additions and 305 deletions
|
|
@ -3,8 +3,8 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
|
||||
function($scope, $rootScope, $filter, $timeout, $modal, $log, $ionicModal, storageService, notification, profileService, platformInfo, go, gettext, gettextCatalog, applicationService, ongoingProcess) {
|
||||
var isCordova = platformInfo.isCordova;
|
||||
this.isCordova = isCordova;
|
||||
this.error = null;
|
||||
$scope.isCordova = isCordova;
|
||||
$scope.error = null;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
|
|
@ -20,8 +20,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
$scope.loading = false;
|
||||
|
||||
$ionicModal.fromTemplateUrl('views/modals/confirmation.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
scope: $scope
|
||||
}).then(function(modal) {
|
||||
$scope.confirmationModal = modal;
|
||||
$scope.confirmationModal.show();
|
||||
|
|
@ -33,12 +32,11 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
var fc = profileService.focusedClient;
|
||||
var name = fc.credentials.walletName;
|
||||
var walletName = (fc.alias || '') + ' [' + name + ']';
|
||||
var self = this;
|
||||
|
||||
profileService.deleteWalletClient(fc, function(err) {
|
||||
ongoingProcess.set('deletingWallet', false);
|
||||
if (err) {
|
||||
self.error = err.message || err;
|
||||
$scope.error = err.message || err;
|
||||
} else {
|
||||
notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {
|
||||
walletName: walletName
|
||||
|
|
@ -48,7 +46,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
});
|
||||
};
|
||||
|
||||
this.deleteWallet = function() {
|
||||
$scope.deleteWallet = function() {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue