mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Forbid jQuery .css and refactor all usage (#29852)
				
					
				
			Tested all functionality. There is a [pre-existing bug](https://github.com/go-gitea/gitea/issues/29853) when moving a project panels which is not caused by this refactoring. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -72,7 +72,7 @@ async function initRepoProjectSortable() { | ||||
|             await PUT($(column).data('url'), { | ||||
|               data: { | ||||
|                 sorting: i, | ||||
|                 color: rgbToHex($(column).css('backgroundColor')), | ||||
|                 color: rgbToHex(window.getComputedStyle($(column)[0]).backgroundColor), | ||||
|               }, | ||||
|             }); | ||||
|           } catch (error) { | ||||
| @@ -111,8 +111,9 @@ export function initRepoProject() { | ||||
|     const $projectColorInput = $(this).find('#new_project_column_color'); | ||||
|     const $boardColumn = $(this).closest('.project-column'); | ||||
|  | ||||
|     if ($boardColumn.css('backgroundColor')) { | ||||
|       setLabelColor($projectHeader, rgbToHex($boardColumn.css('backgroundColor'))); | ||||
|     const bgColor = $boardColumn[0].style.backgroundColor; | ||||
|     if (bgColor) { | ||||
|       setLabelColor($projectHeader, rgbToHex(bgColor)); | ||||
|     } | ||||
|  | ||||
|     $(this).find('.edit-project-column-button').on('click', async function (e) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user