mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	KanBan: be able to set default board (#14147)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		| @@ -27,14 +27,14 @@ export default async function initProject() { | ||||
|             }, | ||||
|           }); | ||||
|         }, | ||||
|       } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   $('.edit-project-board').each(function () { | ||||
|     const projectTitleLabel = $(this).closest('.board-column-header').find('.board-label'); | ||||
|     const projectTitleInput = $(this).find( | ||||
|       '.content > .form > .field > .project-board-title' | ||||
|       '.content > .form > .field > .project-board-title', | ||||
|     ); | ||||
|  | ||||
|     $(this) | ||||
| @@ -59,6 +59,21 @@ export default async function initProject() { | ||||
|       }); | ||||
|   }); | ||||
|  | ||||
|   $(document).on('click', '.set-default-project-board', async function (e) { | ||||
|     e.preventDefault(); | ||||
|  | ||||
|     await $.ajax({ | ||||
|       method: 'POST', | ||||
|       url: $(this).data('url'), | ||||
|       headers: { | ||||
|         'X-Csrf-Token': csrf, | ||||
|         'X-Remote': true, | ||||
|       }, | ||||
|       contentType: 'application/json', | ||||
|     }); | ||||
|  | ||||
|     window.location.reload(); | ||||
|   }); | ||||
|   $('.delete-project-board').each(function () { | ||||
|     $(this).click(function (e) { | ||||
|       e.preventDefault(); | ||||
| @@ -72,7 +87,7 @@ export default async function initProject() { | ||||
|         contentType: 'application/json', | ||||
|         method: 'DELETE', | ||||
|       }).done(() => { | ||||
|         setTimeout(window.location.reload(true), 2000); | ||||
|         window.location.reload(); | ||||
|       }); | ||||
|     }); | ||||
|   }); | ||||
| @@ -93,7 +108,7 @@ export default async function initProject() { | ||||
|       method: 'POST', | ||||
|     }).done(() => { | ||||
|       boardTitle.closest('form').removeClass('dirty'); | ||||
|       setTimeout(window.location.reload(true), 2000); | ||||
|       window.location.reload(); | ||||
|     }); | ||||
|   }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user