mirror of https://github.com/go-gitea/gitea.git
Merge f4c6f13660
into 9c08637eae
This commit is contained in:
commit
0c279f27e4
|
@ -29,7 +29,7 @@
|
|||
{{range .Labels}}
|
||||
{{$exclusiveScope := .ExclusiveScope}}
|
||||
{{if and (ne $previousExclusiveScope $exclusiveScope)}}
|
||||
<div class="divider"></div>
|
||||
<div class="divider exclusive-scope"></div>
|
||||
{{end}}
|
||||
{{$previousExclusiveScope = $exclusiveScope}}
|
||||
<a class="item label-filter-item tw-flex tw-items-center" {{if .IsArchived}}data-is-archived{{end}} href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{{range .Labels}}
|
||||
{{$exclusiveScope := .ExclusiveScope}}
|
||||
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
|
||||
<div class="divider"></div>
|
||||
<div class="divider exclusive-scope"></div>
|
||||
{{end}}
|
||||
{{$previousExclusiveScope = $exclusiveScope}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" {{if .IsArchived}}data-is-archived{{end}} data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}tw-invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span> {{RenderLabel $.Context ctx.Locale .}}
|
||||
|
@ -26,12 +26,12 @@
|
|||
<p class="archived-label-hint">{{template "repo/issue/labels/label_archived" .}}</p>
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="divider"></div>
|
||||
<div class="divider exclusive-scope"></div>
|
||||
{{$previousExclusiveScope = "_no_scope"}}
|
||||
{{range .OrgLabels}}
|
||||
{{$exclusiveScope := .ExclusiveScope}}
|
||||
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
|
||||
<div class="divider"></div>
|
||||
<div class="divider exclusive-scope"></div>
|
||||
{{end}}
|
||||
{{$previousExclusiveScope = $exclusiveScope}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" {{if .IsArchived}}data-is-archived{{end}} data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}tw-invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span> {{RenderLabel $.Context ctx.Locale .}}
|
||||
|
|
|
@ -221,6 +221,8 @@ function initArchivedLabelFilter() {
|
|||
for (const label of archivedLabels) {
|
||||
const id = label.getAttribute('data-label-id');
|
||||
toggleElem(label, archivedLabelEl.checked || selectedLabels.includes(id));
|
||||
// also toggle the divider
|
||||
toggleElem($(label).next('.exclusive-scope'), archivedLabelEl.checked || selectedLabels.includes(id));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -730,5 +730,7 @@ export function initArchivedLabelHandler() {
|
|||
if (!document.querySelector('.archived-label-hint')) return;
|
||||
for (const label of document.querySelectorAll('[data-is-archived]')) {
|
||||
toggleElem(label, label.classList.contains('checked'));
|
||||
// also toggle the divider
|
||||
toggleElem($(label).next('.exclusive-scope'), label.classList.contains('checked'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue