Browse Source

some gui fixes, and error handling code updated in js/html part

master
Satinder Grewal 8 years ago
parent
commit
c965c7033c
  1. 18
      assets/scripts/kmd_wallet_dashboard.js
  2. 9
      index.html

18
assets/scripts/kmd_wallet_dashboard.js

@ -15,6 +15,7 @@ var KMDWalletDashboard = function() {
KMDfillTxHistoryT();
});
}
var handle_KMD_Send = function() {
@ -46,6 +47,7 @@ var KMDWalletDashboard = function() {
});
$('.showkmdwalletaddrs').selectpicker({ style: 'btn-info' });
$('.showkmdwalletaddrs').selectpicker('refresh');
});
$('.showkmdwalletaddrs').on('change', function(){
@ -226,6 +228,12 @@ var KMDWalletDashboard = function() {
});
};
var handleWalletDashboardAlet = function() {
$('#extcoin-wallet-connection-alert-btn').click(function(){
RunKMDInitFunctions();
});
}
return {
//main function to initiate the module
init: function() {
@ -236,6 +244,7 @@ var KMDWalletDashboard = function() {
KMDWalletRecieve();
KMDWalletSettings();
//RunKMDInitFunctions();
handleWalletDashboardAlet();
}
};
@ -259,16 +268,25 @@ function RunKMDInitFunctions() {
console.log('Could not connect to external wallet. Is external wallet running?');
toastr.error("Connection Error. Is external wallet running?", "Wallet Notification");
$('#extcoin-wallet').hide();
$('#extcoin-wallet-connection-alert').show();
}
if ( check1[0] == 'null return' ) {
console.log('Could not connect to external wallet. Is iguana connected to external wallet?');
toastr.error("Connection Error. Is iguana connected to external wallet?", "Wallet Notification");
$('#extcoin-wallet').hide();
$('#extcoin-wallet-connection-alert').show();
}
if ( check1[0] == 'connected' ) {
getTotalKMDBalance();
KMDfillTxHistoryT();
$('#extcoin-wallet').show();
$('#extcoin-wallet-connection-alert').hide();
$('#kmd_wallet_dashoard_section').show();
$('#kmd_wallet_dashboardinfo').show();
$('#kmd_wallet_send').hide();
$('#kmd_wallet_recieve_section').hide();
$('#kmd_wallet_settings').hide();
}
//KMDWalletDashboard.init()
$('#kmd_wallet_recieve_section').hide();

9
index.html

@ -618,6 +618,15 @@
<!-- BEGIN KOMODO WALLET CONTENT BODY -->
<div class="page-content" data-extcoin="COIN" id="section-extcoin">
<div role="alert" class="alert alert-danger alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-connection-alert" style="display: none;">
<button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button>
<h4>Opps! Something is no right...</h4>
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text">Could not connect to external wallet. Reasons can be:<br> - Your External Wallet/daemon isn't running<br>
- Your External Wallet/daemon is running, but iguana is not given command to connect to External Wallet/daemon<br>
- Your External Wallet/daemon is setup, but is not setup with config settings like<br><code>server=1</code><br><code>rpcport=</code><br><code>rpcuser=</code><br><code>rpcpassword=</code></p>
<!--<p class="margin-top-15"><button class="btn btn-success btn-inverse" type="button" id="extcoin-wallet-connection-alert-btn">Refresh Again</button></p>-->
</div>
<div class="row" data-extcoin="COIN" id="extcoin-wallet" data-plugin="masonry" style="display: none;">
<div class="col-xs-12">
<div class="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_t">

Loading…
Cancel
Save