Fix more bugs

This commit is contained in:
Sj-Si 2024-04-23 11:45:24 -04:00
parent c550bcce44
commit 85197f870f

View File

@ -548,7 +548,7 @@ class ExtraNetworksTab {
dirs_btn.dataset.selected = "";
}
if (_exists(tree_btn)) {
tree_btn.dataset.selected = "";
this.tree_list.onRowSelected(tree_btn.dataset.divId, tree_btn, true);
}
this.applyDirectoryFilter(source_elem.dataset.path);
} else {
@ -556,7 +556,7 @@ class ExtraNetworksTab {
delete dirs_btn.dataset.selected;
}
if (_exists(tree_btn)) {
delete tree_btn.dataset.selected;
this.tree_list.onRowSelected(tree_btn.dataset.divId, tree_btn, false);
}
this.applyDirectoryFilter("");
}
@ -570,7 +570,7 @@ class ExtraNetworksTab {
// Filter is already applied from dirs btn. Just need to select the tree btn.
_reset();
dirs_btn.dataset.selected = "";
tree_btn.dataset.selected = "";
this.tree_list.onRowSelected(tree_btn.dataset.divId, tree_btn, true);
}
} else if (_exists(tree_btn)) {
const src_path = String.raw`${tree_btn.dataset.path.replaceAll("\\", "\\\\")}`;
@ -579,7 +579,7 @@ class ExtraNetworksTab {
// Filter is already applied from tree btn. Just need to select the dirs btn.
_reset();
dirs_btn.dataset.selected = "";
tree_btn.dataset.selected = "";
this.tree_list.onRowSelected(tree_btn.dataset.divId, tree_btn, true);
}
} else {
// No tree/dirs button is selected. Apply empty directory filter.
@ -589,8 +589,6 @@ class ExtraNetworksTab {
}
}
//
function popup(contents) {
if (!globalPopup) {
globalPopup = document.createElement('div');