mirror of
https://github.com/wekan/wekan.git
synced 2026-02-15 12:38:06 +01:00
Use Utils#getCurrentCard() everywhere in the code
This commit is contained in:
parent
7a6cfcb498
commit
fdf40f4584
10 changed files with 21 additions and 21 deletions
|
|
@ -806,7 +806,7 @@ Template.moveCardPopup.events({
|
|||
'click .js-done'() {
|
||||
// XXX We should *not* get the currentCard from the global state, but
|
||||
// instead from a “component” state.
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const card = Utils.getCurrentCard();
|
||||
const bSelect = $('.js-select-boards')[0];
|
||||
let boardId;
|
||||
// if we are a worker, we won't have a board select so we just use the
|
||||
|
|
@ -864,7 +864,7 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Template.copyCardPopup.events({
|
||||
'click .js-done'() {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const card = Utils.getCurrentCard();
|
||||
const lSelect = $('.js-select-lists')[0];
|
||||
const listId = lSelect.options[lSelect.selectedIndex].value;
|
||||
const slSelect = $('.js-select-swimlanes')[0];
|
||||
|
|
@ -893,7 +893,7 @@ Template.copyCardPopup.events({
|
|||
|
||||
Template.convertChecklistItemToCardPopup.events({
|
||||
'click .js-done'() {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const card = Utils.getCurrentCard();
|
||||
const lSelect = $('.js-select-lists')[0];
|
||||
const listId = lSelect.options[lSelect.selectedIndex].value;
|
||||
const slSelect = $('.js-select-swimlanes')[0];
|
||||
|
|
@ -921,7 +921,7 @@ Template.convertChecklistItemToCardPopup.events({
|
|||
|
||||
Template.copyChecklistToManyCardsPopup.events({
|
||||
'click .js-done'() {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const card = Utils.getCurrentCard();
|
||||
const oldId = card._id;
|
||||
card._id = null;
|
||||
const lSelect = $('.js-select-lists')[0];
|
||||
|
|
@ -1040,7 +1040,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
cards() {
|
||||
const currentId = Session.get('currentCard');
|
||||
const currentId = Utils.getCurrentCardId();
|
||||
if (this.parentBoard.get()) {
|
||||
return Cards.find({
|
||||
boardId: this.parentBoard.get(),
|
||||
|
|
@ -1706,7 +1706,7 @@ Template.cardAssigneesPopup.onCreated(function () {
|
|||
|
||||
Template.cardAssigneesPopup.events({
|
||||
'click .js-select-assignee'(event) {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const card = Utils.getCurrentCard();
|
||||
const assigneeId = this.userId;
|
||||
card.toggleAssignee(assigneeId);
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue