mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 14:41:47 +01:00
Customize of some card's functions
This commit is contained in:
parent
85d47c4ff2
commit
0b00a8095c
21 changed files with 582 additions and 254 deletions
|
|
@ -72,6 +72,25 @@ template(name="boardChangeColorPopup")
|
|||
if isSelected
|
||||
i.fa.fa-check
|
||||
|
||||
template(name="boardDateSettingsPopup")
|
||||
form.board-Date-settings
|
||||
div.check-div
|
||||
a.flex.js-field-has-receiveddate(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
|
||||
span {{_ 'show-receiveddate-field'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-startdate(class="{{#if allowsStartDate}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsStartDate}}is-checked{{/if}}")
|
||||
span {{_ 'show-startdate-field'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-enddate(class="{{#if allowsEndDate}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsEndDate}}is-checked{{/if}}")
|
||||
span {{_ 'show-enddate-field'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-duedate(class="{{#if allowsDueDate}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsDueDate}}is-checked{{/if}}")
|
||||
span {{_ 'show-duedate-field'}}
|
||||
|
||||
template(name="boardSubtaskSettingsPopup")
|
||||
form.board-subtask-settings
|
||||
h3 {{_ 'show-parent-in-minicard'}}
|
||||
|
|
@ -201,6 +220,10 @@ template(name="boardMenuPopup")
|
|||
a.js-subtask-settings
|
||||
i.fa.fa-sitemap
|
||||
| {{_ 'subtask-settings'}}
|
||||
li
|
||||
a.js-Date-settings
|
||||
i.fa.fa-calendar
|
||||
| {{_ 'Date-settings'}}
|
||||
unless currentBoard.isTemplatesBoard
|
||||
hr
|
||||
ul.pop-over-list
|
||||
|
|
@ -238,6 +261,12 @@ template(name="boardMenuPopup")
|
|||
a.js-subtask-settings
|
||||
i.fa.fa-sitemap
|
||||
| {{_ 'subtask-settings'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-Date-settings
|
||||
i.fa.fa-calendar
|
||||
| {{_ 'Date-settings'}}
|
||||
|
||||
template(name="labelsWidget")
|
||||
.board-widget.board-widget-labels
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ Template.boardMenuPopup.events({
|
|||
'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'),
|
||||
'click .js-import-board': Popup.open('chooseBoardSource'),
|
||||
'click .js-subtask-settings': Popup.open('boardSubtaskSettings'),
|
||||
'click .js-Date-settings': Popup.open('boardDateSettings')
|
||||
});
|
||||
|
||||
Template.boardMenuPopup.helpers({
|
||||
|
|
@ -585,6 +586,130 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}).register('boardSubtaskSettingsPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated(){
|
||||
this.currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
},
|
||||
|
||||
allowsReceivedDate(){
|
||||
return this.currentBoard.allowsReceivedDate;
|
||||
},
|
||||
|
||||
allowsStartDate(){
|
||||
return this.currentBoard.allowsStartDate;
|
||||
},
|
||||
|
||||
allowsEndDate(){
|
||||
return this.currentBoard.allowsEndDate;
|
||||
},
|
||||
|
||||
allowsDueDate(){
|
||||
return this.currentBoard.allowsDueDate;
|
||||
},
|
||||
|
||||
isBoardSelected(){
|
||||
return this.currentBoard.dateSettingsDefaultBoardID
|
||||
},
|
||||
|
||||
isNullBoardSelected() {
|
||||
return (
|
||||
this.currentBoard.dateSettingsDefaultBoardId === null ||
|
||||
this.currentBoard.dateSettingsDefaultBoardId === undefined
|
||||
);
|
||||
},
|
||||
|
||||
boards() {
|
||||
return Boards.find(
|
||||
{
|
||||
archived: false,
|
||||
'members.userId': Meteor.userId(),
|
||||
},
|
||||
{
|
||||
sort: ['title'],
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
lists() {
|
||||
return Lists.find(
|
||||
{
|
||||
boardId: this.currentBoard._id,
|
||||
archived: false,
|
||||
},
|
||||
{
|
||||
sort: ['title'],
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
hasLists() {
|
||||
return this.lists().count() > 0;
|
||||
},
|
||||
|
||||
isListSelected() {
|
||||
return this.currentBoard.dateSettingsDefaultBoardId === this.currentData()._id;
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .js-field-has-receiveddate'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsReceivedDate = !this.currentBoard.allowsReceivedDate;
|
||||
this.currentBoard.setAllowsReceivedDate(this.currentBoard.allowsReceivedDate);
|
||||
$(`.js-field-has-receiveddate ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsReceivedDate,
|
||||
);
|
||||
$('.js-field-has-receiveddate').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsReceivedDate,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-startdate'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsStartDate = !this.currentBoard.allowsStartDate;
|
||||
this.currentBoard.setAllowsStartDate(this.currentBoard.allowsStartDate);
|
||||
$(`.js-field-has-startdate ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsStartDate,
|
||||
);
|
||||
$('.js-field-has-startdate').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsStartDate,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-enddate'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsEndDate = !this.currentBoard.allowsEndDate;
|
||||
this.currentBoard.setAllowsEndDate(this.currentBoard.allowsEndDate);
|
||||
$(`.js-field-has-enddate ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsEndDate,
|
||||
);
|
||||
$('.js-field-has-enddate').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsEndDate,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-duedate'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsDueDate = !this.currentBoard.allowsDueDate;
|
||||
this.currentBoard.setAllowsDueDate(this.currentBoard.allowsDueDate);
|
||||
$(`.js-field-has-duedate ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDueDate,
|
||||
);
|
||||
$('.js-field-has-duedate').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDueDate,
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('boardDateSettingsPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.error = new ReactiveVar('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue