mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update luci-base and luci-mod-admin-full to latest upstream version
This commit is contained in:
parent
7a86a163f5
commit
602a83668e
74 changed files with 7498 additions and 3067 deletions
|
|
@ -43,6 +43,7 @@ XHR = function()
|
|||
{
|
||||
this.reinit();
|
||||
|
||||
var ts = Date.now();
|
||||
var xhr = this._xmlHttp;
|
||||
var code = this._encode(data);
|
||||
|
||||
|
|
@ -65,14 +66,14 @@ XHR = function()
|
|||
var json = null;
|
||||
if (xhr.getResponseHeader("Content-Type") == "application/json") {
|
||||
try {
|
||||
json = eval('(' + xhr.responseText + ')');
|
||||
json = JSON.parse(xhr.responseText);
|
||||
}
|
||||
catch(e) {
|
||||
json = null;
|
||||
}
|
||||
}
|
||||
|
||||
callback(xhr, json);
|
||||
callback(xhr, json, Date.now() - ts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -83,13 +84,14 @@ XHR = function()
|
|||
{
|
||||
this.reinit();
|
||||
|
||||
var ts = Date.now();
|
||||
var xhr = this._xmlHttp;
|
||||
var code = this._encode(data);
|
||||
|
||||
xhr.onreadystatechange = function()
|
||||
{
|
||||
if (xhr.readyState == 4)
|
||||
callback(xhr);
|
||||
callback(xhr, null, Date.now() - ts);
|
||||
}
|
||||
|
||||
xhr.open('POST', url, true);
|
||||
|
|
@ -188,7 +190,7 @@ XHR.poll = function(interval, url, data, callback, post)
|
|||
for (var i = 0, e = XHR._q[0]; i < XHR._q.length; e = XHR._q[++i])
|
||||
{
|
||||
if (!(XHR._t % e.interval) && !e.xhr.busy())
|
||||
e.xhr[post ? 'post' : 'get'](e.url, e.data, e.callback, e.interval * 1000 - 5);
|
||||
e.xhr[post ? 'post' : 'get'](e.url, e.data, e.callback, e.interval * 1000 * 5 - 5);
|
||||
}
|
||||
|
||||
XHR._t++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue