diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-02-12 02:08:29 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-02-12 02:08:29 +0200 |
commit | e89965f6422fd95b4ad2112ae407b1dde4853510 (patch) | |
tree | 755ce1eab44ad01a63e231566ec84777d3b928a9 /client/components/sidebar | |
parent | b4e55830652d2186b2a52f3c34fca05ba175c223 (diff) | |
download | wekan-e89965f6422fd95b4ad2112ae407b1dde4853510.tar.gz wekan-e89965f6422fd95b4ad2112ae407b1dde4853510.tar.bz2 wekan-e89965f6422fd95b4ad2112ae407b1dde4853510.zip |
Remove card element grouping to create compact card layout.
Card Settings / Show on Card: Description Title and Description Text.
Thanks to e-stoniauk, 2020product and xet7 !
Fixes https://github.com/wekan/wekan/pull/2922
Diffstat (limited to 'client/components/sidebar')
-rw-r--r-- | client/components/sidebar/sidebar.jade | 14 | ||||
-rw-r--r-- | client/components/sidebar/sidebar.js | 40 |
2 files changed, 54 insertions, 0 deletions
diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade index 07da476f..ebcd8486 100644 --- a/client/components/sidebar/sidebar.jade +++ b/client/components/sidebar/sidebar.jade @@ -130,6 +130,20 @@ template(name="boardCardSettingsPopup") i.fa.fa-tags | {{_ 'labels'}} div.check-div + a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}") + span + i.fa.fa-align-left + | {{_ 'description'}} + | {{_ 'title'}} + div.check-div + a.flex.js-field-has-description-text(class="{{#if allowsDescriptionText}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsDescriptionText}}is-checked{{/if}}") + span + i.fa.fa-align-left + | {{_ 'description'}} + | {{_ 'custom-field-text'}} + div.check-div a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}") .materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}") span diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index c3c00b08..8e640564 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -647,6 +647,14 @@ BlazeComponent.extendComponent({ return this.currentBoard.allowsComments; }, + allowsDescriptionTitle() { + return this.currentBoard.allowsDescriptionTitle; + }, + + allowsDescriptionText() { + return this.currentBoard.allowsDescriptionText; + }, + isBoardSelected() { return this.currentBoard.dateSettingsDefaultBoardID; }, @@ -837,6 +845,38 @@ BlazeComponent.extendComponent({ this.currentBoard.allowsLabels, ); }, + 'click .js-field-has-description-title'(evt) { + evt.preventDefault(); + this.currentBoard.allowsDescriptionTitle = !this.currentBoard + .allowsDescriptionTitle; + this.currentBoard.setAllowsDescriptionTitle( + this.currentBoard.allowsDescriptionTitle, + ); + $(`.js-field-has-description-title ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsDescriptionTitle, + ); + $('.js-field-has-description-title').toggleClass( + CKCLS, + this.currentBoard.allowsDescriptionTitle, + ); + }, + 'click .js-field-has-description-text'(evt) { + evt.preventDefault(); + this.currentBoard.allowsDescriptionText = !this.currentBoard + .allowsDescriptionText; + this.currentBoard.setAllowsDescriptionText( + this.currentBoard.allowsDescriptionText, + ); + $(`.js-field-has-description-text ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsDescriptionText, + ); + $('.js-field-has-description-text').toggleClass( + CKCLS, + this.currentBoard.allowsDescriptionText, + ); + }, 'click .js-field-has-checklists'(evt) { evt.preventDefault(); this.currentBoard.allowsChecklists = !this.currentBoard |