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
|
|
@ -1,38 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesCoinbaseController',
|
||||
function($scope, $modal, $timeout, applicationService, coinbaseService, animationService) {
|
||||
angular.module('copayApp.controllers').controller('preferencesCoinbaseController',
|
||||
function($scope, $modal, $timeout, $ionicModal, applicationService, coinbaseService) {
|
||||
|
||||
this.revokeToken = function(testnet) {
|
||||
var network = testnet ? 'testnet' : 'livenet';
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
$scope.ok = function() {
|
||||
$modalInstance.close(true);
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss();
|
||||
};
|
||||
};
|
||||
$scope.network = testnet ? 'testnet' : 'livenet';
|
||||
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'views/modals/coinbase-confirmation.html',
|
||||
windowClass: animationService.modalAnimated.slideRight,
|
||||
controller: ModalInstanceCtrl
|
||||
});
|
||||
|
||||
modalInstance.result.then(function(ok) {
|
||||
if (ok) {
|
||||
coinbaseService.logout(network, function() {
|
||||
$timeout(function() {
|
||||
applicationService.restart();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.finally(function() {
|
||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||
m.addClass(animationService.modalAnimated.slideOutRight);
|
||||
$ionicModal.fromTemplateUrl('views/modals/coinbase-confirmation.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function(modal) {
|
||||
$scope.coinbaseConfirmationModal = modal;
|
||||
$scope.coinbaseConfirmationModal.show();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue