mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
spa gridview
This commit is contained in:
parent
b265e59834
commit
f982cdc178
|
@ -2680,14 +2680,12 @@ var thegrid = (function () {
|
|||
href = noq_href(this),
|
||||
aplay = ebi('a' + oth.getAttribute('id')),
|
||||
is_img = /\.(gif|jpe?g|png|webp|webm|mp4)(\?|$)/i.test(href),
|
||||
in_tree = null,
|
||||
is_dir = href.endsWith('/'),
|
||||
in_tree = is_dir && treectl.find(oth.textContent.slice(0, -1)),
|
||||
have_sel = QS('#files tr.sel'),
|
||||
td = oth.closest('td').nextSibling,
|
||||
tr = td.parentNode;
|
||||
|
||||
if (href.endsWith('/'))
|
||||
in_tree = treectl.find(oth.textContent.slice(0, -1));
|
||||
|
||||
if (r.sel && !dbl) {
|
||||
td.click();
|
||||
clmod(this, 'sel', clgot(tr, 'sel'));
|
||||
|
@ -2698,6 +2696,9 @@ var thegrid = (function () {
|
|||
else if (in_tree && !have_sel)
|
||||
in_tree.click();
|
||||
|
||||
else if (is_dir && !have_sel && treectl.spa)
|
||||
treectl.reqls(href, true, true);
|
||||
|
||||
else if (!is_img && have_sel)
|
||||
window.open(href, '_blank');
|
||||
|
||||
|
|
Loading…
Reference in a new issue