mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-10-25 11:17:28 +02:00 
			
		
		
		
	added a remove button issue#529
This commit is contained in:
		
							parent
							
								
									63eacf443e
								
							
						
					
					
						commit
						bbd8de0899
					
				| @ -21,6 +21,7 @@ function displayFiles(files) { | ||||
|                 <div class="arrows d-flex"> | ||||
|                     <button class="btn btn-secondary move-up"><span>↑</span></button> | ||||
|                     <button class="btn btn-secondary move-down"><span>↓</span></button> | ||||
|                     <button class="btn btn-danger remove-file"><span>×</span></button> | ||||
|                 </div> | ||||
|             </div> | ||||
|         `;
 | ||||
| @ -56,6 +57,16 @@ function attachMoveButtons() { | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     var removeButtons = document.querySelectorAll(".remove-file"); | ||||
|     for (var i = 0; i < removeButtons.length; i++) { | ||||
|          removeButtons[i].addEventListener("click", function (event) { | ||||
|               event.preventDefault(); | ||||
|               var parent = this.closest(".list-group-item"); | ||||
|               parent.remove(); | ||||
|               updateFiles(); | ||||
|          }); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| document.getElementById("sortByNameBtn").addEventListener("click", function() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user