ionic modals in coinbase and glidera and delete confirmation
This commit is contained in:
parent
1524d26f10
commit
d2bdca00f4
28 changed files with 566 additions and 717 deletions
20
src/js/controllers/modals/coinbaseConfirmation.js
Normal file
20
src/js/controllers/modals/coinbaseConfirmation.js
Normal 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();
|
||||
};
|
||||
|
||||
});
|
||||
18
src/js/controllers/modals/coinbaseTxDetails.js
Normal file
18
src/js/controllers/modals/coinbaseTxDetails.js
Normal 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();
|
||||
};
|
||||
|
||||
});
|
||||
15
src/js/controllers/modals/confirmation.js
Normal file
15
src/js/controllers/modals/confirmation.js
Normal 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();
|
||||
};
|
||||
|
||||
});
|
||||
18
src/js/controllers/modals/glideraConfirmation.js
Normal file
18
src/js/controllers/modals/glideraConfirmation.js
Normal 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();
|
||||
};
|
||||
|
||||
});
|
||||
9
src/js/controllers/modals/glideraTxDetails.js
Normal file
9
src/js/controllers/modals/glideraTxDetails.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('glideraTxDetailsController', function($scope) {
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.glideraTxDetailsModal.hide();
|
||||
};
|
||||
|
||||
});
|
||||
30
src/js/controllers/modals/wallets.js
Normal file
30
src/js/controllers/modals/wallets.js
Normal 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();
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue