From aded32148c00f121c7ad846787a7e37739dcf139 Mon Sep 17 00:00:00 2001 From: Tom Rees Date: Tue, 24 Jan 2012 14:59:02 +0000 Subject: [PATCH] [#1583][s]: Tweaking hover-for-help mechanism. --- ckan/lib/helpers.py | 2 +- ckan/public/css/style.css | 12 ++++++------ ckan/public/scripts/application.js | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py index 50b1ca92f3f..a0419b93b3c 100644 --- a/ckan/lib/helpers.py +++ b/ckan/lib/helpers.py @@ -343,7 +343,7 @@ def resource_star_rating(resource_dict): out = "" if stars==0: message = _('When we last checked, this resource was not available.'); - out = literal('404?' % message) + out = literal('404?' % message) else: for n in range(stars): out += icon('star') diff --git a/ckan/public/css/style.css b/ckan/public/css/style.css index 33c620396f9..a746d771d05 100644 --- a/ckan/public/css/style.css +++ b/ckan/public/css/style.css @@ -207,14 +207,14 @@ tbody tr.table-empty td { font-size: 2.2em; font-weight: normal; } -.mouseover-help-link { - border-bottom: 1px dashed #bb2222; +.hover-for-help { + border-bottom: 1px dashed #000; position: relative; } -.mouseover-help-link:hover { - border-bottom: 1px dashed #183661; +.hover-for-help.no-underline { + border-bottom: none; } -.mouseover-help-link .inner { +.hover-for-help > .inner { position: absolute; top: 18px; left: -30px; @@ -227,7 +227,7 @@ tbody tr.table-empty td { z-index: 3; color: #fff; } -.mouseover-help-link:hover .inner { +.hover-for-help:hover > .inner { display: block; } diff --git a/ckan/public/scripts/application.js b/ckan/public/scripts/application.js index 0480cf0ada4..23d2172a345 100644 --- a/ckan/public/scripts/application.js +++ b/ckan/public/scripts/application.js @@ -8,7 +8,7 @@ CKAN.Utils.setupFormatAutocomplete($(this)); }); CKAN.Utils.setupMarkdownEditor($('.markdown-editor')); - CKAN.Utils.setupMouseoverHelpLinks($('.mouseover-help-link')); + CKAN.Utils.setupHoverForHelp($('.hover-for-help')); // set up ckan js var config = { @@ -429,10 +429,9 @@ CKAN.Utils = function($, my) { }); }; - my.setupMouseoverHelpLinks = function(links) { + my.setupHoverForHelp = function(links) { $.each(links, function(n,link) { link = $(link); - link.click(function() { return false; }); var div = $('
'); div.html(link.attr('data')); div.addClass('inner');