This commit is contained in:
Srinivas-Saravanan 2025-03-29 18:05:40 +05:30
parent e59d017719
commit 3543c3096c

View File

@ -1,4 +1,10 @@
<style> <style>
.table-content.collapse:not(.show) {
display: block !important; /* Allows width calculation */
height: 0;
overflow: hidden;
}
#allTableContainer { #allTableContainer {
max-width: 100%; max-width: 100%;
overflow-x: auto; overflow-x: auto;
@ -2070,22 +2076,45 @@
tableSNOTracker[tableID] = sno; tableSNOTracker[tableID] = sno;
} }
function increaseTableWidth(increaseBy) { function increaseTableWidth(increaseBy) {
$('.table-collapsible-bar').each(function() { $('.table-collapsible-bar').each(function() {
let currentWidth = ($(this).width()); const $bar = $(this);
// // // console.log('table width ', typeof (currentWidth)); const wasCollapsed = $bar.hasClass('collapsed');
let increaseTableWidth = (currentWidth + increaseBy);
// // // console.log(increaseTableWidth); // Temporarily show the bar for accurate width calculation
$(this).width(currentWidth + increaseBy); if(wasCollapsed) {
$bar.css({
'display': 'block',
'visibility': 'hidden',
'position': 'absolute'
});
}
const currentWidth = $bar.width();
$bar.width(currentWidth + increaseBy);
// Restore original state
if(wasCollapsed) {
$bar.css({
'display': '',
'visibility': '',
'position': ''
});
}
}); });
// // // console.log("function called tablewidth increase");
$("table").each(function() { $("table").each(function() {
let currentWidth = ($(this).width()); const $table = $(this);
// // // console.log('table width ', typeof(currentWidth)); const currentWidth = $table.width();
let increaseTableWidth = (currentWidth + increaseBy); $table.width(currentWidth + increaseBy);
// // // console.log(increaseTableWidth);
$(this).width(currentWidth + increaseBy); // Force layout update for hidden tables
$table.parent('.table-content').css('display', 'block');
$table.width(currentWidth + increaseBy);
$table.parent('.table-content').css('display', '');
}); });
} }