|
|
@ -59,7 +59,7 @@ var Dashboard = function() { |
|
|
|
walletDivContent += '<div class="widget-header wallet-widget-header padding-15 clearfix">'; |
|
|
|
walletDivContent += '<div class="row no-space">'; |
|
|
|
walletDivContent += '<div class="col-xs-7">'; |
|
|
|
walletDivContent += '<a class="avatar avatar-lg pull-left margin-right-20 img-bordered" href="javascript:void(0)" data-currency="' + AllcoinsDataOutput[value][index] + '">'; |
|
|
|
walletDivContent += '<a class="avatar avatar-lg pull-left margin-right-20 img-bordered" href="javascript:void(0)" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-logo">'; |
|
|
|
walletDivContent += '<img src="assets/images/cryptologo/' + coinlogo + '.png" alt="">'; |
|
|
|
walletDivContent += '<span class="badge up badge-' + modecolor + '" id="basfull" data-currency="' + AllcoinsDataOutput[value][index] + '" data-toggle="tooltip" data-placement="top" data-original-title="' + modetip + '">' + modecode + '</span>'; |
|
|
|
walletDivContent += '</a>'; |
|
|
@ -77,19 +77,19 @@ var Dashboard = function() { |
|
|
|
walletDivContent += '<div class="col-md-4 col-xs-6">'; |
|
|
|
walletDivContent += '<div class="counter" data-toggle="tooltip" data-placement="top" data-original-title="Balance">'; |
|
|
|
walletDivContent += '<div class="counter-icon"><i class="icon">' + AllcoinsDataOutput[value][index] + '</i></div>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-balance">6.584</span>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-balance">0</span>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<div class="col-md-4 col-xs-6">'; |
|
|
|
walletDivContent += '<div class="counter" data-toggle="tooltip" data-placement="top" data-original-title="Unconfirmed">'; |
|
|
|
walletDivContent += '<div class="counter-icon"><i class="icon fa-spinner"></i></div>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-unconfirmed">3</span>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-unconfirmed">0</span>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<div class="col-md-4 hidden-xs hidden-sm">'; |
|
|
|
walletDivContent += '<div class="counter" data-toggle="tooltip" data-placement="top" data-original-title="No. of Transactions">'; |
|
|
|
walletDivContent += '<div class="counter-icon"><i class="icon fa-book"></i></div>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-nooftransactions">325</span>'; |
|
|
|
walletDivContent += '<span class="counter-number" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-nooftransactions">0</span>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
@ -108,6 +108,33 @@ var Dashboard = function() { |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<div class="widget-footer text-center">'; |
|
|
|
walletDivContent += '<div class="row no-space ">'; |
|
|
|
walletDivContent += '<div class="btn-group btn-group-justified">'; |
|
|
|
walletDivContent += '<div class="btn-group" role="group">'; |
|
|
|
walletDivContent += '<button type="button" class="btn btn-xs bg-blue-grey-200 grey-800 waves-effect waves-light" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-send">'; |
|
|
|
walletDivContent += '<i class="icon wb-upload" aria-hidden="true"></i>'; |
|
|
|
walletDivContent += '<br>'; |
|
|
|
walletDivContent += '<span class="text-uppercase hidden-xs">Send</span>'; |
|
|
|
walletDivContent += '</button>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<div class="btn-group" role="group">'; |
|
|
|
walletDivContent += '<button type="button" class="btn btn-xs bg-blue-grey-100 grey-800 waves-effect waves-light" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-receive">'; |
|
|
|
walletDivContent += '<i class="icon wb-download " aria-hidden="true"></i>'; |
|
|
|
walletDivContent += '<br>'; |
|
|
|
walletDivContent += '<span class="text-uppercase hidden-xs">Receive</span>'; |
|
|
|
walletDivContent += '</button>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<div class="btn-group" role="group">'; |
|
|
|
walletDivContent += '<button type="button" class="btn btn-xs bg-blue-grey-300 grey-800 waves-effect waves-light" data-currency="' + AllcoinsDataOutput[value][index] + '" id="currency-trade">'; |
|
|
|
walletDivContent += '<i class="icon wb-graph-up" aria-hidden="true"></i>'; |
|
|
|
walletDivContent += '<br>'; |
|
|
|
walletDivContent += '<span class="text-uppercase hidden-xs">Trade</span>'; |
|
|
|
walletDivContent += '</button>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '</div>'; |
|
|
|
walletDivContent += '<!-- End' + AllcoinsDataOutput[value][index] + 'wallet widget -->'; |
|
|
@ -165,23 +192,43 @@ var Dashboard = function() { |
|
|
|
var wallettblContent = ''; |
|
|
|
//console.log('== Data OutPut ==');
|
|
|
|
//console.log(CoinHistoryData);
|
|
|
|
$('span[data-currency="' + AllcoinsDataOutput[value][index] + '"][id="currency-balance"]').text(CoinHistoryData.balance); |
|
|
|
|
|
|
|
var testhistory = {"result":"success","received":[{"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":9.94390000,"numseconds":1410727,"details":{"txid":"e0330be4ec6f2fd27bc26c559524ccd808a589a0752e18618b358d288d62be3a","vout":1,"height":1195141,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.89000000,"numseconds":1340168,"details":{"txid":"46b210cd0d505e88b738d1ca09595e33dc435f11d53e0516566deb0a9e0de5ba","vout":1,"height":1196389,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.94590000,"numseconds":1340168,"details":{"txid":"67499f6ccefadf046e7e26b9a650f32b6dd472046356d79f35714f37482692d8","vout":1,"height":1196382,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.87900000,"numseconds":1319872,"details":{"txid":"2426d9e0d3643706c0709af8e5342106633030b59ef738cb75d3c19aebe51a40","vout":1,"height":1196766,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.97890000,"numseconds":1319871,"details":{"txid":"820b553726e055de46ee40652b86692be2c52fd561edf8a927ab012be46b4ed4","vout":1,"height":1196748,"relays":1}}],"sent":[],"coin":"BTCD","balance":13.63770000,"tag":"10703025980307863381"}; |
|
|
|
console.log(testhistory.received[0]); |
|
|
|
|
|
|
|
var testhistory = {"result":"success","received":[{"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":9.94390000,"numseconds":1410727,"details":{"txid":"e0330be4ec6f2fd27bc26c559524ccd808a589a0752e18618b358d288d62be3a","vout":1,"height":1195141,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.89000000,"numseconds":1340168,"details":{"txid":"46b210cd0d505e88b738d1ca09595e33dc435f11d53e0516566deb0a9e0de5ba","vout":1,"height":1196389,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.94590000,"numseconds":1340168,"details":{"txid":"67499f6ccefadf046e7e26b9a650f32b6dd472046356d79f35714f37482692d8","vout":1,"height":1196382,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.87900000,"numseconds":1319872,"details":{"txid":"2426d9e0d3643706c0709af8e5342106633030b59ef738cb75d3c19aebe51a40","vout":1,"height":1196766,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.97890000,"numseconds":1319871,"details":{"txid":"820b553726e055de46ee40652b86692be2c52fd561edf8a927ab012be46b4ed4","vout":1,"height":1196748,"relays":1}}],"sent":[{"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":9.94390000,"numseconds":1410727,"details":{"txid":"e0330be4ec6f2fd27bc26c559524ccd808a589a0752e18618b358d288d62be3a","vout":1,"height":1195141,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.89000000,"numseconds":1340168,"details":{"txid":"46b210cd0d505e88b738d1ca09595e33dc435f11d53e0516566deb0a9e0de5ba","vout":1,"height":1196389,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.94590000,"numseconds":1340168,"details":{"txid":"67499f6ccefadf046e7e26b9a650f32b6dd472046356d79f35714f37482692d8","vout":1,"height":1196382,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.87900000,"numseconds":1319872,"details":{"txid":"2426d9e0d3643706c0709af8e5342106633030b59ef738cb75d3c19aebe51a40","vout":1,"height":1196766,"relays":1}}, {"address":"RCNL1GJuTVt88dgnuiwS7i51ztjYHpPKF2","amount":0.97890000,"numseconds":1319871,"details":{"txid":"820b553726e055de46ee40652b86692be2c52fd561edf8a927ab012be46b4ed4","vout":1,"height":1196748,"relays":1}}],"coin":"BTCD","balance":13.63770000,"tag":"10703025980307863381"}; |
|
|
|
//console.log(testhistory.received[0]);
|
|
|
|
//console.log(testhistory.sent);
|
|
|
|
|
|
|
|
$('span[data-currency="' + AllcoinsDataOutput[value][index] + '"][id="currency-balance"]').text(CoinHistoryData.balance); |
|
|
|
|
|
|
|
$.each(testhistory.received, function(coin_history_index){ |
|
|
|
//console.log(coin_history_index);
|
|
|
|
|
|
|
|
|
|
|
|
wallettblContent += '<tr>'; |
|
|
|
wallettblContent += '<td><span class="label label-xs label-danger"><i class="icon fa-arrow-right"></i></span></td>'; |
|
|
|
wallettblContent += '<td class="hidden-xs">' + testhistory.received[coin_history_index].address + '</td>'; |
|
|
|
wallettblContent += '<td>' + testhistory.received[coin_history_index].numseconds + ' ' + coin_history_index + '</td>'; |
|
|
|
wallettblContent += '<td>' + testhistory.received[coin_history_index].numseconds + '</td>'; |
|
|
|
wallettblContent += '<td><span style="color: #f44336;">' + testhistory.received[coin_history_index].amount + '</span></td>'; |
|
|
|
wallettblContent += '</tr>'; |
|
|
|
$('#currency-tbl tbody').html(wallettblContent); |
|
|
|
}); |
|
|
|
|
|
|
|
$.each(testhistory.sent, function(coin_history_index){ |
|
|
|
//console.log(coin_history_index);
|
|
|
|
|
|
|
|
|
|
|
|
wallettblContent += '<tr>'; |
|
|
|
wallettblContent += '<td><span class="label label-xs label-success"><i class="icon fa-arrow-left"></i></span></td>'; |
|
|
|
wallettblContent += '<td class="hidden-xs">' + testhistory.received[coin_history_index].address + '</td>'; |
|
|
|
wallettblContent += '<td>' + testhistory.received[coin_history_index].numseconds + ' ' + coin_history_index + '</td>'; |
|
|
|
wallettblContent += '<td><span style="color: #4caf50;">' + testhistory.received[coin_history_index].amount + '</span></td>'; |
|
|
|
wallettblContent += '</tr>'; |
|
|
|
$('#currency-tbl tbody').html(wallettblContent); |
|
|
|
}); |
|
|
|
|
|
|
|
var history_trans_merged = $.merge(testhistory.received, testhistory.sent) |
|
|
|
//console.log(history_trans_merged);
|
|
|
|
$('span[data-currency="' + AllcoinsDataOutput[value][index] + '"][id="currency-nooftransactions"]').text(history_trans_merged.length); |
|
|
|
/*<tr> |
|
|
|
<td><span class="label label-xs label-success"><i class="icon fa-arrow-left"></i></span></td> |
|
|
|
<td class="hidden-xs">1LkTfkQLXg2v86oc1MoLz68nKoshh5ARTC</td> |
|
|
@ -216,12 +263,22 @@ var Dashboard = function() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var handleWalletSendRec = function() { |
|
|
|
|
|
|
|
$('#currency-logo').click(function() { |
|
|
|
console.log('hello!'); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
//main function to initiate the module
|
|
|
|
init: function() { |
|
|
|
|
|
|
|
handleWalletWidgets(); |
|
|
|
handleWalletSendRec(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|