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