Browse Source

added clear and fetch option in basilisk dropdown

master
pbca26 8 years ago
parent
commit
66cd364eb8
  1. 17
      assets/scripts/dashboard.js
  2. 2
      assets/scripts/iguana_api/IguanaEDEX.js
  3. 25
      assets/scripts/iguana_api/IguanaShepherd.js

17
assets/scripts/dashboard.js

@ -714,6 +714,23 @@ var Dashboard = function() {
});
});
$('.btn_edexcoin_dashboard_refetchdata').click(function() {
var selected_coin = $(this).data('edexcoin');
Shepherd_GroomData_Delete().then(function(result) {
var call_data = {
'allcoins': false,
'coin': selected_coin,
'calls': 'listtransactions:getbalance'
};
console.log(call_data);
Shepherd_FetchBasiliskData(call_data).then(function(result) {
console.log(result);
toastr.info(_lang[defaultLang].TOASTR.FETCHING_DATA, _lang[defaultLang].TOASTR.BASILISK_NOTIFICATION);
});
});
});
$('.btn_edexcoin_dashboard_refresh_basilisk_conn').click(function() {
var show_mdl = setTimeout(function() {
var selected_coin = $(this).data('edexcoin');

2
assets/scripts/iguana_api/IguanaEDEX.js

@ -617,7 +617,7 @@ function EDEXgetaddrbyaccount_cache(coin) {
var _data = JSON.parse(result),
query = _data.result.basilisk,
tmp_addr_label = '<span class="label label-default">' +
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPP.PUBLIC_SM +
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM +
'</span>',
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');

25
assets/scripts/iguana_api/IguanaShepherd.js

@ -144,7 +144,7 @@ function Shepherd_GroomData_Get() {
session_pubkey = parse_session_data.pubkey,
ajax_data = { 'filename': session_pubkey },
req_url = 'http://127.0.0.1:17777/shepherd/groom';
console.log(ajax_data);
$.ajax({
type: 'GET',
@ -185,6 +185,29 @@ function Shepherd_GroomData_Post(req_data) {
});
}
function Shepherd_GroomData_Delete() {
return new Promise((resolve) => {
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount');
parse_session_data = JSON.parse(JSON.parse(parse_session_data));
var request_method = '',
session_pubkey = parse_session_data.pubkey,
ajax_data = {
'filename': session_pubkey
},
req_url = 'http://127.0.0.1:17777/shepherd/groom';
$.ajax({
type: 'DELETE',
data: ajax_data,
url: req_url,
dataType: 'json'
})
.done(function(data) {
resolve(data);
});
});
}
function Shepherd_GetBasiliskCache() {
return new Promise((resolve) => {
var parse_session_data = sessionStorage.getItem('IguanaActiveAccount');

Loading…
Cancel
Save