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
|
@ -1306,6 +1306,28 @@ function cbi_tag_last(container)
|
|||
}
|
||||
}
|
||||
|
||||
function cbi_submit(elem, name, value, action)
|
||||
{
|
||||
var form = elem.form || findParent(elem, 'form');
|
||||
|
||||
if (!form)
|
||||
return false;
|
||||
|
||||
if (action)
|
||||
form.action = action;
|
||||
|
||||
if (name) {
|
||||
var hidden = form.querySelector('input[type="hidden"][name="%s"]'.format(name)) ||
|
||||
E('input', { type: 'hidden', name: name });
|
||||
|
||||
hidden.value = value || '1';
|
||||
form.appendChild(hidden);
|
||||
}
|
||||
|
||||
form.submit();
|
||||
return true;
|
||||
}
|
||||
|
||||
String.prototype.format = function()
|
||||
{
|
||||
if (!RegExp)
|
||||
|
@ -1498,6 +1520,15 @@ String.nobr = function()
|
|||
return ''.nobr.apply(arguments[0], a);
|
||||
}
|
||||
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
NodeList.prototype.forEach = function (callback, thisArg) {
|
||||
thisArg = thisArg || window;
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
callback.call(thisArg, this[i], i, this);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var dummyElem, domParser;
|
||||
|
||||
|
@ -2072,10 +2103,10 @@ function cbi_update_table(table, data, placeholder) {
|
|||
var trow = E('div', { 'class': 'tr' });
|
||||
|
||||
for (var i = 0; i < titles.length; i++) {
|
||||
var text = titles[i].innerText;
|
||||
var text = (titles[i].innerText || '').trim();
|
||||
var td = trow.appendChild(E('div', {
|
||||
'class': titles[i].className,
|
||||
'data-title': text ? text.trim() : null
|
||||
'data-title': (text !== '') ? text : null
|
||||
}, row[i] || ''));
|
||||
|
||||
td.classList.remove('th');
|
||||
|
|
BIN
luci-base/htdocs/luci-static/resources/icons/alias.png
Normal file
BIN
luci-base/htdocs/luci-static/resources/icons/alias.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 706 B |
BIN
luci-base/htdocs/luci-static/resources/icons/alias_disabled.png
Normal file
BIN
luci-base/htdocs/luci-static/resources/icons/alias_disabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 391 B |
Binary file not shown.
Before Width: | Height: | Size: 920 B |
Binary file not shown.
Before Width: | Height: | Size: 888 B |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
|
@ -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