()
| 216 | applySlicerPathToEntry(thisEntry, result.filePaths[0]); |
| 217 | } |
| 218 | } |
| 219 | }); |
| 220 | |
| 221 | // Both fields are already made editable above, but ensure they remain editable |
| 222 | // (This is a safety check in case something else tries to disable them) |
| 223 | nameInput.removeAttribute('readonly'); |
| 224 | nameInput.disabled = false; |
| 225 | pathInput.removeAttribute('readonly'); |
| 226 | pathInput.disabled = false; |
| 227 | |
| 228 | // Add remove button handler |
| 229 | const removeButton = entry.querySelector('.remove-slicer-button'); |
| 230 | removeButton.addEventListener('click', (e) => { |
| 231 | e.preventDefault(); |
| 232 | e.stopPropagation(); |
| 233 | const thisEntry = e.target.closest('.slicer-entry'); |
| 234 | if (thisEntry) { |
| 235 | thisEntry.remove(); |
| 236 | } |
| 237 | }); |
| 238 | |
| 239 | return container; |
| 240 | } |
| 241 | |
| 242 | async function openSlicerSettings() { |
| 243 | const dialog = document.getElementById('slicer-dialog'); |
| 244 | if (!dialog) return; |
| 245 | |
| 246 | const slicerList = dialog.querySelector('#slicer-list'); |
| 247 | if (!slicerList) return; |
| 248 | |
| 249 | // Prevent form submission |
| 250 | const form = dialog.querySelector('form'); |
| 251 | form.addEventListener('submit', (e) => { |
| 252 | e.preventDefault(); |
| 253 | }); |
no test coverage detected