MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / toggleListViewColumnsPopover

Function toggleListViewColumnsPopover

renderer.js:14787–14831  ·  view source on GitHub ↗
(anchorBtn)

Source from the content-addressed store, hash-verified

14785 // Clear selection
14786 selectedModels.clear();
14787 document.getElementById('bulk-edit-button').classList.remove('visible');
14788
14789 await window.electron.showMessage('Success', 'Changes saved successfully!');
14790 } catch (error) {
14791 console.error('Error saving bulk changes:', error);
14792 await window.electron.showMessage('Error', 'Error saving changes');
14793 }
14794
14795 document.getElementById('bulk-edit-dialog').close();
14796});
14797
14798// Handle bulk edit cancel
14799document.getElementById('bulk-cancel-button')?.addEventListener('click', () => {
14800 document.getElementById('bulk-edit-dialog').close();
14801});
14802
14803// Update the add button event listeners to handle both panels
14804document.querySelectorAll('.add-designer-button').forEach(button => {
14805 button.addEventListener('click', () => {
14806 const dialog = document.getElementById('new-designer-dialog');
14807 // Store which dropdown triggered the dialog
14808 dialog.dataset.sourceDropdown = button.closest('.designer-input-container').querySelector('select').id;
14809 dialog.showModal();
14810 });
14811});
14812
14813document.querySelectorAll('.add-parent-button').forEach(button => {
14814 button.addEventListener('click', () => {
14815 const dialog = document.getElementById('new-parent-dialog');
14816 // Store which dropdown triggered the dialog
14817 dialog.dataset.sourceDropdown = button.closest('.designer-input-container').querySelector('select').id;
14818 dialog.showModal();
14819 });
14820});
14821
14822document.querySelectorAll('.add-tag-button').forEach(button => {
14823 button.addEventListener('click', async () => {
14824 // Get the container ID for the tags container - we'll need this to know where to add the tag
14825 const sourceContainer = button.closest('.tags-container').querySelector('.tags-list').id;
14826
14827 // Use the HTML dialog instead of Electron's dialog
14828 const tagDialog = document.getElementById('new-tag-dialog');
14829 const newTagInput = document.getElementById('new-tag-name');
14830
14831 // Clear any previous input
14832 if (newTagInput) {
14833 newTagInput.value = '';
14834 }

Callers 1

renderer.jsFile · 0.85

Tested by

no test coverage detected