adds card number allowance to card settings

This commit is contained in:
Kai Lehmann 2021-08-02 21:41:58 +02:00
parent b57eae14d4
commit 6fd45ce74b
2 changed files with 27 additions and 0 deletions

View file

@ -189,6 +189,13 @@ template(name="boardCardSettingsPopup")
span
i.fa.fa-tags
| {{_ 'labels'}}
div.check-div
a.flex.js-field-has-card-number(class="{{#if allowsCardNumber}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCardNumber}}is-checked{{/if}}")
span
i.fa.fa-hashtag
| {{_ 'card'}}
| {{_ 'number'}}
div.check-div
a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")

View file

@ -776,6 +776,10 @@ BlazeComponent.extendComponent({
return this.currentBoard.allowsComments;
},
allowsCardNumber() {
return this.currentBoard.allowsCardNumber;
},
allowsDescriptionTitle() {
return this.currentBoard.allowsDescriptionTitle;
},
@ -1019,6 +1023,22 @@ BlazeComponent.extendComponent({
this.currentBoard.allowsDescriptionTitle,
);
},
'click .js-field-has-card-number'(evt) {
evt.preventDefault();
this.currentBoard.allowsCardNumber = !this.currentBoard
.allowsCardNumber;
this.currentBoard.setAllowsCardNumber(
this.currentBoard.allowsCardNumber,
);
$(`.js-field-has-card-number ${MCB}`).toggleClass(
CKCLS,
this.currentBoard.allowsCardNumber,
);
$('.js-field-has-card-number').toggleClass(
CKCLS,
this.currentBoard.allowsCardNumber,
);
},
'click .js-field-has-description-text'(evt) {
evt.preventDefault();
this.currentBoard.allowsDescriptionText = !this.currentBoard