aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-03-28 16:45:06 +0000
committerGareth Rees <gareth@mysociety.org>2014-03-28 16:45:06 +0000
commit37b801c7cb193f6fe69fd6b938873665a91b1ded (patch)
tree89a25986b60928718d5485cce0e7d1654dfbe059
parent489d081b4462c20ede89465237ef0cfbff68047e (diff)
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.
-rw-r--r--app/assets/javascripts/general.js8
1 files changed, 4 insertions, 4 deletions
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() {