Updated export-configuration page: select & order Columns for Export section collapsible
This commit is contained in:
@@ -744,3 +744,55 @@
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Collapsible Sections */
|
||||
.collapsible-content {
|
||||
max-height: 5000px;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.collapsible-content.collapsed {
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.toggle-icon {
|
||||
transition: transform 0.3s ease;
|
||||
margin-left: 10px;
|
||||
font-size: 0.9em;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.toggle-icon.rotated {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
|
||||
.config-header[onclick],
|
||||
.selected-columns-section h4[onclick] {
|
||||
transition: background-color 0.2s ease;
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
margin: -10px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.config-header[onclick]:hover,
|
||||
.selected-columns-section h4[onclick]:hover {
|
||||
background-color: rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.config-header h3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.selected-columns-section h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@@ -8,6 +8,50 @@ let availableColumns = [];
|
||||
let sortableInstance = null;
|
||||
let savedColumnOrder = [];
|
||||
|
||||
function toggleSection(sectionId) {
|
||||
try {
|
||||
const section = document.getElementById(sectionId);
|
||||
const icon = document.getElementById(sectionId + 'Icon');
|
||||
|
||||
if (!section) return;
|
||||
|
||||
if (section.classList.contains('collapsed')) {
|
||||
section.classList.remove('collapsed');
|
||||
if (icon) icon.classList.remove('rotated');
|
||||
} else {
|
||||
section.classList.add('collapsed');
|
||||
if (icon) icon.classList.add('rotated');
|
||||
}
|
||||
|
||||
// Save state
|
||||
try {
|
||||
const collapsedSections = JSON.parse(localStorage.getItem('collapsedSections') || '{}');
|
||||
collapsedSections[sectionId] = section.classList.contains('collapsed');
|
||||
localStorage.setItem('collapsedSections', JSON.stringify(collapsedSections));
|
||||
} catch (e) {}
|
||||
} catch (error) {
|
||||
console.error('Error toggling section:', error);
|
||||
}
|
||||
}
|
||||
|
||||
function restoreCollapsedState() {
|
||||
try {
|
||||
const collapsedSections = JSON.parse(localStorage.getItem('collapsedSections') || '{}');
|
||||
|
||||
Object.keys(collapsedSections).forEach(sectionId => {
|
||||
if (collapsedSections[sectionId]) {
|
||||
const section = document.getElementById(sectionId);
|
||||
const icon = document.getElementById(sectionId + 'Icon');
|
||||
|
||||
if (section) {
|
||||
section.classList.add('collapsed');
|
||||
if (icon) icon.classList.add('rotated');
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
// Initialize when DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('Enhanced Export Configuration with Drag & Drop initialized');
|
||||
|
||||
@@ -89,12 +89,11 @@
|
||||
<input type="hidden" id="column_order" name="column_order" value="">
|
||||
|
||||
<div class="config-card">
|
||||
<div class="config-header">
|
||||
<div class="config-header" onclick="toggleSection('columnsSection')" style="cursor: pointer;">
|
||||
<h3>
|
||||
<i class="fas fa-columns"></i>
|
||||
Select & Order Columns for Export
|
||||
Select & Order Columns for Export <i class="fas fa-chevron-down toggle-icon" id="columnsSectionIcon"></i>
|
||||
</h3>
|
||||
<div class="config-actions">
|
||||
<div class="config-actions" onclick="event.stopPropagation();">
|
||||
<button type="button" onclick="selectAllColumns()" class="btn btn-sm btn-outline">
|
||||
<i class="fas fa-check-double"></i>
|
||||
Select All
|
||||
@@ -109,8 +108,8 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Instructions -->
|
||||
<div class="collapsible-content" id="columnsSection">
|
||||
<!-- Instructions
|
||||
<div class="instructions-card">
|
||||
<div class="instructions-content">
|
||||
<h4><i class="fas fa-info-circle"></i> How to Use</h4>
|
||||
@@ -122,6 +121,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!-- Available Columns Grid -->
|
||||
<div class="columns-section">
|
||||
@@ -164,7 +164,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Preview Section -->
|
||||
<div class="preview-section">
|
||||
<div class="preview-header">
|
||||
|
||||
Reference in New Issue
Block a user