multiselect boxes

This commit is contained in:
Til Schmitter 2026-04-29 23:45:39 +02:00
parent 82051e8e7f
commit 6fb1d06526
2 changed files with 32 additions and 2 deletions

View file

@ -963,6 +963,21 @@ html.dz #flogout {
margin: -3px -2px;
padding: 4px 3px;
}
.sel .gselchk,
.imgcontainer:hover .gselchk {
display: block;
}
.gselchk {
position: absolute;
display: none;
top: .3em;
right: .3em;
z-index: 2;
font-size: 1.15em;
width: 1em;
height: 1em;
opacity: .69;
}
@keyframes rotate {
100% {

View file

@ -6117,6 +6117,16 @@ var thegrid = (function () {
return gclick.call(this, e, false);
}
function gselclick(e) {
var oth = ebi(this.closest('a').getAttribute('ref')),
td = oth.closest('td').nextSibling,
tr = td.parentNode;
td.onclick.call(td, e);
clmod(this, 'sel', clgot(tr, 'sel'));
this.checked = clgot(tr, 'sel');
}
function gclick2(e) {
if (ctrl(e) || !r.sel)
return true;
@ -6337,7 +6347,7 @@ var thegrid = (function () {
ihref += "&raster";
html.push('<a href="' + ohref + '" ref="' + ref +
'"' + ac + ' ttt="' + esc(name) + '"><div class="imgcontainer"><img style="height:' +
'"' + ac + ' ttt="' + esc(name) + '"><div class="imgcontainer"><input type="checkbox" class="gselchk"></input><img style="height:' +
(r.sz / 1.25) + 'em" loading="lazy" onload="th_onload(this)" src="' +
ihref + '" /></div><span' + ac + '>' + ao.innerHTML + '</span></a>');
}
@ -6358,6 +6368,11 @@ var thegrid = (function () {
ths[a].onclick = gclick1;
}
var chks = QSA('.gselchk');
for (var a = 0, aa = chks.length; a < aa; a++) {
chks[a].onclick = gselclick;
}
r.dirty = false;
r.bagit('#ggrid');
r.loadsel();
@ -9403,7 +9418,7 @@ var msel = (function () {
delete r.hist[get_evpath()];
};
r.seltgl = function (e) {
ev(e);
e.stopPropagation();
var tr = this.parentNode,
id = tr2id(tr);