summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar/sidebar.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-02-12 02:08:29 +0200
committerLauri Ojansivu <x@xet7.org>2020-02-12 02:08:29 +0200
commite89965f6422fd95b4ad2112ae407b1dde4853510 (patch)
tree755ce1eab44ad01a63e231566ec84777d3b928a9 /client/components/sidebar/sidebar.js
parentb4e55830652d2186b2a52f3c34fca05ba175c223 (diff)
downloadwekan-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/sidebar.js')
-rw-r--r--client/components/sidebar/sidebar.js40
1 files changed, 40 insertions, 0 deletions
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