mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
refactor: clean up legacy templates and js (#39808)
* Remove unused `"root"` data attributes from templates * Use our "confirmModal" as much as possible (partially for #39643) * Use "data-global-init" to refactor a lot of legacy code * Refactor and clearify initRepoIssueCommentDelete's behavior to help #36862 * Remove dead code `common-organization.ts`
This commit is contained in:
1 parent
a25d1d77eb
commit
2fe74d3cdd
17 files changed
+89
-101
No files matched your search
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div>
|
||||
{{if or (eq .Process.Type "request") (eq .Process.Type "normal")}}
|
||||
<a class="link-action" data-url="{{.root.Link}}/cancel/{{.Process.PID}}"
|
||||
<a class="link-action" data-url="{{ctx.RootData.Link}}/cancel/{{.Process.PID}}"
|
||||
data-modal-confirm-header="{{ctx.Locale.Tr "admin.monitor.process.cancel"}}"
|
||||
data-modal-confirm-content="{{ctx.Locale.Tr "admin.monitor.process.cancel_desc"}}"
|
||||
>{{svg "octicon-trash" 16 "tw-text-red"}}</a>
|
||||
@@ -60,8 +60,8 @@
|
||||
|
||||
{{if .Process.Children}}
|
||||
<div class="divided list">
|
||||
{{range .Process.Children}}
|
||||
{{template "admin/stacktrace-row" dict "Process" . "root" $.root}}
|
||||
{{range $child := .Process.Children}}
|
||||
{{template "admin/stacktrace-row" dict "Process" $child}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
{{if .ProcessStacks}}
|
||||
<div class="ui attached segment">
|
||||
<div class="ui relaxed divided list">
|
||||
{{range .ProcessStacks}}
|
||||
{{template "admin/stacktrace-row" dict "Process" . "root" $}}
|
||||
{{range $process := .ProcessStacks}}
|
||||
{{template "admin/stacktrace-row" dict "Process" $process}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user