From 37b801c7cb193f6fe69fd6b938873665a91b1ded Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 28 Mar 2014 16:45:06 +0000 Subject: Improve positioning of link-to-this popup Current positioning forces it to overlap the sidebar, which: - Looks messy due to the opacity - Covers potentially useful information - Puts the close icon further away if the box was opened in error This commit positions it to the left of the link-to-this anchor icon, which seems to conveniently fit in to the whitespace left by the signing off of the correspondence. --- app/assets/javascripts/general.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/assets/javascripts/general.js') diff --git a/app/assets/javascripts/general.js b/app/assets/javascripts/general.js index 529bbeb04..002eef760 100644 --- a/app/assets/javascripts/general.js +++ b/app/assets/javascripts/general.js @@ -27,8 +27,8 @@ $(document).ready(function() { return false; }); - // "link to this" widget - $('a.link_to_this').click(function() { + // "link to this" widget + $('a.link_to_this').click(function() { var box = $('div#link_box'); var location = window.location.protocol + "//" + window.location.hostname + $(this).attr('href'); box.width(location.length + " em"); @@ -36,12 +36,12 @@ $(document).ready(function() { box.show(); box.find('input').select(); box.position({ - my: "left top", + my: "right center", at: "left bottom", of: this, collision: "fit" }); return false; - }); + }); $('.close-button').click(function() { $(this).parent().hide() }); $('div#variety-filter a').each(function() { -- cgit v1.2.3