mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
try to workaround iphones not hiding tooltips
This commit is contained in:
parent
3ca41be2b4
commit
600e9ac947
|
@ -39,7 +39,7 @@
|
|||
<div id="op_mkdir" class="opview opbox act">
|
||||
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
|
||||
<input type="hidden" name="act" value="mkdir" />
|
||||
<input type="text" name="name" size="30">
|
||||
📂<input type="text" name="name" size="30">
|
||||
<input type="submit" value="make directory">
|
||||
</form>
|
||||
</div>
|
||||
|
@ -47,14 +47,14 @@
|
|||
<div id="op_new_md" class="opview opbox">
|
||||
<form method="post" enctype="multipart/form-data" accept-charset="utf-8" action="{{ url_suf }}">
|
||||
<input type="hidden" name="act" value="new_md" />
|
||||
<input type="text" name="name" size="30">
|
||||
<input type="submit" value="new markdown document">
|
||||
📝<input type="text" name="name" size="30">
|
||||
<input type="submit" value="new markdown doc">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="op_msg" class="opview opbox act">
|
||||
<form method="post" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" action="{{ url_suf }}">
|
||||
<input type="text" name="msg" size="30">
|
||||
📟<input type="text" name="msg" size="30">
|
||||
<input type="submit" value="send msg to server log">
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -502,7 +502,8 @@ function hist_replace(url) {
|
|||
var tt = (function () {
|
||||
var r = {
|
||||
"tt": mknod("div"),
|
||||
"en": true
|
||||
"en": true,
|
||||
"el": null
|
||||
};
|
||||
|
||||
r.tt.setAttribute('id', 'tt');
|
||||
|
@ -517,6 +518,7 @@ var tt = (function () {
|
|||
if (!msg)
|
||||
return;
|
||||
|
||||
r.el = this;
|
||||
var pos = this.getBoundingClientRect(),
|
||||
dir = this.getAttribute('ttd') || '',
|
||||
left = pos.left < window.innerWidth / 2,
|
||||
|
@ -535,13 +537,18 @@ var tt = (function () {
|
|||
r.tt.style.right = left ? 'auto' : (window.innerWidth - pos.right) + 'px';
|
||||
|
||||
r.tt.innerHTML = msg.replace(/\$N/g, "<br />");
|
||||
r.el.addEventListener('mouseleave', r.hide);
|
||||
clmod(r.tt, 'show', 1);
|
||||
};
|
||||
|
||||
r.hide = function () {
|
||||
clmod(r.tt, 'show');
|
||||
if (r.el)
|
||||
r.el.removeEventListener('mouseleave', r.hide);
|
||||
};
|
||||
|
||||
r.tt.onclick = r.hide;
|
||||
|
||||
r.att = function (ctr) {
|
||||
var _show = r.en ? r.show : null,
|
||||
_hide = r.en ? r.hide : null,
|
||||
|
|
Loading…
Reference in a new issue