implement slide to pay

This commit is contained in:
Marty Alcala 2016-10-07 20:03:51 -04:00
commit 777c2efc32
22 changed files with 659 additions and 50 deletions

View file

@ -0,0 +1,31 @@
'use strict';
angular.module('copayApp.directives')
.directive('slideToAcceptSuccess', function($timeout) {
return {
restrict: 'E',
templateUrl: 'views/includes/slideToAcceptSuccess.html',
transclude: true,
scope: {
isShown: '=slideSuccessShow',
onConfirm: '&slideSuccessOnConfirm'
},
link: function(scope, element, attrs) {
var elm = element[0];
elm.style.display = 'none';
scope.$watch('isShown', function() {
if(scope.isShown) {
elm.style.display = 'flex';
$timeout(function() {
scope.fillScreen = true;
}, 10);
}
});
scope.onConfirmButtonClick = function() {
scope.onConfirm();
scope.fillScreen = false;
elm.style.display = 'none';
};
}
};
});