summaryrefslogtreecommitdiff
path: root/web/views/tag.erb
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-19 10:08:55 +0200
committerJochen Topf <jochen@topf.org>2014-05-19 10:08:55 +0200
commite0887aca95abf7cda633573d66abea6cbc7ca73d (patch)
treefcba34033d7008d88e14f3d35e87d3680536e3bb /web/views/tag.erb
parent39dc0d1af37cf3bcf3d8789cc6d1828d95349292 (diff)
downloadtaginfo-e0887aca95abf7cda633573d66abea6cbc7ca73d.tar
taginfo-e0887aca95abf7cda633573d66abea6cbc7ca73d.tar.gz
Disable comparison function if cookies are disabled in the browser.
Diffstat (limited to 'web/views/tag.erb')
-rw-r--r--web/views/tag.erb12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/views/tag.erb b/web/views/tag.erb
index f80d5ce..391d193 100644
--- a/web/views/tag.erb
+++ b/web/views/tag.erb
@@ -121,10 +121,14 @@ function page_init2() {
up = function() { window.location = url_for_key(key); };
jQuery('h1').html(link_to_key(key) + '=' + fmt_value(value));
- comparison_list_update(key, value);
- jQuery('#list').bind('change', function() {
- comparison_list_change(key, value);
- });
+ if (cookies_enabled()) {
+ comparison_list_update(key, value);
+ jQuery('#list').bind('change', function() {
+ comparison_list_change(key, value);
+ });
+ } else {
+ jQuery('#list-form').html('<span class="empty" style="position: relative; top: 1px;">Enable cookies for comparison function!</span>');
+ }
jQuery('span#keylink').html(link_to_key(key));
jQuery('span#relationlink').html(link_to_rtype(value));