New slide up/down for different states

This commit is contained in:
Gustavo Maximiliano Cortez 2015-05-04 19:23:18 -03:00
commit e24628d775
7 changed files with 100 additions and 49 deletions

View file

@ -653,7 +653,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$timeout(function() {
self.slideLeft = false;
self.slideRight = false;
}, 370);
self.slideUp = false;
self.slideDown = false;
}, 400);
});
$rootScope.$on('Animation/SlideLeft', function(event) {
@ -664,6 +666,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
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

@ -277,9 +277,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
var modalInstance = $modal.open({
animation: false,
animation: true,
templateUrl: 'views/modals/txp-details.html',
windowClass: 'full',
windowClass: 'full animated slideInUp',
controller: ModalInstanceCtrl,
});

View file

@ -517,7 +517,7 @@ angular
preferencesBwsUrl: 12,
about: 12,
logs: 13,
add: 0,
add: 11,
create: 12,
join: 12,
import: 12,
@ -530,10 +530,21 @@ angular
});
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
if (pageWeight[fromState.name] > pageWeight[toState.name]) {
$rootScope.$emit('Animation/SlideRight');
if (pageWeight[fromState.name] == 11) {
$rootScope.$emit('Animation/SlideDown');
}
else {
$rootScope.$emit('Animation/SlideRight');
}
} else if (pageWeight[fromState.name] < pageWeight[toState.name]) {
$rootScope.$emit('Animation/SlideLeft');
if (pageWeight[toState.name] < 12) {
$rootScope.$emit('Animation/SlideUp');
}
else {
$rootScope.$emit('Animation/SlideLeft');
}
}
if (!profileService.profile && toState.needProfile) {