javascripts: "fix" (un)smile update bug
This commit is contained in:
parent
3a726b83c3
commit
b926820d90
|
@ -31,6 +31,7 @@ $(document).on "click", "button[name=ab-smile-comment]", ->
|
||||||
showNotification translate('frontend.error.message'), false
|
showNotification translate('frontend.error.message'), false
|
||||||
complete: (jqxhr, status) ->
|
complete: (jqxhr, status) ->
|
||||||
btn.button "reset"
|
btn.button "reset"
|
||||||
|
window.setTimeout ->
|
||||||
if success
|
if success
|
||||||
switch action
|
switch action
|
||||||
when 'smile'
|
when 'smile'
|
||||||
|
@ -39,3 +40,4 @@ $(document).on "click", "button[name=ab-smile-comment]", ->
|
||||||
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-smile-o\"></i> <span id=\"ab-comment-smile-count-#{cid}\">#{count}</span>"
|
||||||
|
, 20
|
||||||
|
|
|
@ -31,6 +31,7 @@ $(document).on "click", "button[name=ab-smile]", ->
|
||||||
showNotification translate('frontend.error.message'), false
|
showNotification translate('frontend.error.message'), false
|
||||||
complete: (jqxhr, status) ->
|
complete: (jqxhr, status) ->
|
||||||
btn.button "reset"
|
btn.button "reset"
|
||||||
|
window.setTimeout ->
|
||||||
if success
|
if success
|
||||||
switch action
|
switch action
|
||||||
when 'smile'
|
when 'smile'
|
||||||
|
@ -39,3 +40,4 @@ $(document).on "click", "button[name=ab-smile]", ->
|
||||||
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-smile-count-#{aid}\">#{count}</span>"
|
btn.html "<i class=\"fa fa-smile-o\"></i> <span id=\"ab-smile-count-#{aid}\">#{count}</span>"
|
||||||
|
, 20
|
||||||
|
|
Loading…
Reference in New Issue