mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -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;
|
||||
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();
|
||||
|
||||
|
@ -820,10 +823,18 @@ var thegrid = (function () {
|
|||
this.setAttribute('class', tr.getAttribute('class'));
|
||||
}
|
||||
|
||||
function bgopen(e) {
|
||||
ev(e);
|
||||
var url = this.getAttribute('href');
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
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++) {
|
||||
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'));
|
||||
}
|
||||
var uns = QS('#ggrid a[ref="unsearch"]');
|
||||
|
|
Loading…
Reference in a new issue