##// END OF EJS Templates
Do not update global fav button instead of thread's one
neko259 -
r1756:fa9529ca default
parent child Browse files
Show More
@@ -154,7 +154,7 b' function getThreadDiff() {'
154 $('.metapanel').attr('data-last-update', data.last_update);
154 $('.metapanel').attr('data-last-update', data.last_update);
155
155
156 if (data.subscribed == 'True') {
156 if (data.subscribed == 'True') {
157 var favButton = $('.not_fav');
157 var favButton = $('#thread-fav-button .not_fav');
158
158
159 if (favButton.length > 0) {
159 if (favButton.length > 0) {
160 favButton.attr('value', 'unsubscribe');
160 favButton.attr('value', 'unsubscribe');
@@ -16,9 +16,9 b''
16 <form action="{% url 'thread' opening_post.id %}" method="post" class="post-button-form">
16 <form action="{% url 'thread' opening_post.id %}" method="post" class="post-button-form">
17 {% csrf_token %}
17 {% csrf_token %}
18 {% if is_favorite %}
18 {% if is_favorite %}
19 <button name="method" value="unsubscribe" class="fav"></button>
19 <button id="thread-fav-button" name="method" value="unsubscribe" class="fav"></button>
20 {% else %}
20 {% else %}
21 <button name="method" value="subscribe" class="not_fav"></button>
21 <button id="thread-fav-button" name="method" value="subscribe" class="not_fav"></button>
22 {% endif %}
22 {% endif %}
23 </form>
23 </form>
24 {{ opening_post.get_title_or_text }}
24 {{ opening_post.get_title_or_text }}
General Comments 0
You need to be logged in to leave comments. Login now