Fixed external click for ads
This commit is contained in:
parent
f86cde7c7c
commit
c0f6d2eeec
4 changed files with 38 additions and 23 deletions
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
"packageName": "bitcoin.com",
|
||||
"packageDescription": "Bitcoin.com Wallet",
|
||||
"packageNameId": "com.bitpay.copay",
|
||||
"userVisibleName": "Bitcoin.com Wallet",
|
||||
"packageDescription": "Bitcoin.com",
|
||||
"packageNameId": "com.bitcoin.wallet",
|
||||
"userVisibleName": "Bitcoin.com",
|
||||
"purposeLine": "Bitcoin.com Wallet",
|
||||
"bundleName": "copay",
|
||||
"bundleName": "bitcoincom",
|
||||
"appUri": "bitcoincom",
|
||||
"name": "copay",
|
||||
"nameNoSpace": "copay",
|
||||
"nameCase": "Copay",
|
||||
"nameCaseNoSpace": "Copay",
|
||||
"gitHubRepoName": "copay",
|
||||
"gitHubRepoUrl": "git://github.com/bitpay/copay.git",
|
||||
"gitHubRepoBugs": "https://github.com/bitpay/copay/issues",
|
||||
"disclaimerUrl": "https://copay.io/disclaimer",
|
||||
"url": "https://copay.io",
|
||||
"appDescription": "Copay Bitcoin Wallet",
|
||||
"winAppName": "CopayWallet",
|
||||
"name": "Bitcoin.com",
|
||||
"nameNoSpace": "bitcoin.com",
|
||||
"nameCase": "Bitcoin.com",
|
||||
"nameCaseNoSpace": "Bitcoin.com",
|
||||
"gitHubRepoName": "wallet",
|
||||
"gitHubRepoUrl": "git://github.com/Bitcoin-com/Wallet.git",
|
||||
"gitHubRepoBugs": "https://github.com/Bitcoin-com/Wallet/issues",
|
||||
"disclaimerUrl": "https://www.bitcoin.com/wallet-disclaimer",
|
||||
"url": "https://wallet.bitcoin.com",
|
||||
"appDescription": "Bitcoin.com Wallet",
|
||||
"winAppName": "BitcoinWallet",
|
||||
"wpPublisherId": "{31cdd08b-457c-413d-b440-f6665eec847d}",
|
||||
"wpProductId": "{5381aa50-9069-11e4-84cc-293caf9cbdc8}",
|
||||
"windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c",
|
||||
|
|
@ -29,6 +29,6 @@
|
|||
"coinbase": false,
|
||||
"glidera": false,
|
||||
"amazon": false,
|
||||
"bitcoincom": true,
|
||||
"bitcoincom": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.bitpay.*BUNDLENAME*"
|
||||
<widget id="com.bitcoin.wallet"
|
||||
version="*VERSION*"
|
||||
android-versionCode="*ANDROIDVERSION*"
|
||||
ios-CFBundleVersion="*VERSION*">
|
||||
|
|
@ -7,8 +7,8 @@
|
|||
<description>
|
||||
*PURPOSELINE*
|
||||
</description>
|
||||
<author email="support@bitpay.com" href="*URL*">
|
||||
BitPay Inc.
|
||||
<author email="support@bitcoin.com" href="*URL*">
|
||||
Saint Bitts LLC.
|
||||
</author>
|
||||
<content src="index.html" />
|
||||
<access origin="*" />
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, buyAndSellService, lodash) {
|
||||
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, buyAndSellService, lodash, externalLinkService) {
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.services = buyAndSellService.get();
|
||||
|
||||
$scope.openExternalLink = function(url) {
|
||||
externalLinkService.open(url);
|
||||
}
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
console.log("Enter buy page");
|
||||
var r = new XMLHttpRequest();
|
||||
|
|
@ -14,8 +18,17 @@ angular.module('copayApp.controllers').controller('buyandsellController', functi
|
|||
console.log(r.responseText);
|
||||
var adResponse = JSON.parse(r.responseText)
|
||||
document.getElementById("exchange-logo").setAttribute('src', "https://www.bitcoin.com" + adResponse.image)
|
||||
document.getElementById("exchange-link").setAttribute('href', "https://www.bitcoin.com" + adResponse.url)
|
||||
document.getElementById("exchange-link").setAttribute('ng-click', "openExternalLink('"+ "https://www.bitcoin.com" + adResponse.url +"')")
|
||||
document.getElementById("exchange-name").textContent = adResponse.bannerName;
|
||||
document.getElementById("exchange-text").textContent = adResponse.description;
|
||||
|
||||
var exchangeLink = document.getElementById("exchange-link");
|
||||
|
||||
exchangeLink.addEventListener('click', function() {
|
||||
externalLinkService.open("https://www.bitcoin.com" + adResponse.url);
|
||||
});
|
||||
|
||||
};
|
||||
r.send("defaultpromotion=360");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,9 +11,11 @@
|
|||
<div class="explain-description">We recommend the following exchange:</div>
|
||||
<div class="item item-divider"></div>
|
||||
<div>
|
||||
<img src="img/ajax-loader2.gif" id="exchange-logo" style="max-width: 50%;" />
|
||||
<p id="exchange-name" style="font-size: 32px;"></p>
|
||||
<p id="exchange-text"></p>
|
||||
<a href="" target="_blank" id="exchange-link">
|
||||
<img src="img/ajax-loader2.gif" id="exchange-logo" style="max-width: 50%;" />
|
||||
<p id="exchange-name" style="font-size: 32px;"></p>
|
||||
<p id="exchange-text"></p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item-divider"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue