mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +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:
@ -1,10 +1,12 @@
|
||||
export async function createColorPicker($els) {
|
||||
if (!$els || !$els.length) return;
|
||||
import $ from 'jquery';
|
||||
|
||||
export async function createColorPicker(els) {
|
||||
if (!els.length) return;
|
||||
|
||||
await Promise.all([
|
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors'),
|
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors/jquery.minicolors.css'),
|
||||
]);
|
||||
|
||||
$els.minicolors();
|
||||
return $(els).minicolors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user