mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
gallery links in new tab if a selection is atcive
This commit is contained in:
parent
485cb4495c
commit
b63ab15bf9
|
@ -803,7 +803,10 @@ var thegrid = (function () {
|
||||||
r.sz = v;
|
r.sz = v;
|
||||||
swrite('gridsz', r.sz);
|
swrite('gridsz', r.sz);
|
||||||
}
|
}
|
||||||
document.documentElement.style.setProperty('--grid-sz', r.sz + 'em');
|
try {
|
||||||
|
document.documentElement.style.setProperty('--grid-sz', r.sz + 'em');
|
||||||
|
}
|
||||||
|
catch (ex) { }
|
||||||
}
|
}
|
||||||
setsz();
|
setsz();
|
||||||
|
|
||||||
|
@ -820,10 +823,18 @@ var thegrid = (function () {
|
||||||
this.setAttribute('class', tr.getAttribute('class'));
|
this.setAttribute('class', tr.getAttribute('class'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bgopen(e) {
|
||||||
|
ev(e);
|
||||||
|
var url = this.getAttribute('href');
|
||||||
|
window.open(url, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
r.loadsel = function () {
|
r.loadsel = function () {
|
||||||
var ths = QSA('#ggrid>a');
|
var ths = QSA('#ggrid>a'),
|
||||||
|
have_sel = !!QS('#files tr.sel');
|
||||||
|
|
||||||
for (var a = 0, aa = ths.length; a < aa; a++) {
|
for (var a = 0, aa = ths.length; a < aa; a++) {
|
||||||
ths[a].onclick = r.sel ? seltgl : null;
|
ths[a].onclick = r.sel ? seltgl : have_sel ? bgopen : null;
|
||||||
ths[a].setAttribute('class', ebi(ths[a].getAttribute('ref')).parentNode.parentNode.getAttribute('class'));
|
ths[a].setAttribute('class', ebi(ths[a].getAttribute('ref')).parentNode.parentNode.getAttribute('class'));
|
||||||
}
|
}
|
||||||
var uns = QS('#ggrid a[ref="unsearch"]');
|
var uns = QS('#ggrid a[ref="unsearch"]');
|
||||||
|
|
Loading…
Reference in a new issue