Merge pull request #2639 from cmgustavo/feat/copy-address

Copy address to clipboad on mobile
This commit is contained in:
Matias Alejo Garcia 2015-04-27 02:28:43 -03:00
commit e3f17df8aa
3 changed files with 13 additions and 3 deletions

View file

@ -23,7 +23,7 @@
<h4 class="title m0" translate>Information</h4> <h4 class="title m0" translate>Information</h4>
<ul class="no-bullet size-14 m0"> <ul class="no-bullet size-14 m0">
<li ng-if="btx.addressTo" class="line-b p10 oh"> <li ng-if="btx.addressTo" class="line-b p10 oh" ng-click="copyAddress(btx.addressTo)">
<span class="text-gray" translate>To</span>: <span class="text-gray" translate>To</span>:
<span class="right"> <span class="right">
<span ng-if="btx.merchant"> <span ng-if="btx.merchant">

View file

@ -13,9 +13,9 @@
<div class="p45t" ng-init="updateCopayerList()"> <div class="p45t" ng-init="updateCopayerList()">
<h4 class="title m0" translate>Information</h4> <h4 class="title m0" translate>Information</h4>
<ul class="no-bullet size-14 m0"> <ul class="no-bullet size-14 m0">
<li class="line-b p10 oh"> <li class="line-b p10 oh" ng-click="copyAddress(tx.toAddress)">
<span class="text-gray" translate>To</span>: <span class="text-gray" translate>To</span>:
<span class="right">{{tx.toAddress}}</span> <span class="right enable_text_select">{{tx.toAddress}}</span>
</li> </li>
<li class="line-b p10"> <li class="line-b p10">
<span class="text-gray" translate>Amount</span>: <span class="text-gray" translate>Amount</span>:

View file

@ -248,6 +248,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}, 100); }, 100);
}; };
$scope.copyAddress = function(addr) {
if (!addr) return;
self.copyAddress(addr);
};
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');
}; };
@ -753,6 +758,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
return n.substring(0, 4); return n.substring(0, 4);
}; };
$scope.copyAddress = function(addr) {
if (!addr) return;
self.copyAddress(addr);
};
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');
}; };