From 0e1c515e7c6fa310792318b18cf81d0ca05a307a Mon Sep 17 00:00:00 2001 From: Repellent Date: Thu, 8 Jan 2026 12:13:51 +0500 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D0=BC=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D1=83=D0=BB=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/comment.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/comment.js b/js/comment.js index adf239b..d3d452c 100644 --- a/js/comment.js +++ b/js/comment.js @@ -267,7 +267,8 @@ if (action === 'unlock' || action === 'lock') { }) // Счетчик: Количество оставшихся символов 1000 для формы создания комментария - $('#in_message').limit(1000, '#charsLeft_new'); + // Используем переменную MAX_CHARS, которая приходит из настроек модуля +$('#in_message').limit(MAX_CHARS, '#charsLeft_new'); $doc.on('change', '#comment_image', function() { var input = this; @@ -371,7 +372,7 @@ $doc.on('mouseleave', '.rating-edit-block, #rating_wrapper', function() { $('#user_rating_stars .star-choice').removeClass('bi-star-fill').addClass('bi-star'); $('#rating_wrapper').show(); // Показываем блок рейтинга обратно $('#image_preview_wrapper').addClass('d-none'); - $('#charsLeft_new').text(1000); + $('#charsLeft_new').text(MAX_CHARS); $('.form-control').removeClass('is-invalid'); $('.invalid-feedback').remove(); $('#parent_id').val(''); // Очищаем ID родителя, чтобы комментарий снова стал корневым @@ -693,7 +694,7 @@ $doc.off('click', '.remove-new-file').on('click', '.remove-new-file', function() // Добавил поддержку лимита символов if ($.fn.limit) { - $('#ta_' + cid).limit(1000, '#charsLeft_' + cid); + $('#ta_' + cid).limit(MAX_CHARS, '#charsLeft_' + cid); } $('#ta_' + cid).focus(); });