1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

Шаблон Synio

Обновление блока с последней активностью после добавление комментария
This commit is contained in:
Denis Shakhov 2016-11-30 12:04:27 +07:00
parent a98c223aea
commit 98c39f5d56
3 changed files with 11 additions and 2 deletions

View file

@ -215,6 +215,8 @@
if ( $.isFunction( callback ) ) callback.call( this );
});
this._trigger('loaded');
},
/**

View file

@ -581,12 +581,19 @@ jQuery(document).ready(function($){
});
// Комментарии
var activityBlockRecent = $('.js-activity-block-recent');
$('.js-topic-comments, .js-topic-comments-list').lsComments({
urls: {
add: aRouter['blog'] + 'ajaxaddcomment/',
load: aRouter['blog'] + 'ajaxresponsecomment/'
},
show_form: ls.registry.get('comment_show_form')
show_form: ls.registry.get('comment_show_form'),
loaded: function () {
if (activityBlockRecent.length) {
$('.js-activity-block-recent').lsBlock('getElement', 'tabs').lsTabs('getActiveTab').lsTab('activate');
}
}
});
// Кнопка обновления комментариев

View file

@ -12,7 +12,7 @@
{component 'block'
mods = 'primary activity-recent'
classes = 'js-block-default'
classes = 'js-block-default js-activity-block-recent'
title = {lang 'activity.block_recent.title'}
titleUrl = {router 'stream'}
footer = $smarty.capture.block_footer