diff --git a/application/frontend/components/comment/comment.tpl b/application/frontend/components/comment/comment.tpl index 4e3580e0..2627540a 100644 --- a/application/frontend/components/comment/comment.tpl +++ b/application/frontend/components/comment/comment.tpl @@ -183,9 +183,8 @@ {* Сворачивание *} {component 'comment.actions-item' - classes="{$component}-fold js-comment-fold open" - attributes=[ 'data-id' => $commentId ] - link=[ ] + classes="{$component}-fold open" + link=[ classes => 'js-comment-fold', attributes => [ 'data-id' => $commentId ] ] text=$aLang.comments.folding.fold} {* Редактировать *} diff --git a/application/frontend/components/comment/js/comment.js b/application/frontend/components/comment/js/comment.js index 8a829e8a..1a3a82c9 100644 --- a/application/frontend/components/comment/js/comment.js +++ b/application/frontend/components/comment/js/comment.js @@ -88,7 +88,7 @@ // Сворчивание if ( this.options.folding ) { - if ( this.hasChildren() ) this.elements.fold.show(); + if ( this.hasChildren() ) this.elements.fold.parent().show(); this.elements.fold.on( 'click' + this.eventNamespace, this.foldToggle.bind( this ) ); } @@ -252,14 +252,14 @@ * Коллбэк вызываемый после сворачивания ветки комментариев */ onFold: function() { - this.elements.fold.find('a').text(this._i18n('unfold')); + this.elements.fold.text(this._i18n('unfold')); }, /** * Коллбэк вызываемый после разворачивания ветки комментариев */ onUnfold: function() { - this.elements.fold.find('a').text(this._i18n('fold')); + this.elements.fold.text(this._i18n('fold')); }, /**