diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 12d9eeaf..b4804787 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -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% { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index ff65da75..8e70c971 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -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('
' + ao.innerHTML + '
'); } @@ -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);