D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
htdocs
/
modules
/
xovi
/
js
/
Filename :
dataChart.js
back
Copy
class XoviDataChart { constructor(settings) { this.url = settings.url; this._setLoadIcon(); } loadData(id, callback, queryParams) { XoviRequest.send(this.url, function (response) { $(id).update('<svg></svg>'); callback((response['data'] !== undefined ? response['data'] : [])); }, queryParams); } refreshData(queryParams, callback) { XoviRequest.send(this.url, function (response) { if (response['data'] !== undefined) { callback((response['data'] !== undefined ? response['data'] : [])); } }, queryParams); } _setLoadIcon() { $A(['pie', 'line']).each(function (type) { $$('div.' + type + '-body').each(function (div) { $(div).update('<div class="' + type + '-loader">' + '<img src="/modules/xovi/images/icons/indicator.gif" width="30" height="30">' + '</div>') }) }); } }