mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-11 10:14:16 -04:00
Add sorting of exlusive labels.
This commit is contained in:
@@ -70,47 +70,54 @@ func (o *IssuesOptions) Copy(edit ...func(options *IssuesOptions)) *IssuesOption
|
|||||||
// applySorts sort an issues-related session based on the provided
|
// applySorts sort an issues-related session based on the provided
|
||||||
// sortType string
|
// sortType string
|
||||||
func applySorts(sess *xorm.Session, sortType string, priorityRepoID int64) {
|
func applySorts(sess *xorm.Session, sortType string, priorityRepoID int64) {
|
||||||
switch sortType {
|
if strings.HasPrefix(sortType, "scope-") {
|
||||||
case "oldest":
|
scope := strings.TrimPrefix(sortType, "scope-")
|
||||||
sess.Asc("issue.created_unix").Asc("issue.id")
|
sess.Join("LEFT", "issue_label", "issue.id = issue_label.issue_id")
|
||||||
case "recentupdate":
|
sess.Join("LEFT", "label", "label.id = issue_label.label_id and label.name LIKE ?", fmt.Sprintf("%s/%%", scope))
|
||||||
sess.Desc("issue.updated_unix").Desc("issue.created_unix").Desc("issue.id")
|
sess.Asc("label.exclusive_order").Desc("issue.id")
|
||||||
case "leastupdate":
|
} else {
|
||||||
sess.Asc("issue.updated_unix").Asc("issue.created_unix").Asc("issue.id")
|
switch sortType {
|
||||||
case "mostcomment":
|
case "oldest":
|
||||||
sess.Desc("issue.num_comments").Desc("issue.created_unix").Desc("issue.id")
|
sess.Asc("issue.created_unix").Asc("issue.id")
|
||||||
case "leastcomment":
|
case "recentupdate":
|
||||||
sess.Asc("issue.num_comments").Desc("issue.created_unix").Desc("issue.id")
|
sess.Desc("issue.updated_unix").Desc("issue.created_unix").Desc("issue.id")
|
||||||
case "priority":
|
case "leastupdate":
|
||||||
sess.Desc("issue.priority").Desc("issue.created_unix").Desc("issue.id")
|
sess.Asc("issue.updated_unix").Asc("issue.created_unix").Asc("issue.id")
|
||||||
case "nearduedate":
|
case "mostcomment":
|
||||||
// 253370764800 is 01/01/9999 @ 12:00am (UTC)
|
sess.Desc("issue.num_comments").Desc("issue.created_unix").Desc("issue.id")
|
||||||
sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id").
|
case "leastcomment":
|
||||||
OrderBy("CASE " +
|
sess.Asc("issue.num_comments").Desc("issue.created_unix").Desc("issue.id")
|
||||||
"WHEN issue.deadline_unix = 0 AND (milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL) THEN 253370764800 " +
|
case "priority":
|
||||||
"WHEN milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL THEN issue.deadline_unix " +
|
sess.Desc("issue.priority").Desc("issue.created_unix").Desc("issue.id")
|
||||||
"WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " +
|
case "nearduedate":
|
||||||
"ELSE issue.deadline_unix END ASC").
|
// 253370764800 is 01/01/9999 @ 12:00am (UTC)
|
||||||
Desc("issue.created_unix").
|
sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id").
|
||||||
Desc("issue.id")
|
OrderBy("CASE " +
|
||||||
case "farduedate":
|
"WHEN issue.deadline_unix = 0 AND (milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL) THEN 253370764800 " +
|
||||||
sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id").
|
"WHEN milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL THEN issue.deadline_unix " +
|
||||||
OrderBy("CASE " +
|
"WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " +
|
||||||
"WHEN milestone.deadline_unix IS NULL THEN issue.deadline_unix " +
|
"ELSE issue.deadline_unix END ASC").
|
||||||
"WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " +
|
Desc("issue.created_unix").
|
||||||
"ELSE issue.deadline_unix END DESC").
|
Desc("issue.id")
|
||||||
Desc("issue.created_unix").
|
case "farduedate":
|
||||||
Desc("issue.id")
|
sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id").
|
||||||
case "priorityrepo":
|
OrderBy("CASE " +
|
||||||
sess.OrderBy("CASE "+
|
"WHEN milestone.deadline_unix IS NULL THEN issue.deadline_unix " +
|
||||||
"WHEN issue.repo_id = ? THEN 1 "+
|
"WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " +
|
||||||
"ELSE 2 END ASC", priorityRepoID).
|
"ELSE issue.deadline_unix END DESC").
|
||||||
Desc("issue.created_unix").
|
Desc("issue.created_unix").
|
||||||
Desc("issue.id")
|
Desc("issue.id")
|
||||||
case "project-column-sorting":
|
case "priorityrepo":
|
||||||
sess.Asc("project_issue.sorting").Desc("issue.created_unix").Desc("issue.id")
|
sess.OrderBy("CASE "+
|
||||||
default:
|
"WHEN issue.repo_id = ? THEN 1 "+
|
||||||
sess.Desc("issue.created_unix").Desc("issue.id")
|
"ELSE 2 END ASC", priorityRepoID).
|
||||||
|
Desc("issue.created_unix").
|
||||||
|
Desc("issue.id")
|
||||||
|
case "project-column-sorting":
|
||||||
|
sess.Asc("project_issue.sorting").Desc("issue.created_unix").Desc("issue.id")
|
||||||
|
default:
|
||||||
|
sess.Desc("issue.created_unix").Desc("issue.id")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -87,6 +87,7 @@ type Label struct {
|
|||||||
OrgID int64 `xorm:"INDEX"`
|
OrgID int64 `xorm:"INDEX"`
|
||||||
Name string
|
Name string
|
||||||
Exclusive bool
|
Exclusive bool
|
||||||
|
ExclusiveOrder int `xorm:"DEFAULT 0"`
|
||||||
Description string
|
Description string
|
||||||
Color string `xorm:"VARCHAR(7)"`
|
Color string `xorm:"VARCHAR(7)"`
|
||||||
NumIssues int
|
NumIssues int
|
||||||
@@ -236,7 +237,7 @@ func UpdateLabel(ctx context.Context, l *Label) error {
|
|||||||
}
|
}
|
||||||
l.Color = color
|
l.Color = color
|
||||||
|
|
||||||
return updateLabelCols(ctx, l, "name", "description", "color", "exclusive", "archived_unix")
|
return updateLabelCols(ctx, l, "name", "description", "color", "exclusive", "exclusive_order", "archived_unix")
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteLabel delete a label
|
// DeleteLabel delete a label
|
||||||
|
@@ -4,14 +4,14 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
issue_model "code.gitea.io/gitea/models/issues"
|
issue_model "code.gitea.io/gitea/models/issues"
|
||||||
"code.gitea.io/gitea/modules/container"
|
"code.gitea.io/gitea/modules/container"
|
||||||
"code.gitea.io/gitea/modules/indexer/issues/internal"
|
"code.gitea.io/gitea/modules/indexer/issues/internal"
|
||||||
"code.gitea.io/gitea/modules/optional"
|
"code.gitea.io/gitea/modules/optional"
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_model.IssuesOptions, error) {
|
func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_model.IssuesOptions, error) {
|
||||||
@@ -34,7 +34,11 @@ func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_m
|
|||||||
case internal.SortByDeadlineAsc:
|
case internal.SortByDeadlineAsc:
|
||||||
sortType = "nearduedate"
|
sortType = "nearduedate"
|
||||||
default:
|
default:
|
||||||
sortType = "newest"
|
if strings.HasPrefix(string(options.SortBy), "scope-") {
|
||||||
|
sortType = string(options.SortBy)
|
||||||
|
} else {
|
||||||
|
sortType = "newest"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See the comment of issues_model.SearchOptions for the reason why we need to convert
|
// See the comment of issues_model.SearchOptions for the reason why we need to convert
|
||||||
|
@@ -6,7 +6,9 @@ package issues
|
|||||||
import (
|
import (
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
issues_model "code.gitea.io/gitea/models/issues"
|
issues_model "code.gitea.io/gitea/models/issues"
|
||||||
|
"code.gitea.io/gitea/modules/indexer/issues/internal"
|
||||||
"code.gitea.io/gitea/modules/optional"
|
"code.gitea.io/gitea/modules/optional"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOptions {
|
func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOptions {
|
||||||
@@ -99,7 +101,11 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
|
|||||||
// Unsupported sort type for search
|
// Unsupported sort type for search
|
||||||
fallthrough
|
fallthrough
|
||||||
default:
|
default:
|
||||||
searchOpt.SortBy = SortByUpdatedDesc
|
if strings.HasPrefix(opts.SortType, "scope-") {
|
||||||
|
searchOpt.SortBy = internal.SortBy(opts.SortType)
|
||||||
|
} else {
|
||||||
|
searchOpt.SortBy = SortByUpdatedDesc
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return searchOpt
|
return searchOpt
|
||||||
|
@@ -1635,6 +1635,8 @@ issues.label_archived_filter = Show archived labels
|
|||||||
issues.label_archive_tooltip = Archived labels are excluded by default from the suggestions when searching by label.
|
issues.label_archive_tooltip = Archived labels are excluded by default from the suggestions when searching by label.
|
||||||
issues.label_exclusive_desc = Name the label <code>scope/item</code> to make it mutually exclusive with other <code>scope/</code> labels.
|
issues.label_exclusive_desc = Name the label <code>scope/item</code> to make it mutually exclusive with other <code>scope/</code> labels.
|
||||||
issues.label_exclusive_warning = Any conflicting scoped labels will be removed when editing the labels of an issue or pull request.
|
issues.label_exclusive_warning = Any conflicting scoped labels will be removed when editing the labels of an issue or pull request.
|
||||||
|
issues.label_exclusive_order = Sort Order
|
||||||
|
issues.label_exclusive_order_tooltip = Exclusive labels in the same scope will be sorted according to this numeric order.
|
||||||
issues.label_count = %d labels
|
issues.label_count = %d labels
|
||||||
issues.label_open_issues = %d open issues/pull requests
|
issues.label_open_issues = %d open issues/pull requests
|
||||||
issues.label_edit = Edit
|
issues.label_edit = Edit
|
||||||
|
@@ -139,6 +139,7 @@ func UpdateLabel(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
l.Name = form.Title
|
l.Name = form.Title
|
||||||
l.Exclusive = form.Exclusive
|
l.Exclusive = form.Exclusive
|
||||||
|
l.ExclusiveOrder = form.ExclusiveOrder
|
||||||
l.Description = form.Description
|
l.Description = form.Description
|
||||||
l.Color = form.Color
|
l.Color = form.Color
|
||||||
|
|
||||||
|
@@ -6,7 +6,9 @@ package repo
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"maps"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"slices"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -459,6 +461,24 @@ func UpdateIssueStatus(ctx *context.Context) {
|
|||||||
ctx.JSONOK()
|
ctx.JSONOK()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func renderExclusiveLabelScopes(ctx *context.Context) {
|
||||||
|
labels, err := issues_model.GetLabelsByRepoID(ctx, ctx.Repo.Repository.ID, "", db.ListOptions{})
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GetAllRepoLabels", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
scopeSet := make(map[string]bool, 0)
|
||||||
|
for _, label := range labels {
|
||||||
|
scope := label.ExclusiveScope()
|
||||||
|
if len(scope) > 0 {
|
||||||
|
scopeSet[scope] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scopes := slices.Collect(maps.Keys(scopeSet))
|
||||||
|
ctx.Data["ExclusiveLabelScopes"] = scopes
|
||||||
|
}
|
||||||
|
|
||||||
func renderMilestones(ctx *context.Context) {
|
func renderMilestones(ctx *context.Context) {
|
||||||
// Get milestones
|
// Get milestones
|
||||||
milestones, err := db.Find[issues_model.Milestone](ctx, issues_model.FindMilestoneOptions{
|
milestones, err := db.Find[issues_model.Milestone](ctx, issues_model.FindMilestoneOptions{
|
||||||
@@ -778,6 +798,11 @@ func Issues(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderExclusiveLabelScopes(ctx)
|
||||||
|
if ctx.Written() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList)
|
ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList)
|
||||||
|
|
||||||
ctx.HTML(http.StatusOK, tplIssues)
|
ctx.HTML(http.StatusOK, tplIssues)
|
||||||
|
@@ -524,12 +524,13 @@ func (f *CreateMilestoneForm) Validate(req *http.Request, errs binding.Errors) b
|
|||||||
|
|
||||||
// CreateLabelForm form for creating label
|
// CreateLabelForm form for creating label
|
||||||
type CreateLabelForm struct {
|
type CreateLabelForm struct {
|
||||||
ID int64
|
ID int64
|
||||||
Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_title"`
|
Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_title"`
|
||||||
Exclusive bool `form:"exclusive"`
|
Exclusive bool `form:"exclusive"`
|
||||||
IsArchived bool `form:"is_archived"`
|
ExclusiveOrder int `form:"exclusive_order"`
|
||||||
Description string `binding:"MaxSize(200)" locale:"repo.issues.label_description"`
|
IsArchived bool `form:"is_archived"`
|
||||||
Color string `binding:"Required;MaxSize(7)" locale:"repo.issues.label_color"`
|
Description string `binding:"MaxSize(200)" locale:"repo.issues.label_description"`
|
||||||
|
Color string `binding:"Required;MaxSize(7)" locale:"repo.issues.label_color"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates the fields
|
// Validate validates the fields
|
||||||
|
@@ -133,5 +133,12 @@
|
|||||||
<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "leastcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
<a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "leastcomment"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||||
<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "nearduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
<a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "nearduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
||||||
<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "farduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
<a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{QueryBuild $queryLink "sort" "farduedate"}}">{{ctx.Locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_label"}}</div>
|
||||||
|
{{range .ExclusiveLabelScopes}}
|
||||||
|
{{ $scope := . }}
|
||||||
|
{{ $sortType := (printf "scope-%s" $scope) }}
|
||||||
|
<a class="{{if eq $.SortType $sortType }}active {{end}}item" href="{{QueryBuild $queryLink "sort" $sortType}}">{{$scope}}</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -25,6 +25,14 @@
|
|||||||
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
|
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<div class="field label-exclusive-order-input-field" style="margin-top: 0.5em">
|
||||||
|
<label for="exclusive_order">{{ctx.Locale.Tr "repo.issues.label_exclusive_order"}}
|
||||||
|
<i class="tw-ml-1" data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_exclusive_order_tooltip"}}>
|
||||||
|
{{svg "octicon-info"}}
|
||||||
|
</i>
|
||||||
|
</label>
|
||||||
|
<input class="label-exclusive-order-input" name="exclusive_order" type="number" maxlength="4">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field label-is-archived-input-field">
|
<div class="field label-is-archived-input-field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
data-label-id="{{.ID}}" data-label-name="{{.Name}}" data-label-color="{{.Color}}"
|
data-label-id="{{.ID}}" data-label-name="{{.Name}}" data-label-color="{{.Color}}"
|
||||||
data-label-exclusive="{{.Exclusive}}" data-label-is-archived="{{gt .ArchivedUnix 0}}"
|
data-label-exclusive="{{.Exclusive}}" data-label-is-archived="{{gt .ArchivedUnix 0}}"
|
||||||
data-label-num-issues="{{.NumIssues}}" data-label-description="{{.Description}}"
|
data-label-num-issues="{{.NumIssues}}" data-label-description="{{.Description}}"
|
||||||
|
data-label-exclusive-order="{{.ExclusiveOrder}}"
|
||||||
>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
|
>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
|
||||||
<a class="link-action" href="#" data-url="{{$.Link}}/delete?id={{.ID}}"
|
<a class="link-action" href="#" data-url="{{$.Link}}/delete?id={{.ID}}"
|
||||||
data-modal-confirm-header="{{ctx.Locale.Tr "repo.issues.label_deletion"}}"
|
data-modal-confirm-header="{{ctx.Locale.Tr "repo.issues.label_deletion"}}"
|
||||||
|
@@ -18,6 +18,8 @@ export function initCompLabelEdit(pageSelector: string) {
|
|||||||
const elExclusiveField = elModal.querySelector('.label-exclusive-input-field');
|
const elExclusiveField = elModal.querySelector('.label-exclusive-input-field');
|
||||||
const elExclusiveInput = elModal.querySelector<HTMLInputElement>('.label-exclusive-input');
|
const elExclusiveInput = elModal.querySelector<HTMLInputElement>('.label-exclusive-input');
|
||||||
const elExclusiveWarning = elModal.querySelector('.label-exclusive-warning');
|
const elExclusiveWarning = elModal.querySelector('.label-exclusive-warning');
|
||||||
|
const elExclusiveOrderField = elModal.querySelector<HTMLInputElement>('.label-exclusive-order-input-field');
|
||||||
|
const elExclusiveOrderInput = elModal.querySelector<HTMLInputElement>('.label-exclusive-order-input');
|
||||||
const elIsArchivedField = elModal.querySelector('.label-is-archived-input-field');
|
const elIsArchivedField = elModal.querySelector('.label-is-archived-input-field');
|
||||||
const elIsArchivedInput = elModal.querySelector<HTMLInputElement>('.label-is-archived-input');
|
const elIsArchivedInput = elModal.querySelector<HTMLInputElement>('.label-is-archived-input');
|
||||||
const elDescInput = elModal.querySelector<HTMLInputElement>('.label-desc-input');
|
const elDescInput = elModal.querySelector<HTMLInputElement>('.label-desc-input');
|
||||||
@@ -29,6 +31,7 @@ export function initCompLabelEdit(pageSelector: string) {
|
|||||||
const showExclusiveWarning = hasScope && elExclusiveInput.checked && elModal.hasAttribute('data-need-warn-exclusive');
|
const showExclusiveWarning = hasScope && elExclusiveInput.checked && elModal.hasAttribute('data-need-warn-exclusive');
|
||||||
toggleElem(elExclusiveWarning, showExclusiveWarning);
|
toggleElem(elExclusiveWarning, showExclusiveWarning);
|
||||||
if (!hasScope) elExclusiveInput.checked = false;
|
if (!hasScope) elExclusiveInput.checked = false;
|
||||||
|
toggleElem(elExclusiveOrderField, elExclusiveInput.checked)
|
||||||
};
|
};
|
||||||
|
|
||||||
const showLabelEditModal = (btn:HTMLElement) => {
|
const showLabelEditModal = (btn:HTMLElement) => {
|
||||||
@@ -36,6 +39,7 @@ export function initCompLabelEdit(pageSelector: string) {
|
|||||||
const form = elModal.querySelector<HTMLFormElement>('form');
|
const form = elModal.querySelector<HTMLFormElement>('form');
|
||||||
elLabelId.value = btn.getAttribute('data-label-id') || '';
|
elLabelId.value = btn.getAttribute('data-label-id') || '';
|
||||||
elNameInput.value = btn.getAttribute('data-label-name') || '';
|
elNameInput.value = btn.getAttribute('data-label-name') || '';
|
||||||
|
elExclusiveOrderInput.value = btn.getAttribute('data-label-exclusive-order') || '0';
|
||||||
elIsArchivedInput.checked = btn.getAttribute('data-label-is-archived') === 'true';
|
elIsArchivedInput.checked = btn.getAttribute('data-label-is-archived') === 'true';
|
||||||
elExclusiveInput.checked = btn.getAttribute('data-label-exclusive') === 'true';
|
elExclusiveInput.checked = btn.getAttribute('data-label-exclusive') === 'true';
|
||||||
elDescInput.value = btn.getAttribute('data-label-description') || '';
|
elDescInput.value = btn.getAttribute('data-label-description') || '';
|
||||||
|
Reference in New Issue
Block a user