Skip to content

Commit

Permalink
fixed comment adding
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahY committed Oct 17, 2011
1 parent 833986b commit 81e4c1e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions qa-comment-layer.php
Expand Up @@ -150,7 +150,8 @@ function ajaxPostComment() {
cText.val(content);
}
else if(ajax_comment_position == 0) {
if(jQuery('.qa-q-view-c-list').length == 0) jQuery('<div class=\"qa-q-view-c-list\">'+data+'</div>').".(@$this->poll?"insertAfter('.qa-a-list')":"insertBefore('#ajax-comment-'+ajax_comment_position)").".find('div.qa-c-list-item:last').show('slow',function () {slideToDiv('.qa-q-view-c-list')});
alert(0);
if(jQuery('.qa-q-view-c-list').length == 0) jQuery('<div class=\"qa-q-view-c-list\">'+data+'</div>').insertBefore('#ajax-comment-'+ajax_comment_position).find('div.qa-c-list-item:last').show('slow',function () {slideToDiv('.qa-q-view-c-list')});
else jQuery('.qa-q-view-c-list').append(data).find('div.qa-c-list-item:last').show('slow',function () {slideToDiv('.qa-q-view-c-list')});
toggleComment(false);
}
Expand All @@ -159,7 +160,9 @@ function ajaxPostComment() {
document.getElementById('ajax-comment-'+ajax_comment_position).setAttribute('comments','true');
jQuery('<div class=\"qa-a-item-c-list\">'+data+'</div>').insertBefore('#ajax-comment-'+ajax_comment_position).find('div.qa-c-list-item:last').show('slow');
}
else jQuery('.qa-a-item-c-list').eq(ajax_comment_position-1).append(data).find('div.qa-c-list-item:last').show('slow');
else {
jQuery('.ajax-comment-idx-'+ajax_comment_position).append(data).find('div.qa-c-list-item:last').show('slow');
}
toggleComment(false);
}
cText.css('background',oldcss);
Expand Down Expand Up @@ -237,6 +240,12 @@ function a_item_buttons($a_item)
}
qa_html_theme_base::a_item_buttons($a_item);
}

function c_list($c_list, $class)
{
$class = 'ajax-comment-idx-'.$this->idx.' '.$class;
qa_html_theme_base::c_list($c_list, $class);
}

function c_item_buttons($c_item)
{
Expand Down

0 comments on commit 81e4c1e

Please sign in to comment.