aboutsummaryrefslogtreecommitdiffstats
path: root/public/javascripts/general.js
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-09-08 00:56:59 +0100
committerRobin Houston <robin@lenny.robin>2011-09-08 00:56:59 +0100
commit6e0e5e5bed89ff2093e1cca3fa50310f678565fd (patch)
treeae9a198a8134e90ab2a140d699ed6f3248f467cc /public/javascripts/general.js
parente286a5a91e449ef01b5ce5f23654d1316bffaf53 (diff)
parenta9002cc8e749df6f5961acab8e3e61fd21987fc1 (diff)
Merge branch 'develop' of git@github.com:sebbacon/alaveteli into develop
Conflicts: app/models/request_mailer.rb
Diffstat (limited to 'public/javascripts/general.js')
-rw-r--r--public/javascripts/general.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/public/javascripts/general.js b/public/javascripts/general.js
new file mode 100644
index 000000000..ed5095f82
--- /dev/null
+++ b/public/javascripts/general.js
@@ -0,0 +1,22 @@
+$(document).ready(function() {
+ if(window.location.search.substring(1).search("country_name") == -1) {
+ if (!$.cookie('has_seen_country_message')) {
+ $.ajax({
+ url: "/country_message",
+ dataType: 'html',
+ success: function(country_message){
+ if (country_message != ''){
+ $('#other-country-notice').html(country_message);
+ $('body:not(.front) #other-country-notice').show()
+ }
+ }
+ })
+
+ }
+ }
+
+ $('#other-country-notice').click(function() {
+ $('#other-country-notice').hide();
+ $.cookie('has_seen_country_message', 1, {expires: 365, path: '/'});
+ })
+}) \ No newline at end of file