diff options
| author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-06-25 16:17:10 -0400 |
|---|---|---|
| committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-06-25 16:17:10 -0400 |
| commit | d830b1ab3d95f8598de98b2a97cfed7ed19c4175 (patch) | |
| tree | b110afb4bacc67cdbdb1cab6cbdc1512f20f99b9 /templates/message.html | |
| parent | ea19e904c28e45cbfb8084c4a3ede4dfb55606e1 (diff) | |
| download | hyperkitty-d830b1ab3d95f8598de98b2a97cfed7ed19c4175.tar.gz hyperkitty-d830b1ab3d95f8598de98b2a97cfed7ed19c4175.tar.xz hyperkitty-d830b1ab3d95f8598de98b2a97cfed7ed19c4175.zip | |
Code Formatting
Diffstat (limited to 'templates/message.html')
| -rw-r--r-- | templates/message.html | 77 |
1 files changed, 43 insertions, 34 deletions
diff --git a/templates/message.html b/templates/message.html index 70aa67e..58187c0 100644 --- a/templates/message.html +++ b/templates/message.html @@ -2,49 +2,58 @@ {% load gravatar %} {% block additional_stylesheets %} - <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/thread.css" /> +<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/thread.css" /> {% endblock %} {% block content %} - <section id="thread_content"> +<section id="thread_content"> {% include 'messages/first_email.html' with first_mail=message %} - </section> +</section> {% endblock %} {% block additionaljs %} - <script type="text/javascript"> - +<script type="text/javascript"> $(document).ready(function() { - $(".voteup").click(function(){ - // @TODO: Extract the message id from the HTML DOM element instead of hard coding it in Javascript. - message_id = this.parentElement.getAttribute('messageid'); - $.ajax({ - type: "POST", - url: '/vote/{{list_address}}/', - data: { vote : 1, messageid : message_id, list: "{{list_address}}", csrfmiddlewaretoken: '{{ csrf_token }}' }, - success: function(response){ - alert(response); - } - }); - return false; - }); - - $(".votedown").click(function(){ - message_id = this.parentElement.getAttribute('messageid'); - $.ajax({ - type: "POST", - url: '/vote/{{list_address}}/', - data: { vote : -1, messageid : message_id , list: "{{list_address}}", csrfmiddlewaretoken: '{{ csrf_token }}' }, - success: function(response){ - alert(response); - } - }); - return false; - }); - - }); - </script> + $(".voteup").click(function() { + // @TODO: Extract the message id from the HTML DOM element instead of hard coding it in Javascript. + message_id = this.parentElement.getAttribute('messageid'); + $.ajax({ + type : "POST", + url : '/vote/{{list_address}}/', + data : { + vote : 1, + messageid : message_id, + list : "{{list_address}}", + csrfmiddlewaretoken : '{{ csrf_token }}' + }, + success : function(response) { + alert(response); + } + }); + return false; + }); + + $(".votedown").click(function() { + message_id = this.parentElement.getAttribute('messageid'); + $.ajax({ + type : "POST", + url : '/vote/{{list_address}}/', + data : { + vote : -1, + messageid : message_id, + list : "{{list_address}}", + csrfmiddlewaretoken : '{{ csrf_token }}' + }, + success : function(response) { + alert(response); + } + }); + return false; + }); + + }); +</script> {% endblock %} |
