diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/website/css/main.css | 4 | ||||
-rw-r--r-- | static/website/js/thread-user.js | 1 | ||||
-rw-r--r-- | static/website/templates/get-question.html | 19 | ||||
-rw-r--r-- | static/website/templates/questions.html | 17 |
4 files changed, 23 insertions, 18 deletions
diff --git a/static/website/css/main.css b/static/website/css/main.css index 774871e..8d011fb 100644 --- a/static/website/css/main.css +++ b/static/website/css/main.css @@ -456,6 +456,10 @@ table .question a{ text-align: center; } +.ans-vote { + text-align: center; +} + .vote-up-off, .vote-up-on, .vote-down-off, .vote-down-on, .star-on, .star-off, .comment-up-off, .comment-up-on, .comment-flag, .flag-off, .vote-accepted-off, .vote-accepted-on { text-indent: -9999em; diff --git a/static/website/js/thread-user.js b/static/website/js/thread-user.js index 0dd0e89..1a089d2 100644 --- a/static/website/js/thread-user.js +++ b/static/website/js/thread-user.js @@ -270,7 +270,6 @@ $(document).ready(function() { $add_comment = $(".add-comment"); $cancel_commment = $(".cancel-comment"); $post_comment = $(".post-comment"); - $add_comment.click(function(e) { $(this).hide(); $(this).siblings(".cancel-comment").show(); diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html index 67ac33a..ea6bfa3 100644 --- a/static/website/templates/get-question.html +++ b/static/website/templates/get-question.html @@ -109,11 +109,13 @@ <div id="commentNicPanel" style="display:none;"></div> </div> + {% for answer in answers %} + <div class="row"> <div class="answer-wrapper col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="answer {% if user|can_edit:answer %}editable{% endif %}" id="answer{{answer.id}}"> - + <div class="body" id="body{{ answer.id }}"> {{ answer.body|safe }} </div> @@ -268,15 +270,16 @@ }).panelInstance('id_body'); }); </script> - <!-- <script src="{% static 'website/js/thread-user.js' %}"></script> - <script src="{% static 'website/js/custom.js' %}"></script> --> + <script src="{% static 'website/js/thread-user.js' %}"></script> <script type="text/javascript"> $(document).ready(function() { + $.ajaxSetup({ data: {csrfmiddlewaretoken: '{{ csrf_token }}' }, }); + $('div.vote img.vote-up').click(function() { @@ -342,8 +345,12 @@ }); } }); - }); - - </script> + + + }); + + </script> + + <script src="{% static 'website/js/custom.js' %}"></script> {% endblock %} diff --git a/static/website/templates/questions.html b/static/website/templates/questions.html index 81c0d56..292437f 100644 --- a/static/website/templates/questions.html +++ b/static/website/templates/questions.html @@ -13,17 +13,7 @@ <th> Question <span class="glyphicon glyphicon-link"></span></th> <th> Date</th> <th> Views</th> - <div class="viewcount" id ="viewcount"> - {% if num_votes == 0 %} - vote - {% elif num_votes == 1 %} - vote - {% elif num_votes == -1 %} - vote - {% else %} - votes - {% endif %} - </div> + <th> Votes </th> <th> Answers</th> <th> User</th> {% for question in questions %} @@ -56,6 +46,11 @@ <td> {{ question.views}} </td> + <td> + + {{ question.num_votes}} + + </td> <td> {{ question.answer_set.count }} |