From 88e019dcfac4c4188c94fc49cf9bef2f605a7004 Mon Sep 17 00:00:00 2001 From: Jacques Labuschagne Date: Thu, 21 Nov 2013 14:15:10 +1300 Subject: [PATCH] Added tooltip over user image. --- manifest.json | 2 +- wrms-kanban.css | 12 +++++++++++- wrms-kanban.js | 11 ++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index b548478..48168d4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "wrms-kanban", - "version": "0.6.8", + "version": "0.6.9", "update_url": "http://foo.wgtn.cat-it.co.nz/wrms-kanban.xml", "description": "Generates simple Kanban boards for WRMS ticket groups", "icons": { diff --git a/wrms-kanban.css b/wrms-kanban.css index 1d49eb5..3adc4ce 100644 --- a/wrms-kanban.css +++ b/wrms-kanban.css @@ -12,6 +12,15 @@ } } +.alloc_tooltip { + z-index: 2500; + padding: 5px; + background-color: #333; + opacity: 0.8; + color: #fff; + position: absolute; + height: 1em; +} #kanban-overlay { z-index: 1500; @@ -98,7 +107,8 @@ #kanban-overlay h1 { text-align: center; font-size: 2em; - color: #000; + color: #fff; + text-shadow: 1px 1px 5px #000; } #kanban-overlay > div.section > div { diff --git a/wrms-kanban.js b/wrms-kanban.js index ddba679..b834231 100644 --- a/wrms-kanban.js +++ b/wrms-kanban.js @@ -206,6 +206,9 @@ })); }); })); + $(overlay).append(mk('div', ['alloc_tooltip'], function(tip){ + $(tip).hide(); + })); $(overlay).hide(); })); $('#kanban-overlay ul').sortable({ @@ -369,7 +372,12 @@ .css('background-repeat', 'no-repeat') .css('background-size', 'contain'); $(s).hover( - function(){ + function(ev){ + $('div.alloc_tooltip') + .text(u) + .css('top', ev.pageY - 30) + .css('left', ev.pageX + 10) + .show(); $('span.alloc.bright').removeClass('bright'); $('li.dimmed').removeClass('dimmed'); $('#kanban-overlay li').each(function(){ @@ -384,6 +392,7 @@ }); }, function(){ + $('.alloc_tooltip').hide(); $('span.alloc.bright').removeClass('bright'); $('li.dimmed').removeClass('dimmed'); }