diff options
author | Kristian Lyngstol <kly@kly.no> | 2019-01-07 01:15:15 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2019-01-07 01:15:15 +0100 |
commit | 435da6f11d41896c16ee7aedb0c41c33eb259e89 (patch) | |
tree | a8edc09b70db6736e5ede08740ebd62594603bfd /web/js | |
parent | 605c347a7a9919bf741d24d80c27faded3971b85 (diff) |
Tweak the oplog-hover-thing
The timeout makes things about 1000x more complicated, but adds a really nice
effect too.
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/nms-oplog.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/web/js/nms-oplog.js b/web/js/nms-oplog.js index b9bf55a..c49a980 100644 --- a/web/js/nms-oplog.js +++ b/web/js/nms-oplog.js @@ -220,17 +220,22 @@ class nmsOplogEntry extends nmsBox { setTimeout(function(e){e.clicked = false;},3000,this.nmsBox) } col2.html.onmouseover = function(e) { + this.nmsBox.over = true; + if (this.nmsBox.timer) { + clearTimeout(this.nmsBox.timer) + } this.nmsBox.searchbox.value = this.nmsBox.entry.systems; + this.nmsBox.searchbox.hoverSource = this.nmsBox; this.nmsBox.searchbox.oninput() } col2.html.onmouseleave = function(e) { + this.nmsBox.over = false; if (this.nmsBox.clicked) { return; } if (this.nmsBox.timer) { clearTimeout(this.nmsBox.timer) } this.nmsBox.timer = setTimeout(function(e){ - if (e.entry.systems == e.searchbox.value) { - console.log(e) + if (e.over == false && e.entry.systems == e.searchbox.value && e.searchbox.hoverSource == e) { e.searchbox.value = ""; e.searchbox.oninput() } |