diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-26 20:06:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 20:06:11 +0800 |
commit | 59eb660b1a6881b2cdded486b67c3c283207c255 (patch) | |
tree | c36d4c61cad15b3c524dc2ea1bb9a1fef3dc8f6d /templates/repo | |
parent | 12fff36d057998fe553decdc81c881d3d0e70274 (diff) | |
download | gitea-59eb660b1a6881b2cdded486b67c3c283207c255.tar.gz gitea-59eb660b1a6881b2cdded486b67c3c283207c255.zip |
Fix incorrect `toggle` buttons (#23676)
Some of those are still Copy&Paste problems.
This PR:
* Only cleans the legacy incorrect code, doesn't change or improve the
"action" logic.
* Remove the redundant `$('.toggle.button').on('click')`, now
`$('.show-panel.button').on('click')` handles that kinds of buttons
Actually, there is only one correct "toggle button" in code, the one on
the webhook page.
No need to backport.
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/options_dropdown.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/whitespace_dropdown.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/history.tmpl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/diff/options_dropdown.tmpl b/templates/repo/diff/options_dropdown.tmpl index 8bb92c45fe..93e1183d1b 100644 --- a/templates/repo/diff/options_dropdown.tmpl +++ b/templates/repo/diff/options_dropdown.tmpl @@ -1,7 +1,7 @@ <div class="ui dropdown tiny basic button icon-button" data-tooltip-content="{{.locale.Tr "repo.diff.options_button"}}"> {{svg "octicon-kebab-horizontal"}} <div class="menu"> - <a class="item tiny basic toggle button" id="show-file-list-btn">{{.locale.Tr "repo.diff.show_diff_stats"}}</a> + <a class="item" id="show-file-list-btn">{{.locale.Tr "repo.diff.show_diff_stats"}}</a> {{if .Issue.Index}} <a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.patch" download="{{.Issue.Index}}.patch">{{.locale.Tr "repo.diff.download_patch"}}</a> <a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.diff" download="{{.Issue.Index}}.diff">{{.locale.Tr "repo.diff.download_diff"}}</a> diff --git a/templates/repo/diff/whitespace_dropdown.tmpl b/templates/repo/diff/whitespace_dropdown.tmpl index 790bcfef5a..4d9b00cb55 100644 --- a/templates/repo/diff/whitespace_dropdown.tmpl +++ b/templates/repo/diff/whitespace_dropdown.tmpl @@ -28,4 +28,4 @@ </a> </div> </div> -<a class="ui tiny basic toggle button icon-button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}" data-tooltip-content="{{if .IsSplitStyle}}{{.locale.Tr "repo.diff.show_unified_view"}}{{else}}{{.locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a> +<a class="ui tiny basic button icon-button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}" data-tooltip-content="{{if .IsSplitStyle}}{{.locale.Tr "repo.diff.show_unified_view"}}{{else}}{{.locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a> diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index ff482846a7..e573d221d1 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -18,7 +18,7 @@ {{else}} <span class="text red">{{svg "octicon-alert"}}</span> {{end}} - <a class="ui primary sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a> + <a class="ui primary sha label toggle button show-panel" data-panel="#info-{{.ID}}">{{.UUID}}</a> <div class="ui right"> <span class="text grey time"> {{.DeliveredString}} |