mirror of
https://github.com/wekan/wekan.git
synced 2026-03-12 08:32:33 +01:00
At right sidebar, moved Minicard Settings to Card Settings popup.
Thanks to xet7 !
This commit is contained in:
parent
80db4cd645
commit
2f2a039e3c
2 changed files with 59 additions and 106 deletions
|
|
@ -236,7 +236,6 @@ Template.boardMenuPopup.events({
|
|||
'click .js-import-board': Popup.open('chooseBoardSource'),
|
||||
'click .js-subtask-settings': Popup.open('boardSubtaskSettings'),
|
||||
'click .js-card-settings': Popup.open('boardCardSettings'),
|
||||
'click .js-minicard-settings': Popup.open('boardMinicardSettings'),
|
||||
'click .js-export-board': Popup.open('exportBoard'),
|
||||
});
|
||||
|
||||
|
|
@ -984,6 +983,22 @@ BlazeComponent.extendComponent({
|
|||
);
|
||||
},
|
||||
|
||||
allowsDescriptionTextOnMinicard() {
|
||||
return this.currentBoard.allowsDescriptionTextOnMinicard;
|
||||
},
|
||||
|
||||
allowsCoverAttachmentOnMinicard() {
|
||||
return this.currentBoard.allowsCoverAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsBadgeAttachmentOnMinicard() {
|
||||
return this.currentBoard.allowsBadgeAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsCardSortingByNumberOnMinicard() {
|
||||
return this.currentBoard.allowsCardSortingByNumberOnMinicard;
|
||||
},
|
||||
|
||||
boards() {
|
||||
const ret = ReactiveCache.getBoards(
|
||||
{
|
||||
|
|
@ -1241,6 +1256,22 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsCardNumber,
|
||||
);
|
||||
},
|
||||
'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-description-text'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsDescriptionText = !this.currentBoard
|
||||
|
|
@ -1318,74 +1349,6 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsActivities,
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('boardCardSettingsPopup');
|
||||
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.currentBoard = Utils.getCurrentBoard();
|
||||
},
|
||||
|
||||
allowsDescriptionTextOnMinicard() {
|
||||
return this.currentBoard.allowsDescriptionTextOnMinicard;
|
||||
},
|
||||
|
||||
allowsCoverAttachmentOnMinicard() {
|
||||
return this.currentBoard.allowsCoverAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsBadgeAttachmentOnMinicard() {
|
||||
return this.currentBoard.allowsBadgeAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsCardSortingByNumberOnMinicard() {
|
||||
return this.currentBoard.allowsCardSortingByNumberOnMinicard;
|
||||
},
|
||||
|
||||
lists() {
|
||||
return ReactiveCache.getLists(
|
||||
{
|
||||
boardId: this.currentBoard._id,
|
||||
archived: false,
|
||||
},
|
||||
{
|
||||
sort: ['title'],
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
hasLists() {
|
||||
return this.lists().length > 0;
|
||||
},
|
||||
|
||||
isListSelected() {
|
||||
return (
|
||||
this.currentBoard.dateSettingsDefaultBoardId === this.currentData()._id
|
||||
);
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'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-cover-attachment-on-minicard'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsCoverAttachmentOnMinicard = !this.currentBoard
|
||||
|
|
@ -1437,7 +1400,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
];
|
||||
},
|
||||
}).register('boardMinicardSettingsPopup');
|
||||
}).register('boardCardSettingsPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue