Browse Source

Merge pull request #74 from pbca26/master

reduced IguanaAddcoin.js code
master
Satinder Grewal 8 years ago
committed by GitHub
parent
commit
b7acc07ae4
  1. 14
      assets/scripts/dashboard.js
  2. 8
      assets/scripts/dashboard/DashboardEDEX.js
  3. 38
      assets/scripts/iguana_api.js
  4. 1486
      assets/scripts/iguana_api/IguanaAddcoin.js
  5. 4
      assets/scripts/kmd_wallet_dashboard.js
  6. 3
      assets/scripts/lang/en.js
  7. 28
      assets/scripts/login.js
  8. 178
      assets/scripts/templates/bottomIncludes.js

14
assets/scripts/dashboard.js

@ -6,19 +6,7 @@ var RunTotalFiatValue = '',
edexcoin_send_form_validator = ''; edexcoin_send_form_validator = '';
var Dashboard = function() { var Dashboard = function() {
toastr.options = { toastr.options = toastrConfig;
'closeButton': true,
'debug': false,
'positionClass': 'toast-bottom-right',
'showDuration': '15000',
'hideDuration': '1000',
'timeOut': '15000',
'extendedTimeOut': '1000',
'showEasing': 'swing',
'hideEasing': 'linear',
'showMethod': 'fadeIn',
'hideMethod': 'fadeOut'
}
var handle_edex_wallet = function() { var handle_edex_wallet = function() {
$('#btn_edexcoin_wallet_dashboard').click(function() { $('#btn_edexcoin_wallet_dashboard').click(function() {

8
assets/scripts/dashboard/DashboardEDEX.js

@ -805,11 +805,11 @@ function edexCoinBtnAction() {
alertify.success(_lang[defaultLang].DASHBOARD.ADDR_COPIED + '.'); alertify.success(_lang[defaultLang].DASHBOARD.ADDR_COPIED + '.');
}); });
var clipboard = new Clipboard('.clipboard-edexaddr'); //var clipboard = new Clipboard('.clipboard-edexaddr');
clipboard.destroy(); //clipboard.destroy();
var clipboard = null; //var clipboard = null;
if ( clipboard != null ) { if (clipboard && clipboard != null ) {
clipboard.destroy(); clipboard.destroy();
} }

38
assets/scripts/iguana_api.js

@ -147,6 +147,7 @@ function Iguana_CheckActiveCoins() {
'method': 'allcoins' 'method': 'allcoins'
}, },
AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) { AjaxOutputData = IguanaAJAX('http://127.0.0.1:' + config.iguanaPort, ajax_data).done(function(data) {
console.log(data);
var result = []; var result = [];
AjaxOutputData = JSON.parse(AjaxOutputData.responseText); AjaxOutputData = JSON.parse(AjaxOutputData.responseText);
@ -158,9 +159,10 @@ function Iguana_CheckActiveCoins() {
result.push({ 'active': AjaxOutputData[index].length }); result.push({ 'active': AjaxOutputData[index].length });
} }
} }
}); });
resolve(result);
}) resolve(result);
})
.fail(function(xhr, textStatus, error) { .fail(function(xhr, textStatus, error) {
// handle request failures // handle request failures
console.log(xhr.statusText); console.log(xhr.statusText);
@ -260,11 +262,27 @@ function checkAC(coinVal) {
} }
} }
function formatBytes(bytes,decimals) { function formatBytes(bytes, decimals) {
if(bytes == 0) return '0 Bytes'; if (bytes == 0)
var k = 1000, return '0 Bytes';
dm = decimals + 1 || 3,
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], var k = 1000,
i = Math.floor(Math.log(bytes) / Math.log(k)); dm = decimals + 1 || 3,
return {'ramsize': parseFloat((bytes / Math.pow(k, i)).toFixed(dm)), 'size':sizes[i]} sizes = [
'Bytes',
'KB',
'MB',
'GB',
'TB',
'PB',
'EB',
'ZB',
'YB'
],
i = Math.floor(Math.log(bytes) / Math.log(k));
return {
'ramsize': parseFloat((bytes / Math.pow(k, i)).toFixed(dm)),
'size': sizes[i]
};
} }

1486
assets/scripts/iguana_api/IguanaAddcoin.js

File diff suppressed because it is too large

4
assets/scripts/kmd_wallet_dashboard.js

@ -48,7 +48,7 @@ function getPassthruAgent() {
var extcoin = $('[data-extcoin]').attr('data-extcoin'); var extcoin = $('[data-extcoin]').attr('data-extcoin');
passthru_agent = ''; passthru_agent = '';
console.log(extcoin) console.log(extcoin);
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; }; if ( extcoin == 'KMD') { passthru_agent = 'komodo'; };
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; }; if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; };
@ -239,7 +239,7 @@ function KMD_ProgressBar() {
if (extcoin !== 'ZEC') { if (extcoin !== 'ZEC') {
if ( getinfotmp == 'activating') { if ( getinfotmp == 'activating') {
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('Activating...'); $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(_lang[defaultLang].INDEX + '...');
} else { } else {
var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10);
//console.log(sync_percent); //console.log(sync_percent);

3
assets/scripts/lang/en.js

@ -176,7 +176,8 @@ const _lang = {
'REFRESH_FUNDS': 'Refresh Funds', 'REFRESH_FUNDS': 'Refresh Funds',
'INFO': 'Info', 'INFO': 'Info',
'ENTER': 'Enter', 'ENTER': 'Enter',
'ADDR_SM': 'address' 'ADDR_SM': 'address',
'ACTIVATING': 'Activating'
}, },
'JUMBLR': { 'JUMBLR': {
'NOTICE': 'EXPERIMENTAL TEST VERSION ONLY', 'NOTICE': 'EXPERIMENTAL TEST VERSION ONLY',

28
assets/scripts/login.js

@ -1,17 +1,19 @@
const toastrConfig = {
'closeButton': true,
'debug': false,
'positionClass': 'toast-bottom-right',
'showDuration': '5000',
'hideDuration': '1000',
'timeOut': '5000',
'extendedTimeOut': '1000',
'showEasing': 'swing',
'hideEasing': 'linear',
'showMethod': 'fadeIn',
'hideMethod': 'fadeOut'
}
var Login = function() { var Login = function() {
toastr.options = { toastr.options = toastrConfig;
'closeButton': true,
'debug': false,
'positionClass': 'toast-bottom-right',
'showDuration': '5000',
'hideDuration': '1000',
'timeOut': '5000',
'extendedTimeOut': '1000',
'showEasing': 'swing',
'hideEasing': 'linear',
'showMethod': 'fadeIn',
'hideMethod': 'fadeOut'
}
var handleLogin = function() { var handleLogin = function() {
$('.login-form').validate({ $('.login-form').validate({

178
assets/scripts/templates/bottomIncludes.js

@ -1,112 +1,116 @@
templates.bottomIncludes = templates.bottomIncludes =
` `
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script> <script>
<script src="assets/global/vendor/jquery/jquery.min.js"></script> if (typeof module === 'object') {
<script src="assets/global/vendor/bootstrap/bootstrap.min.js"></script> window.module = module; module = undefined;
<script src="assets/global/vendor/animsition/animsition.min.js"></script> }
<script src="assets/global/vendor/asscroll/jquery-asScroll.min.js"></script> </script>
<script src="assets/global/vendor/jquery-scrollbar/jquery.scrollbar.min.js"></script> <script src="assets/global/vendor/jquery/jquery.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/mousewheel/jquery.mousewheel.min.js"></script> <script src="assets/global/vendor/bootstrap/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/asscrollable/jquery.asScrollable.all.min.js"></script> <script src="assets/global/vendor/animsition/animsition.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/ashoverscroll/jquery-asHoverScroll.min.js"></script> <script src="assets/global/vendor/asscroll/jquery-asScroll.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/waves/waves.min.js"></script> <script src="assets/global/vendor/jquery-scrollbar/jquery.scrollbar.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/mousewheel/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/asscrollable/jquery.asScrollable.all.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/ashoverscroll/jquery-asHoverScroll.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/waves/waves.min.js" type="text/javascript"></script>
<!-- Plugins --> <!-- Plugins -->
<script src="assets/global/vendor/switchery/switchery.min.js"></script> <script src="assets/global/vendor/switchery/switchery.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/intro-js/intro.min.js"></script> <script src="assets/global/vendor/intro-js/intro.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/screenfull/screenfull.min.js"></script> <script src="assets/global/vendor/screenfull/screenfull.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/slidepanel/jquery-slidePanel.min.js"></script> <script src="assets/global/vendor/slidepanel/jquery-slidePanel.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/bootbox/bootbox.js"></script> <script src="assets/global/vendor/bootbox/bootbox.js" type="text/javascript"></script>
<script src="assets/global/vendor/jquery-validation/jquery.validate.min.js"></script> <script src="assets/global/vendor/jquery-validation/jquery.validate.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/jquery-validation/additional-methods.min.js"></script> <script src="assets/global/vendor/jquery-validation/additional-methods.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/bootstrap-toastr/toastr.min.js"></script> <script src="assets/global/vendor/bootstrap-toastr/toastr.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/bootstrap-select/bootstrap-select.min.js"></script> <script src="assets/global/vendor/bootstrap-select/bootstrap-select.min.js"> type="text/javascript"</script>
<script src="assets/global/vendor/sweetalert2/sweetalert2.min.js" type="text/javascript"></script> <script src="assets/global/vendor/sweetalert2/sweetalert2.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/jquery-qrcode/jquery.qrcode.min.js" type="text/javascript"></script> <script src="assets/global/vendor/jquery-qrcode/jquery.qrcode.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/clipboard/clipboard.min.js"></script> <script src="assets/global/vendor/clipboard/clipboard.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/asprogress/jquery-asProgress.min.js"></script> <script src="assets/global/vendor/asprogress/jquery-asProgress.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/jquery-labelauty/jquery-labelauty.js"></script> <script src="assets/global/vendor/jquery-labelauty/jquery-labelauty.js" type="text/javascript"></script>
<script src="assets/global/vendor/alertify-js/alertify.js"></script> <script src="assets/global/vendor/alertify-js/alertify.js" type="text/javascript"></script>
<script src="assets/global/vendor/nprogress/nprogress.js"></script> <script src="assets/global/vendor/nprogress/nprogress.js" type="text/javascript"></script>
<script src="assets/global/vendor/ladda-bootstrap/spin.min.js"></script> <script src="assets/global/vendor/ladda-bootstrap/spin.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/ladda-bootstrap/ladda.min.js"></script> <script src="assets/global/vendor/ladda-bootstrap/ladda.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/datatables/jquery.dataTables.min.js"></script> <script src="assets/global/vendor/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/datatables-fixedheader/dataTables.fixedHeader.js"></script> <script src="assets/global/vendor/datatables-fixedheader/dataTables.fixedHeader.js" type="text/javascript"></script>
<script src="assets/global/vendor/datatables-bootstrap/dataTables.bootstrap.min.js"></script> <script src="assets/global/vendor/datatables-bootstrap/dataTables.bootstrap.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/datatables-responsive/dataTables.responsive.js"></script> <script src="assets/global/vendor/datatables-responsive/dataTables.responsive.js" type="text/javascript"></script>
<script src="assets/global/vendor/datatables-tabletools/dataTables.tableTools.js"></script> <script src="assets/global/vendor/datatables-tabletools/dataTables.tableTools.js" type="text/javascript"></script>
<script src="assets/global/vendor/underscore-js/underscore-min.js"></script> <script src="assets/global/vendor/underscore-js/underscore-min.js" type="text/javascript"></script>
<script src="assets/global/vendor/javascript-md5/md5.min.js"></script> <script src="assets/global/vendor/javascript-md5/md5.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/bluebird/bluebird.min.js"></script> <script src="assets/global/vendor/bluebird/bluebird.min.js" type="text/javascript"></script>
<script src="assets/global/vendor/socket.io.js"></script> <script src="assets/global/vendor/socket.io.js" type="text/javascript"></script>
<!-- Crypto Dependencies --> <!-- Crypto Dependencies -->
<script src="assets/scripts/wordlist.js" type="text/javascript"></script> <script src="assets/scripts/wordlist.js" type="text/javascript"></script>
<script src="assets/scripts/passphrasegenerator.js" type="text/javascript"></script> <script src="assets/scripts/passphrasegenerator.js" type="text/javascript"></script>
<script src="assets/scripts/seedrandom.js" type="text/javascript"></script> <script src="assets/scripts/seedrandom.js" type="text/javascript"></script>
<!-- Scripts --> <!-- Scripts -->
<script src="assets/global/js/core.js"></script> <script src="assets/global/js/core.js" type="text/javascript"></script>
<script src="assets/js/site.js"></script> <script src="assets/js/site.js" type="text/javascript"></script>
<script src="assets/js/sections/menu.js"></script> <script src="assets/js/sections/menu.js" type="text/javascript"></script>
<script src="assets/js/sections/menubar.js"></script> <script src="assets/js/sections/menubar.js" type="text/javascript"></script>
<script src="assets/js/sections/sidebar.js"></script> <script src="assets/js/sections/sidebar.js" type="text/javascript"></script>
<script src="assets/global/js/configs/config-colors.js"></script> <script src="assets/global/js/configs/config-colors.js" type="text/javascript"></script>
<script src="assets/js/configs/config-tour.js"></script> <script src="assets/js/configs/config-tour.js" type="text/javascript"></script>
<script src="assets/global/js/components/asscrollable.js"></script> <script src="assets/global/js/components/asscrollable.js" type="text/javascript"></script>
<script src="assets/global/js/components/nprogress.min.js"></script> <script src="assets/global/js/components/nprogress.min.js" type="text/javascript"></script>
<script src="assets/global/js/components/animsition.js"></script> <script src="assets/global/js/components/animsition.js" type="text/javascript"></script>
<script src="assets/global/js/components/slidepanel.js"></script> <script src="assets/global/js/components/slidepanel.js" type="text/javascript"></script>
<script src="assets/global/js/components/bootbox.js"></script> <script src="assets/global/js/components/bootbox.js" type="text/javascript"></script>
<script src="assets/global/js/components/switchery.js"></script> <script src="assets/global/js/components/switchery.js" type="text/javascript"></script>
<script src="assets/global/js/components/tabs.js"></script> <script src="assets/global/js/components/tabs.js" type="text/javascript"></script>
<script src="assets/global/js/components/buttons.js"></script> <script src="assets/global/js/components/buttons.js" type="text/javascript"></script>
<script src="assets/global/js/components/ladda-bootstrap.js"></script> <script src="assets/global/js/components/ladda-bootstrap.js" type="text/javascript"></script>
<script src="assets/global/js/components/asprogress.min.js"></script> <script src="assets/global/js/components/asprogress.min.js" type="text/javascript"></script>
<script src="assets/global/js/components/jquery-labelauty.min.js"></script> <script src="assets/global/js/components/jquery-labelauty.min.js" type="text/javascript"></script>
<script src="assets/global/js/components/alertify-js.js"></script> <script src="assets/global/js/components/alertify-js.js" type="text/javascript"></script>
<script src="assets/global/js/components/panel.min.js"></script> <script src="assets/global/js/components/panel.min.js" type="text/javascript"></script>
<script src="assets/scripts/config.js"></script> <script src="assets/scripts/config.js" type="text/javascript"></script>
<script src="assets/scripts/checkie.js"></script> <script src="assets/scripts/checkie.js" type="text/javascript"></script>
<!-- Iguana API Scripts --> <!-- Iguana API Scripts -->
<script src="assets/scripts/iguana_api.js"></script> <script src="assets/scripts/iguana_api.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaUnused.js"></script> <script src="assets/scripts/iguana_api/IguanaUnused.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaHandle.js"></script> <script src="assets/scripts/iguana_api/IguanaHandle.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaAddcoin.js"></script> <script src="assets/scripts/iguana_api/IguanaAddcoin.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaEDEX.js"></script> <script src="assets/scripts/iguana_api/IguanaEDEX.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaDEX.js"></script> <script src="assets/scripts/iguana_api/IguanaDEX.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaShepherd.js"></script> <script src="assets/scripts/iguana_api/IguanaShepherd.js" type="text/javascript"></script>
<script src="assets/scripts/iguana_api/IguanaJumblr.js"></script> <script src="assets/scripts/iguana_api/IguanaJumblr.js" type="text/javascript"></script>
<!-- End Iguana API Scripts --> <!-- End Iguana API Scripts -->
<script src="assets/scripts/login.js"></script> <script src="assets/scripts/login.js" type="text/javascript"></script>
<!-- Dashboard Scripts --> <!-- Dashboard Scripts -->
<script src="assets/scripts/dashboard.js"></script> <script src="assets/scripts/dashboard.js" type="text/javascript"></script>
<script src="assets/scripts/dashboard/DashboardEDEX.js"></script> <script src="assets/scripts/dashboard/DashboardEDEX.js" type="text/javascript"></script>
<script src="assets/scripts/dashboard/DashboardDEX.js"></script> <script src="assets/scripts/dashboard/DashboardDEX.js" type="text/javascript"></script>
<script src="assets/scripts/dashboard/DashboardBasilisk.js"></script> <script src="assets/scripts/dashboard/DashboardBasilisk.js" type="text/javascript"></script>
<script src="assets/scripts/dashboard/DashboardCoinFiat.js"></script> <script src="assets/scripts/dashboard/DashboardCoinFiat.js" type="text/javascript"></script>
<!-- End Dashboard Scripts --> <!-- End Dashboard Scripts -->
<!--<script src="assets/scripts/coinwallets.js"></script>--> <!--<script src="assets/scripts/coinwallets.js" type="text/javascript"></script>-->
<script src="assets/scripts/jumblr.js"></script> <script src="assets/scripts/jumblr.js" type="text/javascript"></script>
<script src="assets/scripts/sidebar.js"></script> <script src="assets/scripts/sidebar.js" type="text/javascript"></script>
<script src="assets/scripts/walletsettings.js"></script> <script src="assets/scripts/walletsettings.js" type="text/javascript"></script>
<script src="assets/scripts/atomicexplorer.js"></script> <script src="assets/scripts/atomicexplorer.js" type="text/javascript"></script>
<!-- Native KMD Wallet Scripts --> <!-- Native KMD Wallet Scripts -->
<script src="assets/scripts/kmd_wallet/KMDWalletDashboard.js"></script> <script src="assets/scripts/kmd_wallet/KMDWalletDashboard.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDInit.js"></script> <script src="assets/scripts/kmd_wallet/KMDInit.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDBalance.js"></script> <script src="assets/scripts/kmd_wallet/KMDBalance.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDGetinfo.js"></script> <script src="assets/scripts/kmd_wallet/KMDGetinfo.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDTransaction.js"></script> <script src="assets/scripts/kmd_wallet/KMDTransaction.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDTransactionInfo.js"></script> <script src="assets/scripts/kmd_wallet/KMDTransactionInfo.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDAddress.js"></script> <script src="assets/scripts/kmd_wallet/KMDAddress.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet/KMDSendTx.js"></script> <script src="assets/scripts/kmd_wallet/KMDSendTx.js" type="text/javascript"></script>
<script src="assets/scripts/kmd_wallet_dashboard.js"></script> <script src="assets/scripts/kmd_wallet_dashboard.js" type="text/javascript"></script>
<!-- End Native KMD Wallet Scripts --> <!-- End Native KMD Wallet Scripts -->
<!-- Multilang Scripts --> <!-- Multilang Scripts -->
<script src="assets/scripts/lang.js"></script> <script src="assets/scripts/lang.js" type="text/javascript"></script>
<script src="assets/scripts/lang/en.js"></script> <script src="assets/scripts/lang/en.js" type="text/javascript"></script>
<!-- End Multilang Scripts --> <!-- End Multilang Scripts -->
<script type="text/javascript"> <script type="text/javascript">

Loading…
Cancel
Save