Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
fixes for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
shekenahglory committed Nov 29, 2016
1 parent 6aa9d9f commit 5ecdf6d
Show file tree
Hide file tree
Showing 12 changed files with 935 additions and 874 deletions.
2 changes: 1 addition & 1 deletion src/app/external-markets/external-markets.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

.external-markets .total span {
font-family: "Open Sans Light"
font-family: "Open Sans Light", "Open Sans", Arial
}

.external-markets .total small {
Expand Down
14 changes: 7 additions & 7 deletions src/app/manage-currencies/manage.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//manage currencies & gateways
.manage_wrapper {

font-family: "Open Sans" !important;
font-family: "Open Sans", Arial !important;

h5 {
margin-bottom: 20px;
Expand Down Expand Up @@ -70,14 +70,14 @@

#curr_list {
min-height: 240px;

input {
margin: 5px 5px 10px 10px;
cursor: pointer;
}
}

#irba_gateway_curr_list text {
#irba_gateway_curr_list text {
padding: 5px;
}

Expand Down Expand Up @@ -180,14 +180,14 @@
a {
color: #346aa9;
}
}
}

}

}


//manage gateway specific
//manage gateway specific

.manage_gateways {

Expand All @@ -202,8 +202,8 @@
}

@media (min-width: 1200px) {

.manage_gateways .removeBtn {
margin-right: 95px;
}
}
}
61 changes: 34 additions & 27 deletions src/app/markets/markets.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function MarketsCtrl($scope, $state, $location, gateways) {
var updateMode = ''
var dropdownA
var dropdownB
var toCSV

// set up the price chart
var priceChart = new PriceChart({
Expand Down Expand Up @@ -166,33 +167,6 @@ function MarketsCtrl($scope, $state, $location, gateways) {
url: API
})

var toCSV = d3.select('#toCSV')
.on('click', function() {
if (toCSV.attr('disabled')) {
return
}

var data = priceChart.getRawData()
var list = []

for (var i = 0; i < data.length; i++) {
list.push(JSON.parse(JSON.stringify(data[i])))
}

var csv = jsonToCSV(list)
if (Modernizr.prefixed('requestFileSystem', window)) {
var blob = new Blob([csv], {'type': 'application/octet-stream'})
this.href = window.URL.createObjectURL(blob)

} else {
this.href = 'data:text/csvcharset=utf-8,' + escape(csv)
}

this.download = $scope.base.currency + '_' +
$scope.counter.currency + '_historical.csv'
this.target = '_blank'
})

/**
* updateScopeAndStore
*/
Expand Down Expand Up @@ -466,6 +440,39 @@ function MarketsCtrl($scope, $state, $location, gateways) {
tradeFeed.loadPair($scope.base, $scope.counter)
}

/**
* downloadCSV
*/

function downloadCSV() {
if (toCSV.attr('disabled')) {
return
}

var interval = getInterval()
var range = getRange()

var csvURL = API + '/exchanges/' + $scope.base.currency +
($scope.base.issuer ? '+' + $scope.base.issuer : '') +
'/' + $scope.counter.currency +
($scope.counter.issuer ? '+' + $scope.counter.issuer : '') +
'?limit=1000&format=csv' +
'&interval=' + interval.multiple + interval.interval

if (range.name === 'custom') {
csvURL += '&start=' + $scope.start
csvURL += '&end=' + $scope.end
} else {
csvURL += '&start=' + moment.utc().format()
csvURL += '&end=' + moment.utc(range.offset(moment())).format()
}

d3.select(this).attr('href', csvURL)
}

toCSV = d3.select('#toCSV')
.on('click', downloadCSV)

// set up flip button
d3.select('#flip').on('click', function() {
var swap = $scope.counter
Expand Down
8 changes: 4 additions & 4 deletions src/app/markets/markets.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
}

img {
width: 15px;
height: auto;
width: 18px;
height: 18px;
}
}

Expand Down Expand Up @@ -96,7 +96,7 @@

.downloadIcon {
width: 18px;
height: auto;
height: 18px;
}


Expand All @@ -106,7 +106,7 @@
color:#666;
display:inline-block;
text-align:center;
font-family:"Open Sans";
font-family:"Open Sans", Arial;
padding: 12px 6px 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/markets/markets.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h5>Live Market Data</h5>
</div>
<div class="sub">
<div id="counter" class="dropdowns"></div>
<a id="toCSV" disabled="true" title="Export to CSV">
<a id="toCSV" disabled="true" target="_blank" title="Export to CSV">
<img class="downloadIcon" src="assets/images/download_icn.svg"/>
</a>
</div>
Expand Down
Loading

0 comments on commit 5ecdf6d

Please sign in to comment.