Merge pull request #2663 from cmgustavo/feat/slide

Modals animation (slide up/down)
This commit is contained in:
Matias Alejo Garcia 2015-05-08 14:26:14 -03:00
commit 9f620d127e
19 changed files with 532 additions and 470 deletions

View file

@ -652,19 +652,28 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Animation/Disable', function(event) {
$timeout(function() {
self.swipeLeft = false;
self.swipeRight = false;
}, 370);
self.slideLeft = false;
self.slideRight = false;
self.slideUp = false;
self.slideDown = false;
}, 400);
});
$rootScope.$on('Animation/SwipeLeft', function(event) {
self.swipeLeft = true;
$rootScope.$on('Animation/SlideLeft', function(event) {
self.slideLeft = true;
});
$rootScope.$on('Animation/SwipeRight', function(event) {
self.swipeRight = true;
$rootScope.$on('Animation/SlideRight', function(event) {
self.slideRight = true;
});
$rootScope.$on('Animation/SlideUp', function(event) {
self.slideUp = true;
});
$rootScope.$on('Animation/SlideDown', function(event) {
self.slideDown = true;
});
$rootScope.$on('NewIncomingTx', function() {
self.updateBalance();

View file

@ -91,23 +91,28 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.openCopayersModal = function(copayers, copayerId) {
var fc = profileService.focusedClient;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.copayers = copayers;
$scope.copayerId = copayerId;
$scope.color = fc.backgroundColor;
$scope.cancel = function() {
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
};
};
$modal.open({
animation: false,
var modalInstance = $modal.open({
templateUrl: 'views/modals/copayers.html',
windowClass: 'full',
windowClass: 'full animated slideInUp',
controller: ModalInstanceCtrl,
});
modalInstance.result.finally(function() {
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass('slideOutDown');
});
};
$scope.openTxModal = function(tx, copayers) {
this.openTxpModal = function(tx, copayers) {
var fc = profileService.focusedClient;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.error = null;
@ -277,12 +282,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
var modalInstance = $modal.open({
animation: false,
templateUrl: 'views/modals/txp-details.html',
windowClass: 'full',
windowClass: 'full animated slideInUp',
controller: ModalInstanceCtrl,
});
modalInstance.result.finally(function() {
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass('slideOutDown');
});
modalInstance.result.then(function(txp) {
$scope.$emit('Local/TxProposalAction');
if (txp) {
@ -675,11 +684,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$modalInstance.dismiss('cancel');
};
};
$modal.open({
var modalInstance = $modal.open({
templateUrl: 'views/modals/paypro.html',
windowClass: 'full',
windowClass: 'full animated slideInUp',
controller: ModalInstanceCtrl,
});
modalInstance.result.finally(function() {
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass('slideOutDown');
});
};
this.setFromPayPro = function(uri) {
@ -829,12 +843,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
};
$modal.open({
animation: false,
var modalInstance = $modal.open({
templateUrl: 'views/modals/tx-details.html',
windowClass: 'full',
windowClass: 'full animated slideInUp',
controller: ModalInstanceCtrl,
});
modalInstance.result.finally(function() {
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass('slideOutDown');
});
};
this.hasAction = function(actions, action) {