mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 22:07:48 +01:00
Fix smiling commits not setting proper classes
This commit is contained in:
parent
925193548f
commit
07033545ee
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ $(document).on "click", "button[name=ab-smile-comment]", ->
|
||||||
cid = btn[0].dataset.cId
|
cid = btn[0].dataset.cId
|
||||||
action = btn[0].dataset.action
|
action = btn[0].dataset.action
|
||||||
count = Number $("span#ab-comment-smile-count-#{cid}").html()
|
count = Number $("span#ab-comment-smile-count-#{cid}").html()
|
||||||
btn[0].dataset.loadingText = "<i class=\"fa fa-meh-o fa-spin\"></i> <span id=\"ab-smile-count-#{cid}\">#{count}</span>"
|
btn[0].dataset.loadingText = "<i class=\"fa fa-fw fa-meh-o fa-spin\"></i> <span id=\"ab-smile-count-#{cid}\">#{count}</span>"
|
||||||
btn.button "loading"
|
btn.button "loading"
|
||||||
|
|
||||||
target_url = switch action
|
target_url = switch action
|
||||||
|
@ -36,8 +36,8 @@ $(document).on "click", "button[name=ab-smile-comment]", ->
|
||||||
switch action
|
switch action
|
||||||
when 'smile'
|
when 'smile'
|
||||||
btn[0].dataset.action = 'unsmile'
|
btn[0].dataset.action = 'unsmile'
|
||||||
btn.html "<i class=\"fa fa-frown-o\"></i> <span id=\"ab-comment-smile-count-#{cid}\">#{count}</span>"
|
btn.html "<i class=\"fa fa-fw fa-frown-o\"></i> <span id=\"ab-comment-smile-count-#{cid}\">#{count}</span>"
|
||||||
when 'unsmile'
|
when 'unsmile'
|
||||||
btn[0].dataset.action = 'smile'
|
btn[0].dataset.action = 'smile'
|
||||||
btn.html "<i class=\"fa fa-smile-o\"></i> <span id=\"ab-comment-smile-count-#{cid}\">#{count}</span>"
|
btn.html "<i class=\"fa fa-fw fa-smile-o\"></i> <span id=\"ab-comment-smile-count-#{cid}\">#{count}</span>"
|
||||||
, 20
|
, 20
|
||||||
|
|
Loading…
Reference in a new issue