Merge pull request #139 from Bitcoin-com/wallet/task/355

Improvement - 355 - Use External Link Service
This commit is contained in:
Jean-Baptiste Dominguez 2018-05-24 14:41:32 +09:00 committed by GitHub
commit f87c43de20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 13 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('communityController', function($scope, communityService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
angular.module('copayApp.controllers').controller('communityController', function($scope, communityService, $ionicScrollDelegate, $timeout, platformInfo, configService, externalLinkService) {
$scope.hide = false;
@ -29,11 +29,7 @@ angular.module('copayApp.controllers').controller('communityController', functio
}
$scope.open = function(url) {
if (platformInfo.isNW) {
require('nw.gui').Shell.openExternal( url );
} else {
window.open(url, '_system');
}
externalLinkService.open(url, false);
}
});

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService, externalLinkService) {
$scope.hide = false;
@ -22,10 +22,6 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio
};
$scope.open = function(url) {
if (platformInfo.isNW) {
require('nw.gui').Shell.openExternal( url );
} else {
window.open(url, '_system');
}
externalLinkService.open(url, false)
}
});

View file

@ -201,7 +201,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.viewOnBlockchain = function() {
var btx = $scope.btx;
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + blockexplorerUrl + '/tx/' + btx.txid;
window.open(url, '_system');
externalLinkService.open(url, false);
};
$scope.getShortNetworkName = function() {