mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 08:38:49 +01:00
At opened card, toggle to show checklist at minicard. Part 1.
Thanks to xet7 !
This commit is contained in:
parent
66fa59d715
commit
2a190fdc19
5 changed files with 49 additions and 1 deletions
|
|
@ -8,6 +8,17 @@ textarea.js-edit-checklist-item {
|
||||||
resize: none;
|
resize: none;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
}
|
}
|
||||||
|
.text-show-at-minicard {
|
||||||
|
width: 350px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.text-some-space {
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
.text-hide-checked-items {
|
||||||
|
width: 400px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
.delete-text,
|
.delete-text,
|
||||||
.js-delete-checklist-item,
|
.js-delete-checklist-item,
|
||||||
.js-convert-checklist-item-to-card {
|
.js-convert-checklist-item-to-card {
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,20 @@ template(name="checklists")
|
||||||
a.add-checklist-top.js-open-inlined-form(title="{{_ 'add-checklist'}}")
|
a.add-checklist-top.js-open-inlined-form(title="{{_ 'add-checklist'}}")
|
||||||
i.fa.fa-plus
|
i.fa.fa-plus
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
|
span.text-show-at-minicard
|
||||||
|
| {{_ 'show-at-minicard'}}
|
||||||
|
.material-toggle-switch(title="{{_ 'show-checklist-at-minicard'}}")
|
||||||
|
if showChecklistAtMinicard
|
||||||
|
input.toggle-switch(type="checkbox" id="toggleShowChecklistAtMinicardButton" checked="checked")
|
||||||
|
else
|
||||||
|
input.toggle-switch(type="checkbox" id="toggleShowChecklistAtMinicardButton")
|
||||||
|
label.toggle-label(for="toggleShowChecklistAtMinicardButton")
|
||||||
|
span.text-some-space
|
||||||
|
span.text-hide-checked-items
|
||||||
|
| {{_ 'hide-checked-items'}}
|
||||||
.material-toggle-switch(title="{{_ 'hide-checked-items'}}")
|
.material-toggle-switch(title="{{_ 'hide-checked-items'}}")
|
||||||
//span.toggle-switch-title
|
//span.toggle-switch-title
|
||||||
|
//.check-square-icon.i.fa.fa-check-square-o
|
||||||
if hideCheckedItems
|
if hideCheckedItems
|
||||||
input.toggle-switch(type="checkbox" id="toggleHideCheckedItemsButton" checked="checked")
|
input.toggle-switch(type="checkbox" id="toggleHideCheckedItemsButton" checked="checked")
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,9 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
events() {
|
events() {
|
||||||
const events = {
|
const events = {
|
||||||
|
'click #toggleShowChecklistAtMinicardButton'() {
|
||||||
|
Meteor.call('toggleShowChecklistAtMinicard');
|
||||||
|
},
|
||||||
'click #toggleHideCheckedItemsButton'() {
|
'click #toggleHideCheckedItemsButton'() {
|
||||||
Meteor.call('toggleHideCheckedItems');
|
Meteor.call('toggleHideCheckedItems');
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1237,5 +1237,7 @@
|
||||||
"settingsTranslationPopup-title": "Delete this custom translation string?",
|
"settingsTranslationPopup-title": "Delete this custom translation string?",
|
||||||
"translation": "Translation",
|
"translation": "Translation",
|
||||||
"text": "Text",
|
"text": "Text",
|
||||||
"translation-text": "Translation text"
|
"translation-text": "Translation text",
|
||||||
|
"show-at-minicard": "Show at minicard",
|
||||||
|
"show-checklist-at-minicard": "Show checklist at minicard"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,14 @@ Checklists.attachSchema(
|
||||||
type: Date,
|
type: Date,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
showAtMinicard: {
|
||||||
|
/**
|
||||||
|
* Show at minicard. Default: false.
|
||||||
|
*/
|
||||||
|
type: Boolean,
|
||||||
|
optional: true,
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
createdAt: {
|
createdAt: {
|
||||||
/**
|
/**
|
||||||
* Creation date of the checklist
|
* Creation date of the checklist
|
||||||
|
|
@ -134,6 +142,9 @@ Checklists.helpers({
|
||||||
const items = ReactiveCache.getChecklist({ _id: this._id }).items;
|
const items = ReactiveCache.getChecklist({ _id: this._id }).items;
|
||||||
return _.pluck(items, '_id').indexOf(itemId);
|
return _.pluck(items, '_id').indexOf(itemId);
|
||||||
},
|
},
|
||||||
|
hasShowChecklistAtMinicard() {
|
||||||
|
return showAtMinicard || false;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Checklists.allow({
|
Checklists.allow({
|
||||||
|
|
@ -191,6 +202,15 @@ Checklists.mutations({
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleShowChecklistAtMinicard() {
|
||||||
|
const value = this.hasShowChecklistAtMinicard();
|
||||||
|
return {
|
||||||
|
$set: {
|
||||||
|
'showAtMinicard': !value,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue