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

fix response comments with pagination

This commit is contained in:
Chiffa 2017-03-23 16:56:09 +05:00
parent b20d65354d
commit 2f80c2ad63
4 changed files with 7 additions and 2 deletions

View file

@ -77,6 +77,7 @@ class HookMain extends Hook
'recaptcha.site_key' => Config::Get('module.validate.recaptcha.site_key'), 'recaptcha.site_key' => Config::Get('module.validate.recaptcha.site_key'),
'comment_max_tree' => Config::Get('module.comment.max_tree'), 'comment_max_tree' => Config::Get('module.comment.max_tree'),
'comment_show_form' => Config::Get('module.comment.show_form'), 'comment_show_form' => Config::Get('module.comment.show_form'),
'comment_use_paging' => Config::Get('module.comment.use_nested'),
'topic_max_blog_count' => Config::Get('module.topic.max_blog_count'), 'topic_max_blog_count' => Config::Get('module.topic.max_blog_count'),
'block_stream_show_tip' => Config::Get('block.stream.show_tip'), 'block_stream_show_tip' => Config::Get('block.stream.show_tip'),
'poll_max_answers' => Config::Get('module.poll.max_answers'), 'poll_max_answers' => Config::Get('module.poll.max_answers'),

View file

@ -57,6 +57,8 @@
folding: true, folding: true,
// Показать/скрыть форму по умолчанию // Показать/скрыть форму по умолчанию
show_form: false, show_form: false,
// Включена или нет пагинация
use_paging: false,
// Ajax параметры // Ajax параметры
params: {}, params: {},
i18n: { i18n: {
@ -171,7 +173,7 @@
target_type: this._targetType, target_type: this._targetType,
last_comment_id: this.getLastCommentId(), last_comment_id: this.getLastCommentId(),
self_comment_id: commentSelfId || undefined, self_comment_id: commentSelfId || undefined,
use_paging: false use_paging: this.option( 'use_paging' )
}; };
this._load( 'load', params, function( response ) { this._load( 'load', params, function( response ) {

View file

@ -596,7 +596,8 @@ jQuery(document).ready(function($){
add: aRouter['blog'] + 'ajaxaddcomment/', add: aRouter['blog'] + 'ajaxaddcomment/',
load: aRouter['blog'] + 'ajaxresponsecomment/' load: aRouter['blog'] + 'ajaxresponsecomment/'
}, },
show_form: ls.registry.get('comment_show_form') show_form: ls.registry.get('comment_show_form'),
use_paging: ls.registry.get('comment_use_paging')
}); });
// Кнопка обновления комментариев // Кнопка обновления комментариев

View file

@ -589,6 +589,7 @@ jQuery(document).ready(function($){
load: aRouter['blog'] + 'ajaxresponsecomment/' load: aRouter['blog'] + 'ajaxresponsecomment/'
}, },
show_form: ls.registry.get('comment_show_form'), show_form: ls.registry.get('comment_show_form'),
use_paging: ls.registry.get('comment_use_paging'),
loaded: function () { loaded: function () {
if (activityBlockRecent.length) { if (activityBlockRecent.length) {
activityBlockRecent.lsBlock('getElement', 'tabs').lsTabs('getActiveTab').lsTab('activate'); activityBlockRecent.lsBlock('getElement', 'tabs').lsTabs('getActiveTab').lsTab('activate');