mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 19:17:21 +00:00
Optimize the calling code of queryElems (#34235)
This commit is contained in:
@ -3,6 +3,7 @@ import {showGlobalErrorMessage} from '../bootstrap.ts';
|
||||
import {fomanticQuery} from '../modules/fomantic/base.ts';
|
||||
import {queryElems} from '../utils/dom.ts';
|
||||
import {registerGlobalInitFunc, registerGlobalSelectorFunc} from '../modules/observer.ts';
|
||||
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
|
||||
|
||||
const {appUrl} = window.config;
|
||||
|
||||
@ -80,6 +81,10 @@ export function initGlobalTabularMenu() {
|
||||
fomanticQuery('.ui.menu.tabular:not(.custom) .item').tab();
|
||||
}
|
||||
|
||||
export function initGlobalAvatarUploader() {
|
||||
registerGlobalInitFunc('initAvatarUploader', initAvatarUploaderWithCropper);
|
||||
}
|
||||
|
||||
// for performance considerations, it only uses performant syntax
|
||||
function attachInputDirAuto(el: Partial<HTMLInputElement | HTMLTextAreaElement>) {
|
||||
if (el.type !== 'hidden' &&
|
||||
|
Reference in New Issue
Block a user