mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Fix admin notice view-detail (#30450)
Fix https://github.com/go-gitea/gitea/issues/30434, regression from https://github.com/go-gitea/gitea/pull/30115. I also removed the date insertion into the modal which was also broken since that date was switched to `absolute-date` because I see no real purpose to putting that date into the modal. Result: <img width="1038" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/aa2eb8b4-73dc-4d98-9b80-3f276f89d9e5">
This commit is contained in:
		| @@ -207,13 +207,13 @@ export function initAdminCommon() { | ||||
|  | ||||
|   // Notice | ||||
|   if (document.querySelector('.admin.notice')) { | ||||
|     const $detailModal = document.getElementById('detail-modal'); | ||||
|     const detailModal = document.getElementById('detail-modal'); | ||||
|  | ||||
|     // Attach view detail modals | ||||
|     $('.view-detail').on('click', function () { | ||||
|       $detailModal.find('.content pre').text($(this).parents('tr').find('.notice-description').text()); | ||||
|       $detailModal.find('.sub.header').text(this.closest('tr')?.querySelector('relative-time')?.getAttribute('title')); | ||||
|       $detailModal.modal('show'); | ||||
|       const description = this.closest('tr').querySelector('.notice-description').textContent; | ||||
|       detailModal.querySelector('.content pre').textContent = description; | ||||
|       $(detailModal).modal('show'); | ||||
|       return false; | ||||
|     }); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user