fixed things
This commit is contained in:
parent
c0c279e6d8
commit
a30e6509b5
|
@ -3,7 +3,7 @@ $(document).on "click", "button[name=ab-comments]", ->
|
||||||
btn = $(this)
|
btn = $(this)
|
||||||
aid = btn[0].dataset.aId
|
aid = btn[0].dataset.aId
|
||||||
state = btn[0].dataset.state
|
state = btn[0].dataset.state
|
||||||
commentBox = $("#ab-comments-#{aid}")
|
commentBox = $("#ab-comments-section-#{aid}")
|
||||||
|
|
||||||
switch state
|
switch state
|
||||||
when 'hidden'
|
when 'hidden'
|
||||||
|
@ -35,7 +35,7 @@ $(document).on "keyup", "input[name=ab-comment-new]", (evt) ->
|
||||||
success: (data, status, jqxhr) ->
|
success: (data, status, jqxhr) ->
|
||||||
console.log data
|
console.log data
|
||||||
if data.success
|
if data.success
|
||||||
$(".panel-footer#ab-comments-#{aid}").html data.render
|
$("#ab-comments-#{aid}").html data.render
|
||||||
input.val ''
|
input.val ''
|
||||||
ctr.html 160
|
ctr.html 160
|
||||||
$("span#ab-comment-count-#{aid}").html data.count
|
$("span#ab-comment-count-#{aid}").html data.count
|
||||||
|
|
|
@ -45,6 +45,6 @@
|
||||||
.row
|
.row
|
||||||
.col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right
|
.col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right
|
||||||
= render 'shared/answerbox_buttons', a: a
|
= render 'shared/answerbox_buttons', a: a
|
||||||
.panel-footer{id: "ab-comments-#{a.id}", style: 'display: none'}
|
.panel-footer{id: "ab-comments-section-#{a.id}", style: 'display: none'}
|
||||||
= render 'shared/smiles', a: a
|
%div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a
|
||||||
= render 'shared/comments', a: a
|
%div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a
|
||||||
|
|
Loading…
Reference in New Issue