From b60e8ed40753ba191ea9d9521e824a8dc168021c Mon Sep 17 00:00:00 2001 From: Yemel Jardi Date: Wed, 13 Aug 2014 13:34:47 -0300 Subject: [PATCH] Add copy to clipboard button --- js/controllers/addresses.js | 6 ++++++ views/modals/qr-address.html | 3 +++ 2 files changed, 9 insertions(+) diff --git a/js/controllers/addresses.js b/js/controllers/addresses.js index c81a10fc3..cef87776f 100644 --- a/js/controllers/addresses.js +++ b/js/controllers/addresses.js @@ -19,6 +19,12 @@ angular.module('copayApp.controllers').controller('AddressesController', $scope.openAddressModal = function(address) { var ModalInstanceCtrl = function ($scope, $modalInstance, address) { $scope.address = address; + $scope.isMobile = !!window.cordova; + + $scope.mobileCopy = function(address) { + window.cordova.plugins.clipboard.copy(address); + window.plugins.toast.showShortBottom('Copied to clipboard'); + } $scope.cancel = function () { $modalInstance.dismiss('cancel'); diff --git a/views/modals/qr-address.html b/views/modals/qr-address.html index b1768df8d..7fb9a63ed 100644 --- a/views/modals/qr-address.html +++ b/views/modals/qr-address.html @@ -11,6 +11,9 @@



+