mirror of
https://github.com/wekan/wekan.git
synced 2026-03-07 22:22:33 +01:00
Merge pull request #4345 from mfilser/fix_copy_move_card
Fix copy move card
This commit is contained in:
commit
5f807b80fe
5 changed files with 51 additions and 3 deletions
|
|
@ -234,6 +234,15 @@ template(name="cardDetails")
|
||||||
+viewer
|
+viewer
|
||||||
= sort
|
= sort
|
||||||
|
|
||||||
|
if currentBoard.allowsShowLists
|
||||||
|
.card-details-item.card-details-show-lists
|
||||||
|
h3.card-details-item-title
|
||||||
|
i.fa.fa-list
|
||||||
|
| {{_ 'list'}}
|
||||||
|
select.js-select-card-details-lists(disabled="{{#unless canModifyCard}}disabled{{/unless}}")
|
||||||
|
each currentBoard.lists
|
||||||
|
option(value="{{_id}}" selected="{{#if isCurrentListId _id}}selected{{/if}}") {{title}}
|
||||||
|
|
||||||
//.card-details-items
|
//.card-details-items
|
||||||
if getSpentTime
|
if getSpentTime
|
||||||
.card-details-item.card-details-item-spent
|
.card-details-item.card-details-item-spent
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,15 @@ BlazeComponent.extendComponent({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** returns if the list id is the current list id
|
||||||
|
* @param listId list id to check
|
||||||
|
* @return is the list id the current list id ?
|
||||||
|
*/
|
||||||
|
isCurrentListId(listId) {
|
||||||
|
const ret = this.data().listId == listId;
|
||||||
|
return ret;
|
||||||
|
},
|
||||||
|
|
||||||
onRendered() {
|
onRendered() {
|
||||||
if (Meteor.settings.public.CARD_OPENED_WEBHOOK_ENABLED) {
|
if (Meteor.settings.public.CARD_OPENED_WEBHOOK_ENABLED) {
|
||||||
// Send Webhook but not create Activities records ---
|
// Send Webhook but not create Activities records ---
|
||||||
|
|
@ -379,6 +388,12 @@ BlazeComponent.extendComponent({
|
||||||
card.move(card.boardId, card.swimlaneId, card.listId, sort);
|
card.move(card.boardId, card.swimlaneId, card.listId, sort);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'change .js-select-card-details-lists'(event) {
|
||||||
|
let card = this.data();
|
||||||
|
const listSelect = this.$('.js-select-card-details-lists')[0];
|
||||||
|
const listId = listSelect.options[listSelect.selectedIndex].value;
|
||||||
|
card.move(card.boardId, card.swimlaneId, listId, card.sort);
|
||||||
|
},
|
||||||
'click .js-go-to-linked-card'() {
|
'click .js-go-to-linked-card'() {
|
||||||
Utils.goCardId(this.data().linkedId);
|
Utils.goCardId(this.data().linkedId);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -211,13 +211,13 @@ avatar-radius = 50%
|
||||||
|
|
||||||
.card-details-item
|
.card-details-item
|
||||||
margin-right: 0.5em
|
margin-right: 0.5em
|
||||||
|
flex-grow: 1
|
||||||
&:last-child
|
&:last-child
|
||||||
margin-right: 0
|
margin-right: 0
|
||||||
&.card-details-item-labels
|
&.card-details-item-labels
|
||||||
display: block
|
display: block
|
||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
max-width: 95%
|
max-width: 95%
|
||||||
flex-grow: 1
|
|
||||||
&.card-details-item-members,
|
&.card-details-item-members,
|
||||||
&.card-details-item-assignees,
|
&.card-details-item-assignees,
|
||||||
&.card-details-item-customfield,
|
&.card-details-item-customfield,
|
||||||
|
|
@ -225,7 +225,6 @@ avatar-radius = 50%
|
||||||
display: block
|
display: block
|
||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
max-width: 36%
|
max-width: 36%
|
||||||
flex-grow: 1
|
|
||||||
&.card-details-item-creator,
|
&.card-details-item-creator,
|
||||||
&.card-details-item-received,
|
&.card-details-item-received,
|
||||||
&.card-details-item-start,
|
&.card-details-item-start,
|
||||||
|
|
@ -234,7 +233,6 @@ avatar-radius = 50%
|
||||||
display: block
|
display: block
|
||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
max-width: 28%
|
max-width: 28%
|
||||||
flex-grow: 1
|
|
||||||
&.custom-fields
|
&.custom-fields
|
||||||
padding-left: 10px
|
padding-left: 10px
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,12 @@ template(name="boardCardSettingsPopup")
|
||||||
span
|
span
|
||||||
i.fa.fa-sort
|
i.fa.fa-sort
|
||||||
| {{_ 'card-sorting-by-number'}}
|
| {{_ 'card-sorting-by-number'}}
|
||||||
|
div.check-div
|
||||||
|
a.flex.js-field-has-card-show-lists(class="{{#if allowsShowLists}}is-checked{{/if}}")
|
||||||
|
.materialCheckBox(class="{{#if allowsShowLists}}is-checked{{/if}}")
|
||||||
|
span
|
||||||
|
i.fa.fa-list
|
||||||
|
| {{_ 'card-show-lists'}}
|
||||||
div.check-div
|
div.check-div
|
||||||
a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}")
|
a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}")
|
||||||
.materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}")
|
.materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}")
|
||||||
|
|
|
||||||
|
|
@ -827,6 +827,10 @@ BlazeComponent.extendComponent({
|
||||||
return this.currentBoard.allowsCardSortingByNumber;
|
return this.currentBoard.allowsCardSortingByNumber;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
allowsShowLists() {
|
||||||
|
return this.currentBoard.allowsShowLists;
|
||||||
|
},
|
||||||
|
|
||||||
allowsLabels() {
|
allowsLabels() {
|
||||||
return this.currentBoard.allowsLabels;
|
return this.currentBoard.allowsLabels;
|
||||||
},
|
},
|
||||||
|
|
@ -1061,6 +1065,22 @@ BlazeComponent.extendComponent({
|
||||||
this.currentBoard.allowsCardSortingByNumber,
|
this.currentBoard.allowsCardSortingByNumber,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
'click .js-field-has-card-show-lists'(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
this.currentBoard.allowsShowLists = !this.currentBoard
|
||||||
|
.allowsShowLists;
|
||||||
|
this.currentBoard.setAllowsShowLists(
|
||||||
|
this.currentBoard.allowsShowLists,
|
||||||
|
);
|
||||||
|
$(`.js-field-has-card-show-lists ${MCB}`).toggleClass(
|
||||||
|
CKCLS,
|
||||||
|
this.currentBoard.allowsShowLists,
|
||||||
|
);
|
||||||
|
$('.js-field-has-card-show-lists').toggleClass(
|
||||||
|
CKCLS,
|
||||||
|
this.currentBoard.allowsShowLists,
|
||||||
|
);
|
||||||
|
},
|
||||||
'click .js-field-has-labels'(evt) {
|
'click .js-field-has-labels'(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
this.currentBoard.allowsLabels = !this.currentBoard.allowsLabels;
|
this.currentBoard.allowsLabels = !this.currentBoard.allowsLabels;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue