mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
improve iphone fix
This commit is contained in:
parent
b4590c5398
commit
af0a34cf82
|
@ -2221,7 +2221,7 @@ var thegrid = (function () {
|
||||||
r.setdirty();
|
r.setdirty();
|
||||||
};
|
};
|
||||||
|
|
||||||
var links = QSA('#ghead>a');
|
var links = QSA('#ghead a');
|
||||||
for (var a = 0; a < links.length; a++)
|
for (var a = 0; a < links.length; a++)
|
||||||
links[a].onclick = btnclick;
|
links[a].onclick = btnclick;
|
||||||
|
|
||||||
|
|
|
@ -1890,10 +1890,6 @@ function up2k_init(subtle) {
|
||||||
if (o)
|
if (o)
|
||||||
o.addEventListener('click', tgl_fsearch, false);
|
o.addEventListener('click', tgl_fsearch, false);
|
||||||
|
|
||||||
var nodes = ebi('u2conf').getElementsByTagName('a');
|
|
||||||
for (var a = nodes.length - 1; a >= 0; a--)
|
|
||||||
nodes[a].addEventListener('touchend', nop, false);
|
|
||||||
|
|
||||||
ebi('u2etas').onclick = function () {
|
ebi('u2etas').onclick = function () {
|
||||||
clmod(ebi('u2etas'), 'o', 't');
|
clmod(ebi('u2etas'), 'o', 't');
|
||||||
};
|
};
|
||||||
|
|
|
@ -592,6 +592,8 @@ var tt = (function () {
|
||||||
r.skip = false;
|
r.skip = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (QS('body.bbox-open'))
|
||||||
|
return;
|
||||||
|
|
||||||
var cfg = sread('tooltips');
|
var cfg = sread('tooltips');
|
||||||
if (cfg !== null && cfg != '1')
|
if (cfg !== null && cfg != '1')
|
||||||
|
@ -612,18 +614,21 @@ var tt = (function () {
|
||||||
|
|
||||||
clmod(r.tt, 'b', big);
|
clmod(r.tt, 'b', big);
|
||||||
r.tt.style.maxWidth = '';
|
r.tt.style.maxWidth = '';
|
||||||
|
r.tt.style.left = '0';
|
||||||
|
r.tt.style.top = '0';
|
||||||
|
|
||||||
r.tt.innerHTML = msg.replace(/\$N/g, "<br />");
|
r.tt.innerHTML = msg.replace(/\$N/g, "<br />");
|
||||||
var tw = r.tt.offsetWidth,
|
var tw = r.tt.offsetWidth,
|
||||||
x = pos.left + (pos.right - pos.left) / 2 - tw / 2;
|
x = pos.left + (pos.right - pos.left) / 2 - tw / 2;
|
||||||
|
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
x = 0;
|
x = 8;
|
||||||
|
|
||||||
if (x + tw > window.innerWidth) {
|
if (x + tw > window.innerWidth) {
|
||||||
if (!x)
|
if (x <= 8)
|
||||||
r.tt.style.maxWidth = window.innerWidth + 'px';
|
r.tt.style.maxWidth = (window.innerWidth - 16) + 'px';
|
||||||
else
|
else
|
||||||
x = window.innerWidth - tw;
|
x = window.innerWidth - tw - 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
r.tt.style.left = x + 'px';
|
r.tt.style.left = x + 'px';
|
||||||
|
@ -646,10 +651,10 @@ var tt = (function () {
|
||||||
f2 = r.hide;
|
f2 = r.hide;
|
||||||
|
|
||||||
r.show = function () {
|
r.show = function () {
|
||||||
setTimeout(f1.bind(this), 301);
|
setTimeout(f1.bind(this), 101);
|
||||||
};
|
};
|
||||||
r.hide = function () {
|
r.hide = function () {
|
||||||
setTimeout(f2.bind(this), 301);
|
setTimeout(f2.bind(this), 101);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue