Merge pull request #1770 from dlandon/master

Fix tile management showing a blank dialog.
This commit is contained in:
tom mortensen
2024-07-02 08:49:23 -07:00
committed by GitHub
+6 -6
View File
@@ -647,11 +647,11 @@ table.find('tbody').not('.system').each(function(){
sort.push($(this).attr('sort'));
checked.push($(this).is(':visible') ? 'checked' : '');
});
for (var n=0,x; x=index[n]; n++) {
for (let n=0,x; x=index[n]; n++) {
$('div#list').append("<span class='item'><input class='checker' type='checkbox' "+checked[n]+">"+x+"</span>");
}
function hideShow() {
var n = 0, inactive = [];
let n = 0, inactive = [];
var count = {'db-box1':0, 'db-box2':0, 'db-box3':0};
$('input.checker').each(function(){
var tbody = $('table.dashboard').find('tbody[sort="'+sort[n]+'"]');
@@ -774,7 +774,7 @@ jQuery.prototype.mixedView = function(s) {
select = parseInt(select.val())+1;
this.find('tr:gt(0)').each(function(){
var names = ($(this).attr('class')||'').split(' ');
for (var n=0,name; name=names[n]; n++) if (/[0-9]/.test(name.slice(-1)) && name.slice(-1)!=select) $(this).hide();
for (let n=0,name; name=names[n]; n++) if (/[0-9]/.test(name.slice(-1)) && name.slice(-1)!=select) $(this).hide();
});
}
}
@@ -1236,7 +1236,7 @@ function showContent() {
var inactive = $.cookie('inactive_content');
if (inactive) {
inactive = inactive.split(';');
for (var n=0,md5; md5=inactive[n]; n++) {
for (let n=0,md5; md5=inactive[n]; n++) {
var tbody = $('table.dashboard tbody[sort="'+md5+'"]');
var id = tbody.parent().prop('id');
count[id]--;
@@ -1248,7 +1248,7 @@ function showContent() {
var hidden = $.cookie('hidden_content');
if (hidden) {
hidden = hidden.split(';');
for (var n=0,md5; md5=hidden[n]; n++) {
for (let n=0,md5; md5=hidden[n]; n++) {
var tbody = $('div.frame tbody[sort="'+md5+'"]');
tbody.find('.openclose').removeClass('fa-chevron-up fa-chevron-down').addClass('fa-chevron-down');
tbody.find('tr:gt(0)').hide();
@@ -1666,7 +1666,7 @@ dashboard.on('message',function(msg,meta) {
case 4:
// wireguard tunnels
var get = JSON.parse(msg);
var n = {};
let n = {};
for (var i=0,info; info=get[i]; i++) {
var vtun = info[0];
if (typeof n[vtun]=='undefined') n[vtun]=0; else n[vtun]++;