Skip to content

Commit

Permalink
this fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jun 20, 2013
1 parent 9e7e0f6 commit a7bce12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions public/src/forum/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,12 @@
uid = ids[1];

if (thread_state.locked !== '1') {
if (this.children[1].className == 'icon-star-empty') {
this.children[1].className = 'icon-star';
if (this.children[2].className == 'icon-star-empty') {
this.children[2].className = 'icon-star';
socket.emit('api:posts.favourite', {pid: pid, room_id: app.current_room});
}
else {
this.children[1].className = 'icon-star-empty';
this.children[2].className = 'icon-star-empty';
socket.emit('api:posts.unfavourite', {pid: pid, room_id: app.current_room});
}
}
Expand Down
4 changes: 3 additions & 1 deletion public/templates/topic.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
<button id="ids_{main_posts.pid}_{main_posts.uid}" class="btn delete {main_posts.display_moderator_tools}" type="button"><i class="icon-trash"></i></button>
<button id="quote_{main_posts.pid}_{main_posts.uid}" class="btn quote" type="button"><i class="icon-quote-left"></i></button>

<button id="favs_{main_posts.pid}_{main_posts.uid}" class="favourite btn" type="button"><span class="post_rep_{main_posts.pid}">Favourite {main_posts.post_rep} </span><i class="{main_posts.fav_star_class}"></i></button>
<button id="favs_{main_posts.pid}_{main_posts.uid}" class="favourite btn" type="button">
<span>Favourite</span>
<span class="post_rep_{main_posts.pid}">{main_posts.post_rep} </span><i class="{main_posts.fav_star_class}"></i></button>
<button id="post_reply" class="btn btn-primary btn post_reply hidden-phone" type="button">Reply <i class="icon-reply"></i></button>
</div>
<div style="clear:both; margin-bottom: 10px;"></div>
Expand Down

0 comments on commit a7bce12

Please sign in to comment.