gitea/templates
wxiaoguang 27bf63ad20
Refactor global init code and add more comments (#33755)
Follow up #33748

Now there are 3 "global" functions:

* registerGlobalSelectorFunc: for all elements matching the selector, eg: `.ui.dropdown`
* registerGlobalInitFunc: for `data-global-init="initInputAutoFocusEnd"`
* registerGlobalEventFunc: for `data-global-click="onCommentReactionButtonClick"`


And introduce `initGlobalInput` to replace old `initAutoFocusEnd` and
`attachDirAuto`, use `data-global-init` to replace fragile
`.js-autofocus-end` selector.

Another benefit is that by the new approach, no matter how many times
`registerGlobalInitFunc` is called, we only need to do one
"querySelectorAll" in the last step, it could slightly improve the
performance.
2025-03-03 10:57:28 +08:00
..
admin Improve admin user view page (#33735) 2025-02-27 17:47:37 +08:00
api/packages/pypi Fix links in PyPI Simple Repository API page (#30594) 2024-04-20 01:15:14 +00:00
base Refactor global init code and add more comments (#33755) 2025-03-03 10:57:28 +08:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
devtest Always show the "rerun" button for action jobs (#33692) 2025-02-24 08:40:46 +00:00
explore Refactor template ctx and render utils (#32422) 2024-11-05 14:04:26 +08:00
mail Remove unnecessary SanitizeHTML from code (#29575) 2024-03-04 12:02:45 +00:00
org Improve button layout on small screens (#33633) 2025-02-18 11:02:40 +00:00
package Trivial fixes (#33304) 2025-01-17 08:55:02 +00:00
projects Fix project issues list and counting (#33594) 2025-02-17 05:14:56 +00:00
repo Refactor global init code and add more comments (#33755) 2025-03-03 10:57:28 +08:00
shared Fix dynamic content loading init problem (#33748) 2025-03-01 02:02:10 +00:00
status Remove urls from translations (#31950) 2024-09-02 18:36:24 +00:00
swagger allow filtering /repos/{owner}/{repo}/pulls by target base branch queryparam (#33684) 2025-02-27 17:50:44 +00:00
user Improve "generate new access token" form (#33730) 2025-02-27 19:40:12 +00:00
webhook Fix incorrect tailwind migration (#30007) 2024-03-22 20:51:29 +01:00
home.tmpl Remove urls from translations (#31950) 2024-09-02 18:36:24 +00:00
install.tmpl Supplement and Improvement for #32558 (#32585) 2024-11-21 02:42:37 +00:00
post-install.tmpl Optimize the installation page (#32994) 2024-12-31 04:49:26 +00:00