mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 02:58:20 +00:00
Refactor hiding-methods, remove jQuery show/hide, remove .hide
class, remove inline style=display:none (#22950)
Close #22847 This PR: * introduce Gitea's own `showElem` and related functions * remove jQuery show/hide * remove .hide class * remove inline style=display:none From now on: do not use: * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex" * ".hidden" class: it has been polluted by Fomantic UI in many cases * inline style="display: none": it's difficult to tweak * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important" only use: * this ".gt-hidden" class * showElem/hideElem/toggleElem functions in "utils/dom.js" cc: @silverwind , this is the all-in-one PR
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.locale.Tr "repo.normal_view"}}</a>
|
||||
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{.locale.Tr "repo.file_history"}}</a>
|
||||
<a class="ui tiny button unescape-button">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui tiny button escape-button" style="display: none;">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
<a class="ui tiny button escape-button gt-hidden">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
|
@@ -27,7 +27,7 @@
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</button>
|
||||
<div class="data" style="display: none" data-mode="{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}">
|
||||
<div class="data gt-hidden" data-mode="{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}">
|
||||
{{if $showBranchesInDropdown}}
|
||||
{{range .root.Branches}}
|
||||
<div class="item branch {{if eq $defaultBranch .}}selected{{end}}" data-url="{{PathEscapeSegments .}}">{{.}}</div>
|
||||
|
@@ -72,7 +72,7 @@
|
||||
{{end}}
|
||||
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
|
||||
{{if IsMultilineCommitMessage .Message}}
|
||||
<pre class="commit-body" style="display: none;">{{RenderCommitBody $.Context .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
||||
{{end}}
|
||||
</td>
|
||||
{{if .Committer}}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
||||
{{end}}
|
||||
{{if IsMultilineCommitMessage .Message}}
|
||||
<pre class="commit-body" style="display: none;">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</pre>
|
||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</pre>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="template_units" style="display: none;">
|
||||
<div id="template_units" class="gt-hidden">
|
||||
<div class="inline field">
|
||||
<label>{{.locale.Tr "repo.template.items"}}</label>
|
||||
<div class="ui checkbox">
|
||||
|
@@ -67,7 +67,7 @@
|
||||
</script>
|
||||
<div id="diff-file-list"></div>
|
||||
<div id="diff-container">
|
||||
<div id="diff-file-tree" class="hide"></div>
|
||||
<div id="diff-file-tree" class="gt-hidden"></div>
|
||||
<div id="diff-file-boxes" class="sixteen wide column">
|
||||
{{range $i, $file := .Diff.Files}}
|
||||
{{/*notice: the index of Diff.Files should not be used for element ID, because the index will be restarted from 0 when doing load-more for PRs with a lot of files*/}}
|
||||
@@ -116,7 +116,7 @@
|
||||
{{end}}
|
||||
{{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
|
||||
<a class="ui basic tiny button unescape-button">{{$.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui basic tiny button escape-button" style="display: none;">{{$.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
<a class="ui basic tiny button escape-button gt-hidden">{{$.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
{{end}}
|
||||
{{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
|
||||
{{if $file.IsDeleted}}
|
||||
@@ -136,7 +136,7 @@
|
||||
</div>
|
||||
</h4>
|
||||
<div class="diff-file-body ui attached unstackable table segment" {{if $file.IsViewed}}data-folded="true"{{end}}>
|
||||
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} hide{{end}}">
|
||||
<div id="diff-source-{{$file.NameHash}}" class="file-body file-code unicode-escaped code-diff{{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}{{if $showFileViewToggle}} gt-hidden{{end}}">
|
||||
{{if or $file.IsIncomplete $file.IsBin}}
|
||||
<div class="diff-file-body binary" style="padding: 5px 10px;">
|
||||
{{if $file.IsIncomplete}}
|
||||
@@ -187,7 +187,7 @@
|
||||
</div>
|
||||
|
||||
{{if not $.Repository.IsArchived}}
|
||||
<div class="hide" id="edit-content-form">
|
||||
<div class="gt-hidden" id="edit-content-form">
|
||||
<div class="ui comment form">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="active write item">{{$.locale.Tr "write"}}</a>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{{if and $.root.SignedUserID (not $.Repository.IsArchived)}}
|
||||
<form class="ui form {{if $.hidden}}hide comment-form comment-form-reply{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
||||
<form class="ui form {{if $.hidden}}gt-hidden comment-form comment-form-reply{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
|
||||
{{$.root.CsrfTokenHtml}}
|
||||
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
|
||||
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"/>
|
||||
|
@@ -54,8 +54,8 @@
|
||||
<span class="no-content">{{$.root.locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}"></div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}"></div>
|
||||
</div>
|
||||
{{$reactions := .Reactions.GroupByType}}
|
||||
{{if $reactions}}
|
||||
|
@@ -88,7 +88,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="scrolling menu reference-list-menu base-tag-list" style="display: none">
|
||||
<div class="scrolling menu reference-list-menu base-tag-list gt-hidden">
|
||||
{{range .Tags}}
|
||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments .}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments $.HeadBranch}}">{{$BaseCompareName}}:{{.}}</div>
|
||||
{{end}}
|
||||
@@ -157,7 +157,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="scrolling menu reference-list-menu head-tag-list" style="display: none">
|
||||
<div class="scrolling menu reference-list-menu head-tag-list gt-hidden">
|
||||
{{range .HeadTags}}
|
||||
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{PathEscapeSegments $.BaseBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.HeadUser.Name}}/{{PathEscape $.HeadRepo.Name}}:{{end}}{{PathEscapeSegments .}}">{{$HeadCompareName}}:{{.}}</div>
|
||||
{{end}}
|
||||
@@ -184,10 +184,10 @@
|
||||
{{if .IsNothingToCompare}}
|
||||
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived)}}
|
||||
<div class="ui segment">{{.locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
|
||||
<div class="ui info message show-form-container" {{if .Flash}}style="display: none"{{end}}>
|
||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
||||
<button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>
|
||||
</div>
|
||||
<div class="pullrequest-form" {{if not .Flash}}style="display: none"{{end}}>
|
||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
||||
{{template "repo/issue/new_form" .}}
|
||||
</div>
|
||||
{{else}}
|
||||
@@ -214,7 +214,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
{{if and $.IsSigned (not .Repository.IsArchived)}}
|
||||
<div class="ui info message show-form-container" {{if .Flash}}style="display: none"{{end}}>
|
||||
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
|
||||
<button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>
|
||||
</div>
|
||||
{{else if .Repository.IsArchived}}
|
||||
@@ -223,7 +223,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{if $.IsSigned}}
|
||||
<div class="pullrequest-form" {{if not .Flash}}style="display: none"{{end}}>
|
||||
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
|
||||
{{template "repo/issue/new_form" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@@ -13,14 +13,14 @@
|
||||
{{svg "octicon-unfold" 16 "gt-mr-3"}}
|
||||
{{$.locale.Tr "repo.issues.review.show_resolved"}}
|
||||
</button>
|
||||
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated gt-df gt-ac">
|
||||
<button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button hide-outdated gt-df gt-ac gt-hidden">
|
||||
{{svg "octicon-fold" 16 "gt-mr-3"}}
|
||||
{{$.locale.Tr "repo.issues.review.hide_resolved"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}hide{{end}}">
|
||||
<div id="code-comments-{{(index .comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}gt-hidden{{end}}">
|
||||
<div class="comment-list">
|
||||
<ui class="ui comments">
|
||||
{{template "repo/diff/comments" dict "root" $ "comments" .comments}}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="hide">
|
||||
<div class="gt-hidden">
|
||||
<div class="ui bottom attached tab image-diff-container active" data-tab="diff-side-by-side-{{.file.Index}}">
|
||||
<div class="diff-side-by-side">
|
||||
{{if .blobBase}}
|
||||
|
@@ -36,7 +36,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||
<textarea id="edit_area" name="content" class="hide" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
||||
<textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
||||
data-url="{{.Repository.Link}}/markdown"
|
||||
data-context="{{.RepoLink}}"
|
||||
data-markdown-file-exts="{{.MarkdownFileExts}}"
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<a class="active item" data-tab="write">{{svg "octicon-code" 16 "gt-mr-2"}}{{.locale.Tr "repo.editor.new_patch"}}</a>
|
||||
</div>
|
||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||
<textarea id="edit_area" name="content" class="hide" data-id="repo-{{.Repository.Name}}-patch"
|
||||
<textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-patch"
|
||||
data-context="{{.RepoLink}}"
|
||||
data-line-wrap-extensions="{{.LineWrapExtensions}}">
|
||||
{{.FileContent}}</textarea>
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="repo-find-file-no-result" class="ui row center gt-mt-5" hidden>
|
||||
<div id="repo-find-file-no-result" class="ui row center gt-mt-5 gt-hidden">
|
||||
<h3>{{.locale.Tr "repo.find_file.no_matching"}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
</h2>
|
||||
<div class="ui dividing"></div>
|
||||
<div class="ui segment loading hide" id="loading-indicator"></div>
|
||||
<div class="ui segment loading gt-hidden" id="loading-indicator"></div>
|
||||
{{template "repo/graph/svgcontainer" .}}
|
||||
{{template "repo/graph/commits" .}}
|
||||
</div>
|
||||
|
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
||||
<div class="ui repo-topic-edit grid form" id="topic_edit" style="display:none">
|
||||
<div class="ui repo-topic-edit grid form gt-hidden" id="topic_edit">
|
||||
<div class="fourteen wide column">
|
||||
<div class="field">
|
||||
<div class="ui fluid multiple search selection dropdown">
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="hide" id="validate_prompt">
|
||||
<div class="gt-hidden" id="validate_prompt">
|
||||
<span id="count_prompt">{{.locale.Tr "repo.topic.count_prompt"}}</span>
|
||||
<span id="format_prompt">{{.locale.Tr "repo.topic.format_prompt"}}</span>
|
||||
</div>
|
||||
|
@@ -39,7 +39,7 @@
|
||||
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}" style="display: none">
|
||||
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} gt-hidden">
|
||||
{{if .Reference}}
|
||||
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{.locale.Tr "repo.clear_ref"}}</a></strong></div>
|
||||
{{end}}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<a
|
||||
class="item {{if not .label.IsChecked}}hide{{end}}"
|
||||
class="item {{if not .label.IsChecked}}gt-hidden{{end}}"
|
||||
id="label_{{.label.ID}}"
|
||||
href="{{.root.RepoLink}}/{{if or .root.IsPull .root.Issue.IsPull}}pulls{{else}}issues{{end}}?labels={{.label.ID}}"{{/* FIXME: use .root.Issue.Link or create .root.Link */}}
|
||||
>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<div class="ui labels list">
|
||||
<span class="no-select item {{if .ctx.HasSelectedLabel}}hide{{end}}">{{.ctx.locale.Tr "repo.issues.new.no_label"}}</span>
|
||||
<span class="no-select item {{if .ctx.HasSelectedLabel}}gt-hidden{{end}}">{{.ctx.locale.Tr "repo.issues.new.no_label"}}</span>
|
||||
<span class="labels-list">
|
||||
{{range .ctx.Labels}}
|
||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||
|
@@ -199,7 +199,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="issue-actions" class="ui stackable grid hide">
|
||||
<div id="issue-actions" class="ui stackable grid gt-hidden">
|
||||
<div class="six wide column">
|
||||
{{template "repo/issue/openclose" .}}
|
||||
</div>
|
||||
|
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="issue-actions" class="ui stackable grid hide">
|
||||
<div id="issue-actions" class="ui stackable grid gt-hidden">
|
||||
<div class="six wide column">
|
||||
{{template "repo/issue/openclose" .}}
|
||||
</div>
|
||||
|
@@ -134,7 +134,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-milestone list">
|
||||
<span class="no-select item {{if .Milestone}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<span class="no-select item {{if .Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Milestone}}
|
||||
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}">
|
||||
@@ -198,7 +198,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-project list">
|
||||
<span class="no-select item {{if .Project}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||
<span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Project}}
|
||||
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/projects/{{.Project.ID}}">
|
||||
@@ -236,11 +236,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui assignees list">
|
||||
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">
|
||||
<span class="no-select item {{if .HasSelectedLabel}}gt-hidden{{end}}">
|
||||
{{.locale.Tr "repo.issues.new.no_assignees"}}
|
||||
</span>
|
||||
{{range .Assignees}}
|
||||
<a class="hide item gt-p-2 muted" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}">
|
||||
<a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}">
|
||||
{{avatar $.Context . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
@@ -77,8 +77,8 @@
|
||||
<span class="no-content">{{.locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issue-{{.Issue.ID}}-raw" class="raw-content hide">{{.Issue.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
|
||||
<div id="issue-{{.Issue.ID}}-raw" class="raw-content gt-hidden">{{.Issue.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
|
||||
{{if .Issue.Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments "Content" .Issue.RenderedContent}}
|
||||
{{end}}
|
||||
@@ -194,7 +194,7 @@
|
||||
{{template "repo/issue/view_content/sidebar" .}}
|
||||
</div>
|
||||
|
||||
<div class="hide" id="edit-content-form">
|
||||
<div class="gt-hidden" id="edit-content-form">
|
||||
<div class="ui comment form">
|
||||
<div class="ui top tabular menu">
|
||||
<a class="active write item">{{$.locale.Tr "write"}}</a>
|
||||
@@ -224,7 +224,7 @@
|
||||
|
||||
{{template "repo/issue/view_content/reference_issue_dialog" .}}
|
||||
|
||||
<div class="hide" id="no-content">
|
||||
<div class="gt-hidden" id="no-content">
|
||||
<span class="no-content">{{.locale.Tr "repo.issues.no_content"}}</span>
|
||||
</div>
|
||||
|
||||
|
@@ -77,8 +77,8 @@
|
||||
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}}
|
||||
{{end}}
|
||||
@@ -449,8 +449,8 @@
|
||||
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}}
|
||||
{{end}}
|
||||
@@ -576,8 +576,8 @@
|
||||
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||
<div class="edit-content-zone gt-hidden" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
</div>
|
||||
{{$reactions := .Reactions.GroupByType}}
|
||||
{{if $reactions}}
|
||||
|
@@ -456,7 +456,7 @@
|
||||
|
||||
{{if $.StillCanManualMerge}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui form manually-merged-fields" style="display: none">
|
||||
<div class="ui form manually-merged-fields gt-hidden">
|
||||
<form action="{{.Link}}/merge" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div class="ui divider"></div>
|
||||
<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
|
||||
<div class="instruct-content gt-mt-3" style="display:none">
|
||||
<div class="instruct-content gt-mt-3 gt-hidden">
|
||||
<div><h3 class="gt-di">{{$.locale.Tr "step1"}} </h3>{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
|
||||
<div class="ui secondary segment">
|
||||
{{if eq $.Issue.PullRequest.Flow 0}}
|
||||
|
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ui assignees list">
|
||||
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span>
|
||||
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_reviewers"}}</span>
|
||||
<div class="selected">
|
||||
{{range .PullReviewers}}
|
||||
<div class="item gt-mb-2">
|
||||
@@ -202,7 +202,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-milestone list">
|
||||
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<span class="no-select item {{if .Issue.Milestone}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Issue.Milestone}}
|
||||
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
|
||||
@@ -259,7 +259,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-project list">
|
||||
<span class="no-select item {{if .Issue.ProjectID}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||
<span class="no-select item {{if .Issue.ProjectID}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Issue.ProjectID}}
|
||||
<a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}">
|
||||
@@ -308,7 +308,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui assignees list">
|
||||
<span class="no-select item {{if .Issue.Assignees}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span>
|
||||
<span class="no-select item {{if .Issue.Assignees}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_assignees"}}</span>
|
||||
<div class="selected">
|
||||
{{range .Issue.Assignees}}
|
||||
<div class="item">
|
||||
@@ -423,7 +423,7 @@
|
||||
<div class="ui divider"></div>
|
||||
<span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span>
|
||||
<div class="ui form" id="deadline-loader">
|
||||
<div class="ui negative message" id="deadline-err-invalid-date" style="display: none;">
|
||||
<div class="ui negative message gt-hidden" id="deadline-err-invalid-date">
|
||||
{{svg "octicon-x" 16 "close icon"}}
|
||||
{{.locale.Tr "repo.issues.due_date_invalid"}}
|
||||
</div>
|
||||
@@ -447,7 +447,7 @@
|
||||
{{end}}
|
||||
|
||||
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
||||
<div {{if ne .Issue.DeadlineUnix 0}} style="display: none;"{{end}} id="deadlineForm">
|
||||
<div {{if ne .Issue.DeadlineUnix 0}} class="gt-hidden"{{end}} id="deadlineForm">
|
||||
<form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input required placeholder="{{.locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.Format "2006-01-02"}}"{{end}} type="date" name="deadlineDate" id="deadlineDate">
|
||||
|
@@ -8,14 +8,14 @@
|
||||
<h1>
|
||||
<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}}</span>
|
||||
<span class="index">#{{.Issue.Index}}</span>
|
||||
<div id="edit-title-input" class="ui input gt-ml-4" style="display: none">
|
||||
<div id="edit-title-input" class="ui input gt-ml-4 gt-hidden">
|
||||
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off">
|
||||
</div>
|
||||
</h1>
|
||||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
|
||||
<div class="edit-buttons">
|
||||
<button id="cancel-edit-title" class="ui basic button secondary in-edit" style="display: none">{{.locale.Tr "repo.issues.cancel"}}</button>
|
||||
<button id="save-edit-title" class="ui primary button in-edit" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button>
|
||||
<button id="cancel-edit-title" class="ui basic button secondary in-edit gt-hidden">{{.locale.Tr "repo.issues.cancel"}}</button>
|
||||
<button id="save-edit-title" class="ui primary button in-edit gt-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}}>{{.locale.Tr "repo.issues.save"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -61,7 +61,7 @@
|
||||
{{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}}
|
||||
</span>
|
||||
{{end}}
|
||||
<span id="pull-desc-edit" style="display: none">
|
||||
<span id="pull-desc-edit gt-hidden">
|
||||
<div class="ui floating filter dropdown">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">{{.locale.Tr "repo.pulls.compare_compare"}}: {{$.HeadTarget}}</span>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<img src="{{AssetUrlPrefix}}/img/loading.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column" style="display: none;">
|
||||
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column gt-hidden">
|
||||
<div>
|
||||
<img src="{{AssetUrlPrefix}}/img/failed.png"/>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<p>{{.locale.Tr "repo.migrate.migrating" .CloneAddr | Safe}}</p>
|
||||
<p id="repo_migrating_progress_message"></p>
|
||||
</div>
|
||||
<div id="repo_migrating_failed" hidden>
|
||||
<div id="repo_migrating_failed" class="gt-hidden">
|
||||
{{if .CloneAddr}}
|
||||
<p>{{.locale.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p>
|
||||
{{else}}
|
||||
|
@@ -14,9 +14,9 @@
|
||||
<input id="lfs" name="lfs" type="checkbox" {{if .lfs}} checked{{end}}>
|
||||
<label>{{.locale.Tr "repo.migrate_options_lfs"}}</label>
|
||||
</div>
|
||||
<span id="lfs_settings" style="display:none">(<a id="lfs_settings_show" href="#">{{.locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
|
||||
<span id="lfs_settings" class="gt-hidden">(<a id="lfs_settings_show" href="#">{{.locale.Tr "repo.settings.advanced_settings"}}</a>)</span>
|
||||
</div>
|
||||
<div id="lfs_endpoint" style="display:none">
|
||||
<div id="lfs_endpoint" class="gt-hidden">
|
||||
<span class="help">{{.locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}{{if .ContextUser.CanImportLocal}} {{.locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span>
|
||||
<div class="inline field {{if .Err_LFSEndpoint}}error{{end}}">
|
||||
<label>{{.locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="{{if not .HasError}}hide{{end}} gt-mb-4" id="add-deploy-key-panel">
|
||||
<div class="{{if not .HasError}}gt-hidden{{end}} gt-mb-4" id="add-deploy-key-panel">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
|
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="content">{{$.locale.Tr "repo.settings.githook_content"}}</label>
|
||||
<textarea id="content" name="content" class="hide">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
<textarea id="content" name="content" class="gt-hidden">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
<div class="editor-loading is-loading"></div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
||||
<div class="ui right">
|
||||
{{if .EscapeStatus.Escaped}}
|
||||
<a class="ui mini basic button unescape-button" style="display: none;">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
{{end}}
|
||||
<a class="ui primary show-panel button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info hide" id="info-{{.ID}}">
|
||||
<div class="info gt-hidden" id="info-{{.ID}}">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="item active" data-tab="request-{{.ID}}">{{$.locale.Tr "repo.settings.webhook.request"}}</a>
|
||||
<a class="item" data-tab="response-{{.ID}}">
|
||||
|
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
|
||||
<div class="events fields ui grid {{if not .Webhook.ChooseEvents}}gt-hidden{{end}}">
|
||||
<!-- Repository Events -->
|
||||
<div class="fourteen wide column">
|
||||
<label>{{.locale.Tr "repo.settings.event_header_repository"}}</label>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
|
||||
<div class="ui segment sub-menu language-stats-details" style="display: none">
|
||||
<div class="ui segment sub-menu language-stats-details gt-hidden">
|
||||
<div class="ui horizontal center link list">
|
||||
{{range .LanguageStats}}
|
||||
<div class="item gt-df gt-ac gt-jc">
|
||||
|
@@ -33,7 +33,7 @@
|
||||
{{end}}
|
||||
<a class="ui mini basic button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{.locale.Tr "repo.file_history"}}</a>
|
||||
{{if .EscapeStatus.Escaped}}
|
||||
<a class="ui mini basic button unescape-button" style="display: none;">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else if .EscapeStatus.Escaped}}
|
||||
<a class="ui mini basic button unescape-button gt-mr-2" style="display: none;">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button unescape-button gt-mr-2 gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui mini basic button escape-button gt-mr-2">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
||||
{{if IsMultilineCommitMessage .LatestCommit.Message}}
|
||||
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
||||
<pre class="commit-body" style="display: none;">{{RenderCommitBody $.Context .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
||||
{{end}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="eight wide right aligned column">
|
||||
{{if .EscapeStatus.Escaped}}
|
||||
<a class="ui small button unescape-button" style="display: none;">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui small button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
||||
<a class="ui small button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
||||
{{end}}
|
||||
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
|
||||
|
Reference in New Issue
Block a user