From 2bdf4021d22666b2d2cca66cffb1e0b9e1154547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 2 Sep 2016 14:50:50 -0300 Subject: [PATCH] fix transations details note and external link --- public/views/includes/note.html | 6 +++--- public/views/modals/tx-details.html | 2 +- src/js/controllers/modals/txDetails.js | 13 +++++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/public/views/includes/note.html b/public/views/includes/note.html index 451ac6baf..e52beba85 100644 --- a/public/views/includes/note.html +++ b/public/views/includes/note.html @@ -1,11 +1,11 @@
- +
- +
- +
diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index 070f1dcda..48a92f8c6 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -149,7 +149,7 @@
- diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index 84ca22954..2db8bb8b1 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService) { +angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService, platformInfo) { var self = $scope.self; var wallet = profileService.getWallet($stateParams.walletId); @@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio txid: $scope.btx.txid, }; - if (!lodash.isEmpty($scope.data.comment)) { + if ($scope.data.comment) { args.body = $scope.data.comment; }; @@ -80,6 +80,15 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio }); }; + $scope.openExternalLink = function(url, target) { + if (platformInfo.isNW) { + nodeWebkit.openExternalLink(url); + } else { + target = target || '_blank'; + var ref = window.open(url, target, 'location=no'); + } + }; + $scope.getShortNetworkName = function() { var n = wallet.credentials.network; return n.substring(0, 4);