mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	Refactor repo-legacy.js, remove messy global variables. Fix errors. (#17646)
Refactor repo-legacy.js, remove messy global variables. Fix errors. Fix an error in Sortable Fix a incorrect call assignMenuAttributes from the template
This commit is contained in:
		| @@ -1,11 +1,13 @@ | ||||
| const {csrfToken} = window.config; | ||||
|  | ||||
| async function initRepoProjectSortable() { | ||||
|   const els = document.getElementsByClassName('board'); | ||||
|   if (!els.length) return; | ||||
|  | ||||
|   const {Sortable} = await import(/* webpackChunkName: "sortable" */'sortablejs'); | ||||
|   const boardColumns = document.getElementsByClassName('board-column'); | ||||
|  | ||||
|   new Sortable( | ||||
|     document.getElementsByClassName('board')[0], | ||||
|     els[0], | ||||
|     { | ||||
|       group: 'board-column', | ||||
|       draggable: '.board-column', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user