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