|
|
@ -152,6 +152,9 @@ var Dashboard = function() { |
|
|
|
|
|
|
|
$('.showedexcoinaddrs').selectpicker({ style: 'btn-info' }); |
|
|
|
$('.showedexcoinaddrs').selectpicker('refresh'); |
|
|
|
|
|
|
|
$('.edexcoin_send_coins_btn_step1').addClass('disabled'); |
|
|
|
$('.edexcoin_send_coins_btn_step1').attr('disabled','disabled'); |
|
|
|
}) |
|
|
|
} else { |
|
|
|
$('.edexcoin_send_from_for_basilisk').hide() |
|
|
@ -168,8 +171,20 @@ var Dashboard = function() { |
|
|
|
|
|
|
|
$('.showedexcoinaddrs').on('change', function() { |
|
|
|
var selected = $(this).find('option:selected').val(); |
|
|
|
//console.log(selected)
|
|
|
|
}); |
|
|
|
|
|
|
|
$('#edexcoin_send_from').change(function() { |
|
|
|
if ($('#edexcoin_send_from').val() !== '' || $('#edexcoin_send_from').val() !== '- Select Address -') { |
|
|
|
$('.edexcoin_send_coins_btn_step1').removeClass('disabled'); |
|
|
|
$('.edexcoin_send_coins_btn_step1').removeAttr('disabled'); |
|
|
|
} |
|
|
|
if ($('#edexcoin_send_from').val() === '' || $('#edexcoin_send_from').val() === '- Select Address -') { |
|
|
|
$('.edexcoin_send_coins_btn_step1').addClass(' disabled'); |
|
|
|
$('.edexcoin_send_coins_btn_step1').attr('disabled','disabled'); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
$('#edexcoin_amount').keyup(function() { |
|
|
|
var sum_val1 = parseFloat($('#edexcoin_amount').val()), |
|
|
|
sum_val2 = parseFloat($('#edexcoin_fee').val()), |
|
|
@ -177,19 +192,6 @@ var Dashboard = function() { |
|
|
|
mdl_send_btn = $('#edexcoin_send_coins_btn'); |
|
|
|
|
|
|
|
$('#edexcoin_total_value').text(total_minus_currency_fee.toFixed(8)); |
|
|
|
|
|
|
|
if ($('#edexcoin_send_from').val() != '- Select Transparent or Private KMD Address -' && |
|
|
|
$('#edexcoin_amount').val() != '' && |
|
|
|
$('#edexcoin_sendto') != '' && |
|
|
|
$('#edexcoin_fee') != '' ) { |
|
|
|
mdl_send_btn.removeClass('disabled'); |
|
|
|
//mdl_send_btn.attr('data-dismiss','modal');
|
|
|
|
//mdl_send_btn.attr('data-target','#SendCoinModelStep2');
|
|
|
|
} else { |
|
|
|
mdl_send_btn.addClass('disabled'); |
|
|
|
mdl_send_btn.removeAttr('data-dismiss'); |
|
|
|
mdl_send_btn.removeAttr('data-target'); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$('#edexcoin_fee').keyup(function() { |
|
|
@ -201,18 +203,7 @@ var Dashboard = function() { |
|
|
|
//console.log($('#edexcoin_amount').val());
|
|
|
|
$('#edexcoin_total_value').text(total_minus_currency_fee.toFixed(8)); |
|
|
|
|
|
|
|
if ($('#edexcoin_send_from').val() != '- Select Transparent or Private KMD Address -' && |
|
|
|
$('#edexcoin_amount').val() != '' && |
|
|
|
$('#edexcoin_sendto') != '' && |
|
|
|
$('#edexcoin_fee') != '' ) { |
|
|
|
mdl_send_btn.removeClass('disabled'); |
|
|
|
//mdl_send_btn.attr('data-dismiss','modal');
|
|
|
|
//mdl_send_btn.attr('data-target','#SendCoinModelStep2');
|
|
|
|
} else { |
|
|
|
mdl_send_btn.addClass('disabled'); |
|
|
|
mdl_send_btn.removeAttr('data-dismiss'); |
|
|
|
mdl_send_btn.removeAttr('data-target'); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
edexcoin_send_form_validator = $('.edexcoin-send-form').validate({ |
|
|
@ -264,11 +255,20 @@ var Dashboard = function() { |
|
|
|
'</div>' |
|
|
|
}); |
|
|
|
NProgress.start(); |
|
|
|
|
|
|
|
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'); |
|
|
|
var selected_coinmode = sessionStorage.getItem('edexTmpMode') |
|
|
|
|
|
|
|
console.log('Sent control here after clicked in form...'); |
|
|
|
EDEXMainAddr($('[data-edexcoin]').attr('data-edexcoin')).then(function(result) { |
|
|
|
$('#mdl_confirm_currency_sendfrom_addr').text(result); |
|
|
|
}); |
|
|
|
|
|
|
|
if (selected_coinmode == 'Basilisk' && active_edexcoin !== 'BTC' && active_edexcoin !== 'SYS' ) { |
|
|
|
$('#mdl_confirm_currency_sendfrom_addr').text($('#edexcoin_send_from').val()); |
|
|
|
} else { |
|
|
|
EDEXMainAddr($('[data-edexcoin]').attr('data-edexcoin')).then(function(result) { |
|
|
|
$('#mdl_confirm_currency_sendfrom_addr').text(result); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
$('#mdl_confirm_currency_sendto_addr').text($('#edexcoin_sendto').val()); |
|
|
|
$('#mdl_confirm_currency_send_amount').text($('#edexcoin_amount').val()); |
|
|
|
$('#mdl_confirm_currency_coinname').text($('[data-edexcoin]').attr('data-edexcoin')); |
|
|
@ -280,9 +280,11 @@ var Dashboard = function() { |
|
|
|
console.log('==> Before confirming tx to send'); |
|
|
|
console.log($('[data-edexcoin]').attr('data-edexcoin')); |
|
|
|
console.log($('#edexcoin_sendto').val()); |
|
|
|
console.log($('#mdl_confirm_currency_sendfrom_addr').text()); |
|
|
|
console.log($('#edexcoin_total_value').text()); |
|
|
|
|
|
|
|
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'), |
|
|
|
tmp_send_from_addr = $('#edexcoin_send_from').val() |
|
|
|
tmp_send_to_addr = $('#edexcoin_sendto').val(), |
|
|
|
tmp_send_total_amount = $('#edexcoin_total_value').text(); |
|
|
|
$('#edexcoin-send-screen').hide(); |
|
|
@ -299,9 +301,11 @@ var Dashboard = function() { |
|
|
|
$('#edexcoin_send_coins_btn').prop('disabled', true); |
|
|
|
console.log('==> After confirming tx to send') |
|
|
|
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin'), |
|
|
|
tmp_send_from_addr = $('#edexcoin_send_from').val() |
|
|
|
tmp_send_to_addr = $('#edexcoin_sendto').val(), |
|
|
|
tmp_send_total_amount = $('#edexcoin_total_value').text(); |
|
|
|
console.log(active_edexcoin); |
|
|
|
console.log(tmp_send_from_addr); |
|
|
|
console.log(tmp_send_to_addr); |
|
|
|
console.log(tmp_send_total_amount); |
|
|
|
|
|
|
|