fix gridview selection/baguettebox order

This commit is contained in:
ed 2021-06-25 21:35:45 +02:00
parent c6b3f035e5
commit c6a103609e
2 changed files with 12 additions and 7 deletions

View file

@ -1532,7 +1532,9 @@ var thegrid = (function () {
return true;
var oth = ebi(this.getAttribute('ref')),
href = this.getAttribute('href'),
aplay = ebi('a' + oth.getAttribute('id')),
is_img = /\.(gif|jpe?g|png|webp)(\?|$)/i.test(href),
td = oth.closest('td').nextSibling,
tr = td.parentNode;
@ -1543,11 +1545,11 @@ var thegrid = (function () {
else if (widget.is_open && aplay)
aplay.click();
else if (QS('#files tr.sel'))
window.open(this.getAttribute('href'), '_blank');
else if (!is_img && QS('#files tr.sel'))
window.open(href, '_blank');
else return true;
return ev(e);
ev(e);
}
r.loadsel = function () {

View file

@ -67,6 +67,9 @@ function ev(e) {
if (e.stopPropagation)
e.stopPropagation();
if (e.stopImmediatePropagation)
e.stopImmediatePropagation();
e.returnValue = false;
return e;
}
@ -360,11 +363,11 @@ function get_vpath() {
function get_pwd() {
var pwd = ('; ' + document.cookie).split('; cppwd=');
if (pwd.length < 2)
return null;
var pwd = ('; ' + document.cookie).split('; cppwd=');
if (pwd.length < 2)
return null;
return pwd[1].split(';')[0];
return pwd[1].split(';')[0];
}