Skip to content

Commit

Permalink
clean file
Browse files Browse the repository at this point in the history
  • Loading branch information
sqrd-max committed May 8, 2024
1 parent 7026a4a commit 3108d01
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/ccdb/webgui/templates/simple_tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,15 @@ <h1 class="text-center my-4">{% block title %}Tables{% endblock %}</h1>
function adjustModal() {
$('.modal').each(function() {
var originalDisplay = $(this).css('display');
$(this).css('display', 'block'); // Показать для измерения
$(this).css('display', 'block');

var bodyWidth = $(this).find('.modal-body').outerWidth(true); // Ширина содержимого
var headerWidth = $(this).find('.modal-header').outerWidth(true); // Ширина заголовка
var bodyWidth = $(this).find('.modal-body').outerWidth(true);
var headerWidth = $(this).find('.modal-header').outerWidth(true);
var dialog = $(this).find('.modal-dialog');

// Установка ширины modal-dialog по шире из header или body
dialog.css('width', headerWidth > bodyWidth ? headerWidth : bodyWidth);

$(this).css('display', originalDisplay); // Восстановить оригинальное отображение
$(this).css('display', originalDisplay);
});
}

Expand Down

0 comments on commit 3108d01

Please sign in to comment.