From 17b79f949c99c2d7e8d7446520ca0f6e289fb271 Mon Sep 17 00:00:00 2001 From: Satinder Grewal Date: Fri, 25 Nov 2016 01:27:55 +1300 Subject: [PATCH] test --- assets/scripts/dashboard.js | 55 +++++++++++++++++++++---------------- index.html | 12 ++++---- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js index 6653b9c..bdaac46 100644 --- a/assets/scripts/dashboard.js +++ b/assets/scripts/dashboard.js @@ -237,27 +237,7 @@ var Dashboard = function() { }); - //Get coin history and pupulate balance and other info to wallet widget - var historyvalues = {"timeout":20000,"immediate":100,"agent":"basilisk","method":"history","vals":{"coin":"" + AllcoinsDataOutput[value][index] + ""}}; - var ExecuteShowCoinHistory = setInterval(function() { - if ( sessionStorage.getItem('IguanaActiveAccount') === null || sessionStorage.getItem('DashboardActions') === null || sessionStorage.getItem('DashboardActions') === "stop" ) { - clearInterval(ExecuteShowCoinHistory); - console.log('=> No wallet logged in, or Dashboard not ative. No need to Run History.'); - } else if ( sessionStorage.getItem('DashboardActions') === null || sessionStorage.getItem('DashboardActions') === "start") { - if ( value == "basilisk") { - //console.log("ShowCoinHistory and ShowCoinProgressBar not executing for basilisk..."); - } else { - //console.log('wallet widget refereshed (every 1 seconds)'); - //Show Coin Progress Bars - var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin"); - ShowCoinProgressBar(active_edexcoin); - if ( sessionStorage.getItem('Activate'+active_edexcoin+'History') === 'Yes' ) { - console.log('Show coin history'); - //ShowCoinHistory(historyvalues); - } - } - } - }, 1000); + }); }, @@ -281,19 +261,46 @@ var Dashboard = function() { var handleWalletWidgetBtns = function() { - + $('.mdl_addcoin_done_btn').click(function(){ + ExecuteAddCoinFn(); + }); } + var handleEdexWalletInfo = function() { + //Get coin history and pupulate balance and other info to wallet widget + var ExecuteShowCoinHistory = setInterval(function() { + if ( sessionStorage.getItem('IguanaActiveAccount') === null || sessionStorage.getItem('DashboardActions') === null || sessionStorage.getItem('DashboardActions') === "stop" ) { + clearInterval(ExecuteShowCoinHistory); + console.log('=> No wallet logged in, or Dashboard not ative. No need to Run History.'); + } else if ( sessionStorage.getItem('DashboardActions') === null || sessionStorage.getItem('DashboardActions') === "start") { + //if ( value == "basilisk") { + //console.log("ShowCoinHistory and ShowCoinProgressBar not executing for basilisk..."); + //} else { + //console.log('wallet widget refereshed (every 1 seconds)'); + //Show Coin Progress Bars + var active_edexcoin = $('[data-edexcoin]').attr("data-edexcoin"); + ShowCoinProgressBar(active_edexcoin); + if ( sessionStorage.getItem('Activate'+active_edexcoin+'History') === 'Yes' ) { + console.log('Show coin history'); + var historyvalues = {"timeout":20000,"immediate":100,"agent":"basilisk","method":"history","vals":{"coin":"" + active_edexcoin + ""}}; + //ShowCoinHistory(historyvalues); + //} + } + } + }, 1000); + } + + return { //main function to initiate the module init: function() { resizeDashboardWindow(); handle_edex_wallet(); - //handleWalletWidgetBtns(); + window.onresize = function(event) { resizeDashboardWindow(); }; @@ -302,6 +309,8 @@ var Dashboard = function() { console.log('=> No wallet logged in. No need to run Dashboard JS.'); } else { handleWalletWidgets(); + handleWalletWidgetBtns(); + handleEdexWalletInfo(); //TotalFiatValue(); } diff --git a/index.html b/index.html index 0e0d407..1e6e3da 100755 --- a/index.html +++ b/index.html @@ -479,7 +479,7 @@
  • Recieve
  • Transactions
  • -
  • Add Coin
  • +
  • Add Coin
  • Settings
  • @@ -604,7 +604,7 @@
    -
    - +