From ae65dff2d9d9b79d948ab9a4273859f8141abef4 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 13 Feb 2013 04:10:40 +0100 Subject: [PATCH] * ditch jQueryUI vanilla styles in favor of own ones. * disable tracking for tooltips and make them behave more like regular ones (this also stops my fan from spinning up when using the intel map) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improvements welcome. Tooltips are currently placed at the bottom of the element instead of next to cursor. It seems it’s either tracking or placing it not anywhere where one would expect a tooltip. I immediately regret having chosen jQueryUI. It’s not very flexible and has awkward defaults. --- code/boot.js | 7 ++++--- main.js | 3 +-- style.css | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/code/boot.js b/code/boot.js index a0c7a591..7b1956a9 100644 --- a/code/boot.js +++ b/code/boot.js @@ -191,11 +191,12 @@ window.setupSidebarToggle = function() { window.setupTooltips = function() { $(document).tooltip({ - // enable mouse tracking - track: true, // disable show/hide animation - show: false, + show: { effect: "hide", duration: 0 } , hide: false, + open: function(event, ui) { + ui.tooltip.delay(300).fadeIn(0); + }, content: function() { var title = $(this).attr('title'); diff --git a/main.js b/main.js index e0af1db1..b190399e 100644 --- a/main.js +++ b/main.js @@ -57,8 +57,7 @@ document.getElementsByTagName('head')[0].innerHTML = '' + 'Ingress Intel Map' + '' + '' - + '' - + ''; + + ''; document.getElementsByTagName('body')[0].innerHTML = '' + '
Loading, please wait
' diff --git a/style.css b/style.css index 15a033d3..f179dc6a 100644 --- a/style.css +++ b/style.css @@ -450,10 +450,6 @@ h3 { border: 1px solid #666; } -.mods span[title=""] { - cursor: auto; -} - .res .mods span, .res .meter { border: 1px solid #0076b6; } @@ -616,3 +612,17 @@ aside:nth-child(odd) span { #largepreview img { border: 2px solid #f8ff5e; } + +/* tooltips */ +.ui-tooltip { + background: #1E425D; + border: 1px solid #20A8B1; + box-shadow:0 0 7px #000; + color: #EEEEEE; + font-family: Verdana, sans-serif; + font-size:13px; + max-width: 300px; + padding: 8px; + position: absolute; + z-index: 9999; +}