mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 15:41:52 +01:00
Merge pull request #4454 from helioguardabaxo/master
Show description text on minicard
This commit is contained in:
commit
4534177f47
8 changed files with 76 additions and 2 deletions
|
|
@ -114,8 +114,9 @@ template(name="minicard")
|
|||
//span.badge-comment.badge-text
|
||||
//| {{_ 'comment'}}
|
||||
if getDescription
|
||||
.badge.badge-state-image-only(title=getDescription)
|
||||
span.badge-icon.fa.fa-align-left
|
||||
unless currentBoard.allowsDescriptionTextOnMinicard
|
||||
.badge.badge-state-image-only(title=getDescription)
|
||||
span.badge-icon.fa.fa-align-left
|
||||
if getVoteQuestion
|
||||
.badge.badge-state-image-only(title=getVoteQuestion)
|
||||
span.badge-icon.fa.fa-thumbs-up(class="{{#if voteState}}text-green{{/if}}")
|
||||
|
|
@ -144,6 +145,10 @@ template(name="minicard")
|
|||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text.check-list-sort {{ sort }}
|
||||
if currentBoard.allowsDescriptionTextOnMinicard
|
||||
if getDescription
|
||||
.minicard-description
|
||||
| {{ getDescription }}
|
||||
|
||||
template(name="editCardSortOrderPopup")
|
||||
input.js-edit-card-sort-popup(type='text' autofocus value=sort dir="auto")
|
||||
|
|
|
|||
|
|
@ -201,6 +201,16 @@
|
|||
.minicard-assignees:empty
|
||||
display: none
|
||||
|
||||
.minicard-description {
|
||||
padding: 6px 0 6px 8px
|
||||
background-color: #eee
|
||||
width: 100%
|
||||
margin-bottom: 2px
|
||||
margin-left: -4px
|
||||
border-radius: 3px
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
&.minicard-composer
|
||||
margin-bottom: 10px
|
||||
|
||||
|
|
|
|||
|
|
@ -236,6 +236,12 @@ template(name="boardCardSettingsPopup")
|
|||
i.fa.fa-align-left
|
||||
| {{_ 'description'}}
|
||||
| {{_ 'custom-field-text'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-description-text-on-minicard(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
|
||||
span
|
||||
i.fa.fa-align-left
|
||||
| {{_ 'description-on-minicard'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
|
||||
|
|
|
|||
|
|
@ -859,6 +859,10 @@ BlazeComponent.extendComponent({
|
|||
return this.currentBoard.allowsDescriptionText;
|
||||
},
|
||||
|
||||
allowsDescriptionTextOnMinicard() {
|
||||
return this.currentBoard.allowsDescriptionTextOnMinicard;
|
||||
},
|
||||
|
||||
isBoardSelected() {
|
||||
return this.currentBoard.dateSettingsDefaultBoardID;
|
||||
},
|
||||
|
|
@ -1142,6 +1146,22 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsDescriptionText,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-description-text-on-minicard'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard = !this.currentBoard
|
||||
.allowsDescriptionTextOnMinicard;
|
||||
this.currentBoard.setallowsDescriptionTextOnMinicard(
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
$(`.js-field-has-description-text-on-minicard ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
$('.js-field-has-description-text-on-minicard').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-checklists'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsChecklists = !this.currentBoard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue