Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugfix

  • Loading branch information...
commit 59f24915ec8d50051299e18ce80c968d37633c13 1 parent 2411783
@nibsirahsieu authored
View
4 modules/sfNestedComment/lib/BasesfNestedCommentActions.class.php
@@ -86,8 +86,8 @@ public function executeAddComment(sfWebRequest $request)
public function executeCommenting(sfWebRequest $request)
{
$this->forward404Unless($request->isXmlHttpRequest());
- $commentableObject = sfNestedCommentTools::getCommentableObject($request->getParameter('commentable_model'), $request->getParameter('commentable_id'));
+ $commentableObject = PropelQuery::from($request->getParameter('commentable_model'))->findPk($request->getParameter('commentable_id'));
$comments = sfNestedCommentTools::getComments($commentableObject, $request);
return $this->renderPartial('sfNestedComment/comment_list', array('comments' => $comments));
}
-}
+}
View
22 modules/sfNestedComment/templates/_showComments.php
@@ -23,6 +23,17 @@
<?php $model = get_class($object) ?>
<?php endif; ?>
<script type="text/javascript">
+ function collapsibleComments()
+ {
+ <?php if($enable_nested): ?>
+ jQuery('#commentlist').collapsible({
+ imagehide: '<?php echo image_path('/sfNestedCommentPlugin/images/arrow-down.png') ?>',
+ imageshow: '<?php echo image_path('/sfNestedCommentPlugin/images/arrow-right.png') ?>',
+ defaulthide: false
+ });
+ <?php endif; ?>
+ };
+
jQuery(document).ready(function() {
jQuery('a.comment-link').live('click', function(event) {
var comment_list = jQuery('#sfNestedComment_comment_list');
@@ -33,16 +44,11 @@
}, function(response){
comment_list.html(response);
comment_list.show();
+ collapsibleComments();
});
return false;
});
- <?php if($enable_nested): ?>
- jQuery('#commentlist').collapsible({
- imagehide: '<?php echo image_path('/sfNestedCommentPlugin/images/arrow-down.png') ?>',
- imageshow: '<?php echo image_path('/sfNestedCommentPlugin/images/arrow-right.png') ?>',
- defaulthide: false
- });
- <?php endif; ?>
+ collapsibleComments();
});
</script>
-<?php endif; ?>
+<?php endif; ?>
Please sign in to comment.
Something went wrong with that request. Please try again.