Copy address to clipboad on mobile

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-27 02:31:07 -03:00
commit 7bc284c0fd
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 13 additions and 3 deletions

View file

@ -23,7 +23,7 @@
<h4 class="title m0" translate>Information</h4>
<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="right">
<span ng-if="btx.merchant">

View file

@ -13,9 +13,9 @@
<div class="p45t" ng-init="updateCopayerList()">
<h4 class="title m0" translate>Information</h4>
<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="right">{{tx.toAddress}}</span>
<span class="right enable_text_select">{{tx.toAddress}}</span>
</li>
<li class="line-b p10">
<span class="text-gray" translate>Amount</span>:

View file

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