From fa04cb6fb6da7861c6d23991a5c2636e5b2a641f Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Wed, 6 Feb 2013 21:29:42 +0100 Subject: Refactoring of HTML tags and CSS classes --- hyperkitty/static/js/hyperkitty.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'hyperkitty/static/js') diff --git a/hyperkitty/static/js/hyperkitty.js b/hyperkitty/static/js/hyperkitty.js index 7464314..36812cf 100644 --- a/hyperkitty/static/js/hyperkitty.js +++ b/hyperkitty/static/js/hyperkitty.js @@ -61,8 +61,8 @@ function vote(elem, value) { function setup_vote() { - $(".voteup").click(function(e) { e.preventDefault(); vote(this, 1); }); - $(".votedown").click(function(e) { e.preventDefault(); vote(this, -1); }); + $("a.youlike").click(function(e) { e.preventDefault(); vote(this, 1); }); + $("a.youdislike").click(function(e) { e.preventDefault(); vote(this, -1); }); } @@ -163,7 +163,7 @@ function setup_replies() { }); $('
' + response + '
') - .appendTo(form.parents('.email_info').first()) + .appendTo(form.parents('.email-info').first()) .delay(2000).fadeOut('slow', function() { $(this).remove(); }); }, error: function(jqXHR, textStatus, errorThrown) { @@ -246,15 +246,18 @@ function activity_graph(dates, data, baseurl) { */ function setup_attachments() { - $("ul.email_info li.attachments ul.attachments-list").hide(); - $("ul.email_info li.attachments > a").click(function() { - $(this).next("ul").fadeToggle('fast'); + $(".email-info .attachments a.attachments").each(function() { + var att_list = $(this).next("ul.attachments-list"); + var pos = $(this).position(); + att_list.css("left", pos.left); + $(this).click(function() { + att_list.slideToggle('fast'); + }); }); } function setup_quotes() { - $('div.email_body .quoted-switch a') - .add('div.first_email_body .quoted-switch a') + $('div.email-body .quoted-switch a') .click(function() { $(this).parent().next(".quoted-text").slideToggle('fast'); return false; -- cgit