diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-08 12:41:15 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-08 12:41:15 -0400 |
commit | ca2c6aa73f31ba1adb5dd62a416807773fb369f3 (patch) | |
tree | 1db2f31cef4f4eed19f09ad14e6312b47ddc88f0 | |
parent | d8c9ababadf91da68cbe4a1be72ca8b992852464 (diff) | |
download | askbot-ca2c6aa73f31ba1adb5dd62a416807773fb369f3.tar.gz askbot-ca2c6aa73f31ba1adb5dd62a416807773fb369f3.tar.bz2 askbot-ca2c6aa73f31ba1adb5dd62a416807773fb369f3.zip |
fixed voting bug in js on the question page
-rw-r--r-- | askbot/skins/default/templates/question/javascript.html | 7 | ||||
-rw-r--r-- | askbot/skins/default/templates/question/sidebar.html | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/askbot/skins/default/templates/question/javascript.html b/askbot/skins/default/templates/question/javascript.html index 73e209bb..af0b0829 100644 --- a/askbot/skins/default/templates/question/javascript.html +++ b/askbot/skins/default/templates/question/javascript.html @@ -30,12 +30,7 @@ <script type="text/javascript"> // define reputation needs for comments var repNeededForComments = 50; - $().ready(function(){ - {% if request.user.is_authenticated() %} - if ($('#question-subscribe-updates')[0].checked){ - $('#question-subscribe-sidebar').attr({'checked': 'checked'}); - } - {%endif%} + $(document).ready(function(){ $("#nav_questions").attr('className',"on"); var answer_sort_tab = "{{ tab_id }}"; $("#" + answer_sort_tab).attr('className',"on"); diff --git a/askbot/skins/default/templates/question/sidebar.html b/askbot/skins/default/templates/question/sidebar.html index 2450a384..08a75245 100644 --- a/askbot/skins/default/templates/question/sidebar.html +++ b/askbot/skins/default/templates/question/sidebar.html @@ -27,7 +27,13 @@ </div> <div class="notify-sidebar"> {%if request.user.is_authenticated() %} - <input type="checkbox" id="question-subscribe-sidebar"/> + <input + type="checkbox" + id="question-subscribe-sidebar" + {% if thread.is_followed_by(request.user) %} + checked="checked" + {% endif %} + /> <label for="question-subscribe-sidebar">{% trans %}email the updates{% endtrans %}</label> {%else%} <input type="checkbox" id="question-subscribe-sidebar"/> |