diff options
author | yp05327 <576951401@qq.com> | 2023-11-20 17:57:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 08:57:46 +0000 |
commit | eae555ff2395cc1ad178f3a977d83742ae73e1d9 (patch) | |
tree | 8a1f612a453b2f0aec55204b954aafed67038761 | |
parent | 0e1b381ff6a603baab638142b8073ae0da98eba3 (diff) | |
download | gitea-eae555ff2395cc1ad178f3a977d83742ae73e1d9.tar.gz gitea-eae555ff2395cc1ad178f3a977d83742ae73e1d9.zip |
Remove autofocus in search box (#28033)
Mentioned here:
https://github.com/go-gitea/gitea/pull/27982#issuecomment-1807923026
-rw-r--r-- | templates/admin/base/search.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/emails/list.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/packages/list.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/repo/search.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/user/list.tmpl | 2 | ||||
-rw-r--r-- | templates/code/searchform.tmpl | 2 | ||||
-rw-r--r-- | templates/explore/repo_search.tmpl | 2 | ||||
-rw-r--r-- | templates/explore/search.tmpl | 2 | ||||
-rw-r--r-- | templates/package/shared/list.tmpl | 2 | ||||
-rw-r--r-- | templates/package/shared/versionlist.tmpl | 2 | ||||
-rw-r--r-- | templates/shared/actions/runner_list.tmpl | 2 | ||||
-rw-r--r-- | templates/shared/searchinput.tmpl | 2 |
12 files changed, 12 insertions, 12 deletions
diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index d4bba8c042..0fecb61d9e 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -1,7 +1,7 @@ <div class="ui secondary filter menu gt-ac gt-mx-0"> <form class="ui form ignore-dirty gt-f1"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 84afc0585f..bcd80368e6 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -7,7 +7,7 @@ <div class="ui secondary filter menu gt-ac gt-mx-0"> <form class="ui form ignore-dirty gt-f1"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index c67797d6b0..5cfd9ddefa 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -14,7 +14,7 @@ <div class="ui attached segment"> <form class="ui form ignore-dirty"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Query}} <select class="ui dropdown" name="type"> <option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option> <option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option> diff --git a/templates/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl index 2baecb8939..247ec5491a 100644 --- a/templates/admin/repo/search.tmpl +++ b/templates/admin/repo/search.tmpl @@ -1,7 +1,7 @@ <div class="ui secondary filter menu gt-ac gt-mx-0"> <form class="ui form ignore-dirty gt-f1"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 46fd376dae..8fdc80fc70 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -54,7 +54,7 @@ <!-- Search Text --> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/code/searchform.tmpl b/templates/code/searchform.tmpl index 8cb840bb31..fae1340046 100644 --- a/templates/code/searchform.tmpl +++ b/templates/code/searchform.tmpl @@ -1,6 +1,6 @@ <form class="ui form ignore-dirty"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}} + {{template "shared/searchinput" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable}} <div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "explore.search.type.tooltip"}}"> <input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="text">{{ctx.Locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div> diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl index 71c088ef24..eaf2e7a090 100644 --- a/templates/explore/repo_search.tmpl +++ b/templates/explore/repo_search.tmpl @@ -3,7 +3,7 @@ <input type="hidden" name="sort" value="{{$.SortType}}"> <input type="hidden" name="language" value="{{$.Language}}"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" (not .ProfileReadme)}} + {{template "shared/searchinput" dict "Value" .Keyword}} {{if .PageIsExploreRepositories}} <input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}"> {{else if .TabName}} diff --git a/templates/explore/search.tmpl b/templates/explore/search.tmpl index 63b842cbbf..74b80436dc 100644 --- a/templates/explore/search.tmpl +++ b/templates/explore/search.tmpl @@ -1,7 +1,7 @@ <div class="ui secondary filter menu gt-ac gt-mx-0"> <form class="ui form ignore-dirty gt-f1"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index a572d98bb6..1087f6061f 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -1,7 +1,7 @@ {{template "base/alert" .}} <form class="ui form ignore-dirty"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Query}} <select class="ui dropdown" name="type"> <option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option> <option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option> diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index 71a1557ffb..fcf3030fe6 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -1,7 +1,7 @@ <p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.Locale.Tr "packages.versions"}}</strong></p> <form class="ui form ignore-dirty"> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Query}} <select class="ui dropdown" name="sort"> <option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.asc"}}</option> <option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.desc"}}</option> diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl index 589edbc957..0e8f3cb874 100644 --- a/templates/shared/actions/runner_list.tmpl +++ b/templates/shared/actions/runner_list.tmpl @@ -35,7 +35,7 @@ <form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}"> <!-- Search Text --> <div class="ui fluid action input"> - {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> </div> </form> diff --git a/templates/shared/searchinput.tmpl b/templates/shared/searchinput.tmpl index 1a9709a8ff..48b288c299 100644 --- a/templates/shared/searchinput.tmpl +++ b/templates/shared/searchinput.tmpl @@ -1 +1 @@ -<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .AutoFocus}} autofocus{{end}}{{if .Disabled}} disabled{{end}}> +<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .Disabled}} disabled{{end}}> |