mirror of
https://github.com/nathanp/crypto-price-widget.git
synced 2025-11-06 03:08:55 -05:00
more portfolio updates
This commit is contained in:
parent
6da0f8f5bd
commit
0f1b2b3d86
@ -325,6 +325,7 @@ ul {
|
||||
}
|
||||
#portfolioChart {
|
||||
max-height: 480px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/*Scrollbar*/
|
||||
|
||||
@ -169,9 +169,11 @@ function initData() {
|
||||
ul = document.getElementById("prices");
|
||||
ulPortfolio = document.getElementById("portfolio-list");
|
||||
li = ul.getElementsByTagName('li');
|
||||
liPortfolio = ulPortfolio.getElementsByTagName('li');
|
||||
// Loop through all list items
|
||||
for (i = 0; i < li.length; i++) {
|
||||
li[i].setAttribute("sortorder", i);
|
||||
|
||||
var elementID = li[i].id;
|
||||
//alert(elementID);
|
||||
settings.set(elementID, { // coin-BTC
|
||||
@ -350,6 +352,8 @@ function updateData() {
|
||||
},
|
||||
options: {
|
||||
animation : false,
|
||||
responsive: false,
|
||||
maintainAspectRatio: true,
|
||||
legend : {
|
||||
position: 'bottom'
|
||||
}
|
||||
@ -404,6 +408,7 @@ for (let key of Object.keys(portfolio_list)) {
|
||||
}
|
||||
else {
|
||||
inputValue = '0';
|
||||
inputValue = settings.set('quantity.'+[coin], '0');
|
||||
}
|
||||
|
||||
span.innerHTML = '<span class="sym">' + coin + '</span> <span class="block quantity"><label for="quantity.' + coin +'">Quantity</label> <input type="number" name="quantity.' + coin +'" min="0" value="'+inputValue+'" step=".01"></span> <span class="block value"><label>Current Value</label><span class="quantity-value"></span></span>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "crypto-price-widget",
|
||||
"productName": "Crypto Price Widget",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "A cross-platform app for tracking Crypto prices",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user