From a4731e7f06160960d143526cd866bfdcb5eae763 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 14 Aug 2015 16:56:13 -0300 Subject: [PATCH 1/3] Fix txp modals for single outputs --- public/views/modals/txp-details.html | 8 ++++---- src/js/controllers/walletHome.js | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index dc8c683bd..9a504c217 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -14,15 +14,15 @@ -
Payment finally rejected
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index 50fa2a54b..1f633431c 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -204,6 +204,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi var action = lodash.find(tx.actions, { copayerId: fc.credentials.copayerId }); + tx.amountStr = profileService.formatAmount(tx.amount) + ' ' + config.unitName; + tx.alternativeAmount = rateService.toFiat(tx.amount, config.alternativeIsoCode) ? rateService.toFiat(tx.amount, config.alternativeIsoCode).toFixed(2) : 'N/A'; + tx.alternativeAmountStr = tx.alternativeAmount + " " + config.alternativeIsoCode; $scope.tx = tx; if (!action && tx.status == 'pending') $scope.tx.pendingForUs = true; From 854b1511de76735294d9ac4e14aa0269a11fba0c Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 20 Aug 2015 16:43:03 -0300 Subject: [PATCH 2/3] Refactory single/multiples outputs --- public/views/includes/output.html | 38 +++++++----------- public/views/includes/transaction.html | 11 +++--- public/views/modals/tx-details.html | 37 +++++++++++------ public/views/modals/txp-details.html | 42 ++++++++++++++------ public/views/walletHome.html | 1 - src/js/controllers/index.js | 55 ++------------------------ src/js/controllers/walletHome.js | 18 +-------- src/js/services/utilService.js | 46 +++++++++++++++++++++ 8 files changed, 127 insertions(+), 121 deletions(-) create mode 100644 src/js/services/utilService.js diff --git a/public/views/includes/output.html b/public/views/includes/output.html index 2fb157df1..e22e4b8c2 100644 --- a/public/views/includes/output.html +++ b/public/views/includes/output.html @@ -1,24 +1,14 @@ -
-
  • - Recipients: - {{output.recipientCount}} - - - -
  • -
  • - To: - {{output.toAddress || output.address}} -
  • -
  • - Total - Amount: - {{output.amountStr}} - {{output.alternativeAmountStr}} - -
  • -
  • - Note: - {{output.message}} -
  • -
    +
  • + To: + {{output.toAddress || output.address}} +
  • +
  • + Amount: + {{output.amountStr}} + {{output.alternativeAmountStr}} + +
  • +
  • + Note: + {{output.message}} +
  • diff --git a/public/views/includes/transaction.html b/public/views/includes/transaction.html index f7d9b9d92..0a0be0be0 100644 --- a/public/views/includes/transaction.html +++ b/public/views/includes/transaction.html @@ -11,18 +11,19 @@
    - + Recipients: - {{tx.outputs.length}} + {{tx.recipientCount}} - + To: {{tx.merchant.domain}} {{tx.merchant.domain}} - - {{tx.toAddress}} + + {{tx.toAddress}} +
    diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index d4c04665a..35e1a1e1d 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -15,7 +15,7 @@