diff options
Diffstat (limited to 'hyperkitty/templates/thread.html')
-rw-r--r-- | hyperkitty/templates/thread.html | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/hyperkitty/templates/thread.html b/hyperkitty/templates/thread.html index 9e1333f..e2a0524 100644 --- a/hyperkitty/templates/thread.html +++ b/hyperkitty/templates/thread.html @@ -51,80 +51,4 @@ }); </script> -<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 %} - - }); - - $("#add_tag_form").submit( function () { - - {% if user.is_authenticated %} - $.ajax({ - type: "POST", - data : $(this).serialize(), - url: "{% url add_tag mlist_fqdn=list_address, email_id=threadid %}", - success: function(data){ - console.log('Tag is added successfully'); - location.reload(); - } - }); - return false; - {% else %} - alert('You need to login in order to add tag'); - {% endif %} - }); - - $("ul.email_info li.attachments ul.attachments-list").hide(); - $("ul.email_info li.attachments > a").click(function() { - $(this).next("ul").fadeToggle('fast'); - }); - - }); -</script> {% endblock %} |