ionic modals in coinbase and glidera and delete confirmation

This commit is contained in:
Gabriel Bazán 2016-06-10 15:16:02 -03:00
commit d2bdca00f4
28 changed files with 566 additions and 717 deletions

View file

@ -0,0 +1,20 @@
'use strict';
angular.module('copayApp.controllers').controller('coinbaseConfirmationController', function($scope, $timeout, coinbaseService, applicationService) {
$scope.ok = function() {
coinbaseService.logout($scope.network, function() {
$timeout(function() {
applicationService.restart();
}, 1000);
});
$scope.cancel();
};
$scope.cancel = function() {
$scope.coinbaseConfirmationModal.hide();
};
});

View file

@ -0,0 +1,18 @@
'use strict';
angular.module('copayApp.controllers').controller('coinbaseTxDetailsController', function($scope, coinbaseService) {
$scope.remove = function() {
coinbaseService.savePendingTransaction($scope.tx, {
remove: true
}, function(err) {
$rootScope.$emit('Local/CoinbaseTx');
$scope.cancel();
});
};
$scope.cancel = function() {
$scope.coinbaseTxDetailsModal.hide();
};
});

View file

@ -0,0 +1,15 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmationController', function($scope) {
$scope.ok = function() {
$scope.loading = true;
$scope.okAction();
$scope.cancel();
};
$scope.cancel = function() {
$scope.confirmationModal.hide();
};
});

View file

@ -0,0 +1,18 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraConfirmationController', function($scope, $timeout, storageService, applicationService) {
$scope.ok = function() {
storageService.removeGlideraToken($scope.network, function() {
$timeout(function() {
applicationService.restart();
}, 100);
});
$scope.cancel();
};
$scope.cancel = function() {
$scope.glideraConfirmationModal.hide();
};
});

View file

@ -0,0 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraTxDetailsController', function($scope) {
$scope.cancel = function() {
$scope.glideraTxDetailsModal.hide();
};
});

View file

@ -0,0 +1,30 @@
'use strict';
angular.module('copayApp.controllers').controller('walletsController', function($scope, bwsError, profileService) {
var self = $scope.self;
$scope.selectWallet = function(walletId, walletName) {
if (!profileService.getClient(walletId).isComplete()) {
self.error = bwsError.msg({
'code': 'WALLET_NOT_COMPLETE'
}, 'Could not choose the wallet');
self.error = {
errors: [{
message: 'The Wallet could not be selected'
}]
};
$scope.cancel();
return;
}
self.selectedWalletId = walletId;
self.selectedWalletName = walletName;
self.fc = profileService.getClient(self.selectedWalletId);
$scope.cancel();
};
$scope.cancel = function() {
$scope.walletsModal.hide();
};
});