Commit 084614de authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'star-button-fork-count-increase' into 'master'

Starring project only increases star count

This is instead of increasing star & fork count

Fixes #11396

![star-count](/uploads/9a1d569393bc051d1a019f0340eec957/star-count.gif)

cc. @jschatz1 

See merge request !2504
parents 340df52b 2821306a
...@@ -6,7 +6,7 @@ class @Star ...@@ -6,7 +6,7 @@ class @Star
$starIcon = $this.find('i') $starIcon = $this.find('i')
toggleStar = (isStarred) -> toggleStar = (isStarred) ->
$this.parent().find('span.count').text data.star_count $this.parent().find('.star-count').text data.star_count
if isStarred if isStarred
$starSpan.removeClass('starred').text 'Star' $starSpan.removeClass('starred').text 'Star'
$starIcon.removeClass('fa-star').addClass 'fa-star-o' $starIcon.removeClass('fa-star').addClass 'fa-star-o'
...@@ -19,4 +19,4 @@ class @Star ...@@ -19,4 +19,4 @@ class @Star
return return
).on 'ajax:error', (e, xhr, status, error) -> ).on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert') new Flash('Star toggle failed. Try again later.', 'alert')
return return
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment