CardDetails sorting number is displayed at card and can be modified (if configured)

This commit is contained in:
Martin Filser 2021-04-12 23:34:02 +02:00
parent ab22fb27ce
commit 540ce3a6ed
6 changed files with 68 additions and 0 deletions

View file

@ -754,6 +754,10 @@ BlazeComponent.extendComponent({
return this.currentBoard.allowsRequestedBy;
},
allowsCardSortingByNumber() {
return this.currentBoard.allowsCardSortingByNumber;
},
allowsLabels() {
return this.currentBoard.allowsLabels;
},
@ -968,6 +972,22 @@ BlazeComponent.extendComponent({
this.currentBoard.allowsRequestedBy,
);
},
'click .js-field-has-card-sorting-by-number'(evt) {
evt.preventDefault();
this.currentBoard.allowsCardSortingByNumber = !this.currentBoard
.allowsCardSortingByNumber;
this.currentBoard.setAllowsCardSortingByNumber(
this.currentBoard.allowsCardSortingByNumber,
);
$(`.js-field-has-card-sorting-by-number ${MCB}`).toggleClass(
CKCLS,
this.currentBoard.allowsCardSortingByNumber,
);
$('.js-field-has-card-sorting-by-number').toggleClass(
CKCLS,
this.currentBoard.allowsCardSortingByNumber,
);
},
'click .js-field-has-labels'(evt) {
evt.preventDefault();
this.currentBoard.allowsLabels = !this.currentBoard.allowsLabels;