diff options
Diffstat (limited to 'hyperkitty/templates/message.html')
-rw-r--r-- | hyperkitty/templates/message.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/hyperkitty/templates/message.html b/hyperkitty/templates/message.html index 5ae2fb1..25983ec 100644 --- a/hyperkitty/templates/message.html +++ b/hyperkitty/templates/message.html @@ -17,60 +17,3 @@ </section> {% endblock %} - -{% block additionaljs %} -<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'); - {% if user.is_authenticated %} - $.ajax({ - type : "POST", - url : "{% url message_vote mlist_fqdn=list_address %}", - data : { - vote : 1, - messageid : message_id, - list : "{{list_address}}", - csrfmiddlewaretoken : '{{ csrf_token }}' - }, - success : function(response) { - console.log(response); - location.reload(); - } - }); - return false; - {% else %} - alert('You need to login in order to vote'); - {% endif %} - }); - - $(".votedown").click(function() { - message_id = this.parentElement.getAttribute('messageid'); - {% if user.is_authenticated %} - $.ajax({ - type : "POST", - url : '{% url message_vote mlist_fqdn=list_address %}', - data : { - vote : -1, - messageid : message_id, - list : "{{list_address}}", - csrfmiddlewaretoken : '{{ csrf_token }}' - }, - success : function(response) { - console.log(response); - // @TODO : Remove this reload and update count using AJAX - location.reload(); - } - }); - return false; - {% else %} - alert('You need to login in order to vote'); - {% endif %} - - }); - - }); -</script> - -{% endblock %} |