forked from bitpay/wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bitpay#327 from msalcala11/slideToPayComponent
Implement Slide to Pay
- Loading branch information
Showing
30 changed files
with
842 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,11 @@ | ||
'use strict'; | ||
|
||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $stateParams, $ionicHistory, $log, addressbookService) { | ||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout) { | ||
|
||
if ($scope.cb) $timeout($scope.cb, 100); | ||
|
||
var previousView = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName; | ||
$scope.fromSendTab = previousView.match(/tabs.send/) ? true : false; | ||
$scope.fromBitPayCard = previousView.match(/tabs.bitpayCard/) ? true : false; | ||
$scope.fromPayPro = $stateParams.paypro ? true : false; | ||
|
||
$scope.cancel = function() { | ||
$scope.txStatusModal.hide(); | ||
if ($scope.fromSendTab) { | ||
$ionicHistory.removeBackView(); | ||
$state.go('tabs.send'); | ||
$timeout(function() { | ||
$state.transitionTo('tabs.home'); | ||
}, 100); | ||
} else if ($scope.fromBitPayCard) { | ||
$ionicHistory.removeBackView(); | ||
$timeout(function() { | ||
$state.transitionTo('tabs.bitpayCard'); | ||
}, 100); | ||
} | ||
}; | ||
|
||
$scope.save = function(addressbookEntry) { | ||
$scope.txStatusModal.hide(); | ||
$ionicHistory.nextViewOptions({ | ||
disableAnimate: true, | ||
disableBack: true | ||
}); | ||
$ionicHistory.removeBackView(); | ||
$state.go('tabs.send.addressbook', { | ||
fromSendTab: $scope.fromSendTab, | ||
addressbookEntry: addressbookEntry | ||
}); | ||
} | ||
|
||
addressbookService.list(function(err, ab) { | ||
if (err) $log.error(err); | ||
if (ab[$scope.tx.toAddress]) { | ||
$scope.entryExist = true; | ||
$log.debug('Entry already exist'); | ||
} | ||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
angular.module('copayApp.directives') | ||
.directive('clickToAccept', function() { | ||
return { | ||
restrict: 'E', | ||
templateUrl: 'views/includes/clickToAccept.html', | ||
transclude: true, | ||
scope: { | ||
sendStatus: '=clickSendStatus', | ||
}, | ||
link: function(scope, element, attrs) { | ||
scope.$watch('sendStatus', function() { | ||
if(scope.sendStatus !== 'success') { | ||
scope.displaySendStatus = scope.sendStatus; | ||
} | ||
}); | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.