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,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('copayersController',
|
||||
function($scope, $rootScope, $timeout, $log, $modal, profileService, go, notification, platformInfo, gettext, gettextCatalog, animationService) {
|
||||
function($scope, $rootScope, $timeout, $log, $modal, $ionicModal, profileService, go, notification, platformInfo, gettext, gettextCatalog) {
|
||||
var self = this;
|
||||
var isCordova = platformInfo.isCordova;
|
||||
var isWP = platformInfo.isWP;
|
||||
|
|
@ -27,35 +27,19 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
};
|
||||
|
||||
var _modalDeleteWallet = function() {
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance, gettext) {
|
||||
$scope.title = delete_msg;
|
||||
$scope.loading = false;
|
||||
$scope.title = delete_msg;
|
||||
$scope.accept_msg = accept_msg;
|
||||
$scope.cancel_msg = cancel_msg;
|
||||
$scope.confirm_msg = confirm_msg;
|
||||
$scope.okAction = doDeleteWallet;
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close(accept_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss(cancel_msg);
|
||||
};
|
||||
};
|
||||
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'views/modals/confirmation.html',
|
||||
windowClass: animationService.modalAnimated.slideUp,
|
||||
controller: ModalInstanceCtrl
|
||||
});
|
||||
|
||||
modalInstance.result.finally(function() {
|
||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||
m.addClass(animationService.modalAnimated.slideOutDown);
|
||||
});
|
||||
|
||||
modalInstance.result.then(function(ok) {
|
||||
if (ok) {
|
||||
doDeleteWallet();
|
||||
}
|
||||
$ionicModal.fromTemplateUrl('views/modals/confirmation.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function(modal) {
|
||||
$scope.confirmationModal = modal;
|
||||
$scope.confirmationModal.show();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue