diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-01-14 10:52:53 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-01-14 12:53:09 +0000 |
commit | c2bf5a90fc76eda220b35b510b7a200a43c858b1 (patch) | |
tree | bbe3b081cb062880049fce59e6b6a54c16830cf9 /public/javascripts/general.js | |
parent | 9e9c5e4bf090e98ef16d7a54c46f16e87ce3e4ae (diff) |
Cleanup popup notices.
Move HTML to view from controller, use same elements for other country
popup and everypage - partly so they don't display on top of each other
anymore. Don't position them over existing content, position them at the
top of the page. Use consistent styling, and keep the javascript
unobtrusive.
Diffstat (limited to 'public/javascripts/general.js')
-rw-r--r-- | public/javascripts/general.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/public/javascripts/general.js b/public/javascripts/general.js index 989907998..529bbeb04 100644 --- a/public/javascripts/general.js +++ b/public/javascripts/general.js @@ -7,7 +7,7 @@ $(document).ready(function() { dataType: 'html', success: function(country_message){ if (country_message != ''){ - $('#other-country-notice').html(country_message); + $('#other-country-notice .popup-content').html(country_message); $('body:not(.front) #other-country-notice').show() } } @@ -16,10 +16,17 @@ $(document).ready(function() { } } - $('#other-country-notice').click(function() { - $('#other-country-notice').hide(); + // popup messages + $('#other-country-notice .popup-close').click(function() { + $('#other-country-notice').hide('slow'); $.cookie('has_seen_country_message', 1, {expires: 365, path: '/'}); }); + $('#everypage .popup-close').click(function() { + $('#everypage').hide('slow'); + $.cookie('seen_foi2', 1, { expires: 7, path: '/' }); + return false; + }); + // "link to this" widget $('a.link_to_this').click(function() { var box = $('div#link_box'); |