fix wallet icon amount view

This commit is contained in:
Gabriel Bazán 2016-10-13 17:11:19 -03:00
commit fa905cb719
5 changed files with 6389 additions and 5 deletions

View file

@ -22,6 +22,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;
$scope.showAlternativeAmount = !!$scope.cardId;
$scope.toColor = data.stateParams.toColor;
if (!$scope.cardId && !$stateParams.toAddress) {
$log.error('Bad params at amount')
@ -93,7 +94,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.pushDigit = function(digit) {
if ($scope.amount && $scope.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
if ($scope.amount.indexOf('.') > -1 && digit == '.') return;
if($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
if ($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
$scope.amount = ($scope.amount + digit).replace('..', '.');
checkFontSize();

View file

@ -102,7 +102,8 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
isWallet: item.isWallet,
toAddress: addr,
toName: item.name,
toEmail: item.email
toEmail: item.email,
toColor: item.color
})
});
});

View file

@ -251,7 +251,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('tabs.send.amount', {
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
url: '/amount/:isWallet/:toAddress/:toName/:toEmail/:toColor',
views: {
'tab-send@tabs': {
controller: 'amountController',