Browse Source

edex dashboard wallet recieve section updated with code

master
Satinder Grewal 8 years ago
parent
commit
947f00df3f
  1. 69
      assets/scripts/dashboard.js
  2. 6
      assets/scripts/iguana_api.js
  3. 87
      index.html

69
assets/scripts/dashboard.js

@ -36,6 +36,7 @@ var Dashboard = function() {
$('#edexcoin_dashoard_section').show();
$('#edexcoin_dashboardinfo').show();
$('#edexcoin_send').hide();
$('#edexcoin_recieve').hide();
$('#edexcoin_recieve_section').hide();
$('#edexcoin_settings').hide();
getCoinBalance(active_edexcoin);
@ -52,6 +53,7 @@ var Dashboard = function() {
$('#edexcoin_dashboardinfo').hide();
$('#edexcoin_send').show();
$('#edexcoin_recieve').hide();
$('#edexcoin_recieve_section').hide();
$('#edexcoin_settings').hide();
@ -177,12 +179,36 @@ var Dashboard = function() {
//console.log(tmp_json_data);
var tmp_sendtoaddr_output = EDEXSendToAddr(tmp_json_data);
console.log(tmp_sendtoaddr_output);
getCoinBalance(active_edexcoin);
clearEdexSendFieldData();
NProgress.done();
}
});
}
var handle_edex_recieve = function() {
$('#btn_edexcoin_recieve').click(function() {
var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
//console.log('wallet recieve button clicked...');
$('#edexcoin_dashboardinfo').hide();
$('#edexcoin_dashoard_section').hide();
$('#edexcoin_send').hide();
$('#edexcoin_recieve').show();
$('#edexcoin_recieve_section').show();
$('#edexcoin_settings').hide();
EdexListAllAddr(active_edexcoin);
clearEdexSendFieldData();
});
$('#edexcoin_get_new_addr').click(function() {
var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
console.log('get new T address button clicked...');
EDEXgetnewaddress(active_edexcoin);
EdexListAllAddr(active_edexcoin);
toastr.info("Recieving Address list updated", "Wallet Notification");
});
};
var handleWalletWidgets = function() {
var walletDivContent = '';
@ -317,6 +343,7 @@ var Dashboard = function() {
handle_edex_wallet();
handle_edex_dashboard();
handle_edex_send();
handle_edex_recieve();
@ -582,10 +609,6 @@ function ShowCoinHistory(getData) {
}
function getCoinBalance(coin) {
//console.log(rmd160conv_data);
//return rmd160conv_data;
//comment
var ajax_data = {"agent":"bitcoinrpc","method":"getbalance","coin": coin};
//console.log(ajax_data);
$.ajax({
@ -787,6 +810,8 @@ function ShowCoinProgressBar(coin) {
$('div[data-edexcoin="'+coin+'"][id="currency-bundles"]').removeClass( "progress-bar-info" ).addClass( "progress-bar-indicating progress-bar-success" );
$('#edex-footer').css("height", "11px");
resizeDashboardWindow();
//getCoinBalance(coin);
//EdexfillTxHistory(coin);
}
if ( parseInt(CoinInfoData.RTheight) == 0 ) {
sessionStorage.setItem('Activate'+coin+'History', 'No');
@ -898,4 +923,40 @@ function clearEdexSendFieldData() {
$('#edexcoin_sendto').val('');
$('#edexcoin_total_value').text('');
$('#edexcoin_amount').val('');
}
function EdexListAllAddr(coin) {
NProgress.done(true);
NProgress.configure({
template: '<div class="bar nprogress-bar-header nprogress-bar-info" role="bar"></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
});
NProgress.start();
var only_reciving_addr_data = [];
var listAlladdr = EDEXgetaddrbyaccount(coin);
listAlladdr = listAlladdr[0];
console.log(listAlladdr);
$.each(listAlladdr, function(index, value) {
tmp_addr_label = '<span class="label label-default"><i class="icon fa-eye"></i> public</span>';
//var tmp_addr_action_button = '<button></button>';
only_reciving_addr_data.push([tmp_addr_label, listAlladdr[index]]);
});
//console.log(only_reciving_addr_data);
var edexcoin_recieve_table = '';
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable( { data: only_reciving_addr_data,
select: false,
retrieve: true
});
edexcoin_recieve_table.destroy();
edexcoin_recieve_table = $('#edexcoin-recieve-addr-tbl').DataTable( { data: only_reciving_addr_data,
select: false,
retrieve: true
});
NProgress.done();
return only_reciving_addr_data;
}

6
assets/scripts/iguana_api.js

@ -547,7 +547,7 @@ function EDEXSendToAddr(data) {
//Get parameters values from confirm dialog and send currency
var sendtoaddrvalues = {"coin": confirm_coinname_to_send,"method":"sendtoaddress","params":[confirm_sendto_address,confirm_send_amount,"EasyDEX","EasyDEXTransaction"]};
console.log(sendtoaddrvalues);
//console.log(sendtoaddrvalues);
$.ajax({
async: false,
type: 'POST',
@ -578,7 +578,7 @@ function EDEXgetinfo(coin) {
//Get parameters values from confirm dialog and send currency
var ajax_data = {"coin":coin,"agent":"bitcoinrpc","method":"getinfo","immediate":100,"timeout":4000};
console.log(ajax_data);
//console.log(ajax_data);
$.ajax({
async: false,
type: 'POST',
@ -608,7 +608,7 @@ function EDEXgetaddrbyaccount(coin) {
//Get parameters values from confirm dialog and send currency
var ajax_data = {"coin":coin,"agent":"bitcoinrpc","method":"getaddressesbyaccount","account":"*"}
console.log(ajax_data);
//console.log(ajax_data);
$.ajax({
async: false,
type: 'POST',

87
index.html

@ -638,45 +638,62 @@
</div>
<!-- End Komodo Wallet send opid status tab -->
<!-- Modal -->
<div class="modal fade modal-3d-sign" id="SendCoinModelStep1" aria-hidden="true"
aria-labelledby="SendCoinModelTitle" role="dialog" tabindex="-1">
<div class="modal-dialog modal-center modal-lg">
<form class="modal-content" id="send_currency_form">
<div class="modal-header bg-orange-a400 wallet-send-header">
<button type="button" class="close white" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title white" id="SendCoinModelLabel">SEND <span id="mdl_currency_coin">[COIN]</span> <span id="mdl_currency_balance">(Balance)</span> <small class="white" style="font-size: 10px;">STEP 1 of 2</small></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12 form-group form-material">
<label class="control-label" for="mdl_currency_sendto">Send To</label>
<input type="text" class="form-control" id="mdl_currency_sendto" name="mdl_currency_sendto" placeholder="Enter [coin] address" autocomplete="off" required/>
</div>
<div class="col-lg-6 form-group form-material">
<label class="control-label" for="mdl_currency_amount" id="mdl_currency_amount_label">[Coin]</label>
<input type="text" class="form-control" id="mdl_currency_amount" name="mdl_currency_amount" placeholder="0.000" autocomplete="off"/>
</div>
<div class="col-lg-6 form-group form-material">
<label class="control-label" for="mdl_currency_fee">Fee</label>
<input type="text" class="form-control" id="mdl_currency_fee" name="mdl_currency_fee" placeholder="0.000" autocomplete="off"/>
</div>
<div class="col-lg-12">
<span><b>Total:</b>
<span id="mdl_currency_total_value">0.000</span> <span id="mdl_currency_total_coinname">[Coin]</span> <span class="icon glyphicon glyphicon-resize-horizontal"></span> <span id="mdl_currency_total_fiat_value">0.00</span></span>
<div data-edexcoin="COIN" id="edexcoin_recieve" style="display: none;">
<div class="col-xs-12 margin-top-20">
<!-- Komodo Wallet recieve tab -->
<div class="panel nav-tabs-horizontal">
<!-- KMD Wallet Recieve -->
<div data-edexcoin="COIN" id="edexcoin_recieve_section">
<div class="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<!-- Panel FixedHeader -->
<div class="panel">
<header class="panel-heading">
<div class="panel-actions">
<div class="dropdown">
<a class="dropdown-toggle white btn btn-warning" data-edexcoin="COIN" id="edexcoin_get_new_addr" href="javascript:void(0)"
aria-expanded="false" role="button"><i class="icon md-arrows margin-right-10" aria-hidden="true"></i> Get New Address</a>
</div>
</div>
<h3 class="panel-title">
Recieving Addresses
</h3>
</header>
<div class="panel-body">
<!--<p>Recieving addresses info goes here...</p>-->
<table class="table table-hover dataTable table-striped" data-edexcoin="COIN" id="edexcoin-recieve-addr-tbl">
<thead>
<tr>
<th>Type</th>
<th>Address</th>
<!--<th>Actions</th>-->
</tr>
</thead>
<tfoot>
<tr>
<th>Type</th>
<th>Address</th>
<!--<th>Actions</th>-->
</tr>
</tfoot>
</table>
</div>
</div>
<!-- End Panel FixedHeader -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="CurrencyMdlBtnClean()">Close</button>
<button type="button" class="btn btn-primary disabled" data-toggle="modal" id="mdl_currency_send_btn">Send</button>
</div>
</form>
<!-- End KMD Wallet Recieve -->
</div>
<!-- End Komodo Wallet recieve tab -->
</div>
</div>
<!-- End Modal -->
</div>
<!-- Modal -->
<div class="modal fade modal-3d-sign" id="SendCoinModelStep2" aria-hidden="false" role="dialog"
tabindex="-1">

Loading…
Cancel
Save