Browse Source

code cleanup #9

master
Petr Balashov 8 years ago
parent
commit
3bcc5a788c
  1. 1070
      assets/scripts/kmd_wallet_dashboard.js
  2. 1572
      assets/scripts/login.js
  3. 211
      assets/scripts/sidebar.js
  4. 37
      assets/scripts/walletsettings.js

1070
assets/scripts/kmd_wallet_dashboard.js

File diff suppressed because it is too large

1572
assets/scripts/login.js

File diff suppressed because it is too large

211
assets/scripts/sidebar.js

@ -24,7 +24,7 @@ $(document).ready(function() {
$('#nav-dashboard').on('click', function() {
$('#section-dashboard').show();
var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin");
var active_edexcoin = $('[data-edexcoin]').attr('data-edexcoin');
if (active_edexcoin !== 'COIN') {
$('#header-dashboard').show();
}
@ -34,16 +34,16 @@ $('#nav-dashboard').on('click', function() {
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').hide();
$('#section-about-iguana').hide();
$('#nav-dashboard').removeClass( "" ).addClass( "active open" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$(".header-easydex-section").text("Dashboard");
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active') });
$(this.parentElement).addClass('active')
$('#nav-dashboard').removeClass( '' ).addClass( 'active open' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$(".header-easydex-section").text('Dashboard');
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); });
$(this.parentElement).addClass('active');
removeKMDWalletStyle();
removeZECWalletStyle();
CommonSidebarActionsSet011();
@ -59,15 +59,15 @@ $('#nav-easydex').on('click', function() {
$('#section-about-iguana').hide();
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').hide();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( "" ).addClass( "active open" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$(".header-easydex-section").text("EasyDEX");
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active') });
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( '' ).addClass( 'active open' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$(".header-easydex-section").text('EasyDEX');
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); });
$(this.parentElement).addClass('active')
removeKMDWalletStyle();
removeZECWalletStyle();
@ -84,21 +84,30 @@ $('#nav-komodo-wallet').on('click', function() {
$('#section-about-iguana').hide();
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').hide();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( "" ).addClass( "active open" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
//$.each($('[data-extcoin="KMD"]'), function(index, value) {console.log($('[data-extcoin="KMD"]').data()); $('[data-extcoin="KMD"]').attr("data-extcoin","ZEC"); });
$.each($('[data-extcoin]'), function(index, value) {$('[data-extcoin]').attr("data-extcoin","KMD"); $('[data-extcoin="KMD"]')});
$.each($('[data-extcoinname]'), function(index, value) {$('[data-extcoinname]').text("KMD"); $('[data-extcoinname="KMD"]')});
$.each($('[data-extcointitle]'), function(index, value) {$('[data-extcointitle]').text("Komodo"); $('[data-extcointitle="Komodo"]')});
KMDWalletDashboard.init(); //Initiate Komodo Dashbaord sript
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( '' ).addClass( 'active open' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$.each($('[data-extcoin]'), function(index, value) {
$('[data-extcoin]').attr('data-extcoin', 'KMD');
$('[data-extcoin="KMD"]');
});
$.each($('[data-extcoinname]'), function(index, value) {
$('[data-extcoinname]').text('KMD');
$('[data-extcoinname="KMD"]');
});
$.each($('[data-extcointitle]'), function(index, value) {
$('[data-extcointitle]').text('Komodo');
$('[data-extcointitle="Komodo"]');
});
KMDWalletDashboard.init(); // Initiate Komodo Dashboard sript
RunKMDInitFunctions();
applyKMDWalletStyle();
//removeZECWalletStyle();
// removeZECWalletStyle();
CommonSidebarActionsSet02();
removeDashboardStyle();
});
@ -106,30 +115,44 @@ $('#nav-komodo-wallet').on('click', function() {
$('#nav-zcash-wallet').on('click', function() {
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>'
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();
$('#section-dashboard').hide();
$('#header-dashboard').hide();
$('#section-easydex').hide();
$('#section-extcoin').hide();
//$('#section-zcash').show();
// $('#section-zcash').show();
$('#section-extcoin').show();
$('#section-about-iguana').hide();
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').hide();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( "" ).addClass( "active open" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$(".header-easydex-section").text("Zcash Wallet");
$.each($('[data-extcoin]'), function(index, value) {$('[data-extcoin]').attr("data-extcoin","ZEC"); $('[data-extcoin="ZEC"]')});
$.each($('[data-extcoinname]'), function(index, value) {$('[data-extcoinname]').text("ZEC"); $('[data-extcoinname="ZEC"]')});
$.each($('[data-extcointitle]'), function(index, value) {$('[data-extcointitle]').text("Zcash"); $('[data-extcointitle="Zcash"]')});
KMDWalletDashboard.init(); //Initiate Komodo Dashbaord sript
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( '' ).addClass( 'active open' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$(".header-easydex-section").text('Zcash Wallet');
$.each($('[data-extcoin]'), function(index, value) {
$('[data-extcoin]').attr('data-extcoin', 'ZEC');
$('[data-extcoin="ZEC"]');
});
$.each($('[data-extcoinname]'), function(index, value) {
$('[data-extcoinname]').text('ZEC');
$('[data-extcoinname="ZEC"]');
});
$.each($('[data-extcointitle]'), function(index, value) {
$('[data-extcointitle]').text('Zcash');
$('[data-extcointitle="Zcash"]');
});
KMDWalletDashboard.init(); // Initiate Komodo Dashbaord sript
RunKMDInitFunctions();
applyZECWalletStyle();
//removeKMDWalletStyle();
@ -147,16 +170,16 @@ $('#nav-iguana-atomic-explorer').on('click', function() {
$('#section-iguana-atomic-explorer').show();
$('#section-iguana-wallet-settings').hide();
$('#section-about-iguana').hide();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( "" ).addClass( "active open" );
$(".header-easydex-section").text("Atomic Explorer");
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active') });
$(this.parentElement).addClass('active')
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( '' ).addClass( 'active open' );
$(".header-easydex-section").text('Atomic Explorer');
$.each($('.nav-top-menu'), function(index, value) { $(value).removeClass('active'); });
$(this.parentElement).addClass('active');
removeKMDWalletStyle();
removeZECWalletStyle();
CommonSidebarActionsSet02();
@ -173,17 +196,17 @@ $('#nav-iguana-wallet-settings').on('click', function() {
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').show();
$('#section-about-iguana').hide();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( "" ).addClass( "active open" );
//$(".header-easydex-section").text("Wallet Settings");
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( '' ).addClass( 'active open' );
// $(".header-easydex-section").text("Wallet Settings");
removeKMDWalletStyle();
removeZECWalletStyle();
Settings_ShowWalletInfo(); //Execute this function from walletsettings.js file
Settings_ShowWalletInfo(); // Execute this function from walletsettings.js file
CommonSidebarActionsSet02();
removeDashboardStyle();
$('#easydex-header-div').hide();
@ -198,14 +221,14 @@ $('#nav-about-iguana').on('click', function() {
$('#section-iguana-atomic-explorer').hide();
$('#section-iguana-wallet-settings').hide();
$('#section-about-iguana').show();
$('#nav-dashboard').removeClass( " active open" ).addClass( "" );
$('#nav-easydex').removeClass( " active open" ).addClass( "" );
$('#nav-komodo-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-zcash-wallet').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-atomic-explorer').removeClass( " active open" ).addClass( "" );
$('#nav-iguana-wallet-settings').removeClass( " active open" ).addClass( "" );
$('#nav-about-iguana').removeClass( "" ).addClass( "active open" );
$(".header-easydex-section").text("About Iguana");
$('#nav-dashboard').removeClass( 'active open' ).addClass( '' );
$('#nav-easydex').removeClass( 'active open' ).addClass( '' );
$('#nav-komodo-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-zcash-wallet').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-atomic-explorer').removeClass( 'active open' ).addClass( '' );
$('#nav-iguana-wallet-settings').removeClass( 'active open' ).addClass( '' );
$('#nav-about-iguana').removeClass( '' ).addClass( 'active open' );
$(".header-easydex-section").text('About Iguana');
removeKMDWalletStyle();
removeZECWalletStyle();
CommonSidebarActionsSet02();
@ -213,30 +236,28 @@ $('#nav-about-iguana').on('click', function() {
$('#easydex-header-div').hide();
});
function CommonSidebarActionsSet01() {
sessionStorage.setItem('DashboardActions', "start");
sessionStorage.setItem('NativeWalletActions', "stop");
//$(document).ready(function() { Dashboard.init(); });
sessionStorage.setItem('DashboardActions', 'start');
sessionStorage.setItem('NativeWalletActions', 'stop');
// $(document).ready(function() { Dashboard.init(); });
$("#wifkeys_passphrase").val('');
$('#wif-priv-keys').html('');
}
function CommonSidebarActionsSet011() {
sessionStorage.setItem('DashboardActions', "start");
sessionStorage.setItem('NativeWalletActions', "stop");
//location.reload();
sessionStorage.setItem('DashboardActions', 'start');
sessionStorage.setItem('NativeWalletActions', 'stop');
// location.reload();
$("#wifkeys_passphrase").val('');
$('#wif-priv-keys').html('');
}
function CommonSidebarActionsSet02() {
sessionStorage.setItem('DashboardActions', "stop");
sessionStorage.setItem('DashboardActions', 'stop');
$("#wifkeys_passphrase").val('');
$('#wif-priv-keys').html('');
}
function applyKMDWalletStyle() {
$('.header-easydex-section').html('<img src="assets/images/kmd_header_title_logo.png">');
$('.page-title').hide();
@ -246,19 +267,18 @@ function applyKMDWalletStyle() {
$('#easydex_kmd_wallet_actions_header').show();
$('#easydex_zec_wallet_actions_header').hide();
$('#easydex_btc_btcd_balances_header').hide();
sessionStorage.setItem('NativeWalletActions', "start");
sessionStorage.setItem('NativeWalletActions', 'start');
}
function removeKMDWalletStyle() {
$('.page-title').show();
$('#easydex-header-div').removeAttr( "style" );
$('#easydex-header-div').removeAttr( 'style' );
$('#easydex_kmd_wallet_actions_header').hide();
$('#easydex_zec_wallet_actions_header').hide();
$('#easydex_btc_btcd_balances_header').show();
sessionStorage.setItem('NativeWalletActions', "stop");
sessionStorage.setItem('NativeWalletActions', 'stop');
}
function applyZECWalletStyle() {
$('.header-easydex-section').html('<img src="assets/images/zec_header_title_logo.png">');
$('.page-title').hide();
@ -268,30 +288,29 @@ function applyZECWalletStyle() {
$('#easydex_kmd_wallet_actions_header').hide();
$('#easydex_zec_wallet_actions_header').show();
$('#easydex_btc_btcd_balances_header').hide();
sessionStorage.setItem('NativeWalletActions', "start");
sessionStorage.setItem('NativeWalletActions', 'start');
}
function removeZECWalletStyle() {
$('.page-title').show();
$('#easydex-header-div').removeAttr( "style" );
$('#easydex-header-div').removeAttr( 'style' );
$('#easydex_kmd_wallet_actions_header').hide();
$('#easydex_zec_wallet_actions_header').hide();
$('#easydex_btc_btcd_balances_header').show();
sessionStorage.setItem('NativeWalletActions', "stop");
sessionStorage.setItem('NativeWalletActions', 'stop');
}
function applyDashboardStyle() {
$('.page-aside').show();
$('.page-main').show();
/* set default map height */
var navbarH = $(".site-navbar").outerHeight();
var footerH = $(".site-footer").outerHeight();
var mapH = $(window).height() - navbarH - footerH;
$(".page-main").outerHeight(mapH);
var navbarH = $('.site-navbar').outerHeight(),
footerH = $('.site-footer').outerHeight(),
mapH = $(window).height() - navbarH - footerH;
$('.page-main').outerHeight(mapH);
$('#easydex-header-div').hide();
var active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');
console.log(active_edexcoinmodecode)
console.log(active_edexcoinmodecode);
if (active_edexcoinmodecode == 'Basilisk') {
$('#edex-footer').hide();
} else {

37
assets/scripts/walletsettings.js

@ -1,9 +1,9 @@
var WalletSettings = function() {
var handleWalletExportKeys = function() {
$('.wifkeys-form').validate({
//errorElement: 'span', //default input error message container
//errorClass: 'help-block', // default input error message class
//focusInvalid: false, // do not focus the last invalid input
// errorElement: 'span', //default input error message container
// errorClass: 'help-block', // default input error message class
// focusInvalid: false, // do not focus the last invalid input
rules: {
wifkeys_passphrase: {
required: true
@ -20,7 +20,7 @@ var WalletSettings = function() {
var Getwifkeys_passphrase = $('#wifkeys_passphrase').val(),
WifKeyDivContent = '';
//First check which coins are active. Execute API for each mode of wallet
// First check which coins are active. Execute API for each mode of wallet
$.each([
'native',
'basilisk',
@ -38,13 +38,13 @@ var WalletSettings = function() {
url: 'http://127.0.0.1:7778',
success: function(data, textStatus, jqXHR) {
var AllcoinsDataOutput = JSON.parse(data);
//Only execute further code if that mode has any coins active it. if none, skill checking on them.
// Only execute further code if that mode has any coins active it. if none, skill checking on them.
if (AllcoinsDataOutput[value].length !== 0 ) {
console.log('== AllCoins Data OutPut ==');
console.log(value);
console.log(AllcoinsDataOutput[value]);
//First Run Encryptwallet API to get wif keys for each active coin
// First Run Encryptwallet API to get wif keys for each active coin
$.each(AllcoinsDataOutput[value], function(index) {
var wifkey_coin_handle = AllcoinsDataOutput[value][index];
@ -125,7 +125,7 @@ var WalletSettings = function() {
$('.wifkeys-form input').keypress(function(e) {
if (e.which == 13) {
if ($('.wifkeys-form').validate().form()) {
$('.wifkeys-form').submit(); //form validation success, call ajax form submit
$('.wifkeys-form').submit(); // form validation success, call ajax form submit
}
return false;
@ -135,9 +135,9 @@ var WalletSettings = function() {
var handleWalletImportKeys = function() {
$('.wifkeys-import-form').validate({
//errorElement: 'span', //default input error message container
//errorClass: 'help-block', // default input error message class
//focusInvalid: false, // do not focus the last invalid input
// errorElement: 'span', //default input error message container
// errorClass: 'help-block', // default input error message class
// focusInvalid: false, // do not focus the last invalid input
rules: {
import_wifkey: {
required: true
@ -150,7 +150,7 @@ var WalletSettings = function() {
},
submitHandler: function(form) {
var Getimport_wifkey = $('#import_wifkey').val();
//console.log(Getimport_wifkey);
// console.log(Getimport_wifkey);
EDEXimportprivkey(Getimport_wifkey).then(function(result){
console.log(result)
if ( result.result !== undefined && result.result == 'success' ) {
@ -168,7 +168,7 @@ var WalletSettings = function() {
$('.wifkeys-import-form input').keypress(function(e) {
if (e.which == 13) {
if ($('.wifkeys-import-form').validate().form()) {
$('.wifkeys-import-form').submit(); //form validation success, call ajax form submit
$('.wifkeys-import-form').submit(); // form validation success, call ajax form submit
}
return false;
@ -177,7 +177,7 @@ var WalletSettings = function() {
};
return {
//main function to initiate the module
// main function to initiate the module
init: function() {
handleWalletExportKeys();
handleWalletImportKeys();
@ -221,7 +221,6 @@ function Settings_ShowCoinPeers() {
type: 'POST',
data: JSON.stringify(ajax_data),
url: 'http://127.0.0.1:7778',
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
var getCoinPeers = JSON.parse(data);
console.log(getCoinPeers);
@ -270,12 +269,10 @@ function Settings_ShowCoinPeers() {
});
}
function Settings_AddCoinPeers() {
console.log('wait till peer ip added to selected coin...')
var settings_selected_coinname_code_val = $('option:selected', '#settings_select_coin_addpeer_options').val(),
settings_add_peer_ip_val = $("#settings_add_peer_ip").val(),
settings_add_peer_ip_val = $('#settings_add_peer_ip').val(),
tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
ajax_data = {
'userpass': tmpIguanaRPCAuth,
@ -289,7 +286,6 @@ function Settings_AddCoinPeers() {
type: 'POST',
data: JSON.stringify(ajax_data),
url: 'http://127.0.0.1:7778',
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
var getAddCoinPeers = JSON.parse(data);
console.log(getAddCoinPeers);
@ -302,7 +298,7 @@ function Settings_AddCoinPeers() {
console.log('failed getting Coin History.');
console.log(xhr.statusText);
if ( xhr.readyState == 0 ) {
Iguana_ServiceUnavailable();
Iguana_ServiceUnavailable();
}
console.log(textStatus);
console.log(error);
@ -322,9 +318,8 @@ function Settings_LoadDebugLog() {
type: 'POST',
data: ajax_data,
url: 'http://127.0.0.1:17777/shepherd/debuglog',
//dataType: 'text',
success: function(data, textStatus, jqXHR) {
$('#read_debug_log_textarea').text(JSON.parse(data).result.replace('\n', '<br/>'));
$('#read_debug_log_textarea').text(JSON.parse(data).result.replace('\n', '\r\n'));
console.log(data);
},
error: function(xhr, textStatus, error) {

Loading…
Cancel
Save