diff options
-rw-r--r-- | client/components/lists/listBody.jade | 4 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 5 | ||||
-rw-r--r-- | i18n/en.i18n.json | 2 | ||||
-rw-r--r-- | models/boards.js | 3 |
4 files changed, 11 insertions, 3 deletions
diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade index 9a9c322a..876b43d6 100644 --- a/client/components/lists/listBody.jade +++ b/client/components/lists/listBody.jade @@ -90,6 +90,10 @@ template(name="linkCardPopup") input.primary.confirm.js-done(type="button" value="{{_ 'link'}}") template(name="searchElementPopup") + form + label + | {{_ 'title'}} + input.js-element-title(type="text" placeholder="{{_ 'title'}}" autofocus required) unless isTemplateSearch label {{_ 'boards'}}: .link-board-wrapper diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 598f2130..7d767011 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -616,7 +616,11 @@ BlazeComponent.extendComponent({ }, 'click .js-minicard'(evt) { // 0. Common + const title = $('.js-element-title').val().trim(); + if (!title) + return; const element = Blaze.getData(evt.currentTarget); + element.title = title; let _id = ''; if (!this.isTemplateSearch || this.isCardTemplateSearch) { // Card insertion @@ -648,6 +652,7 @@ BlazeComponent.extendComponent({ board = Boards.findOne(element.linkedId); board.sort = Boards.find({archived: false}).count(); board.type = 'board'; + board.title = element.title; delete board.slug; _id = board.copy(); } diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 94666c16..97973f6e 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -207,7 +207,7 @@ "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?", "copy-card-link-to-clipboard": "Copy card link to clipboard", "linkCardPopup-title": "Link Card", - "searchCardPopup-title": "Search Card", + "searchElementPopup-title": "Search", "copyCardPopup-title": "Copy Card", "copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards", "copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format", diff --git a/models/boards.js b/models/boards.js index 0db2e48e..9a71ede8 100644 --- a/models/boards.js +++ b/models/boards.js @@ -326,8 +326,7 @@ Boards.helpers({ archived: false, }).forEach((swimlane) => { swimlane.type = 'swimlane'; - swimlane.boardId = _id; - swimlane.copy(oldId); + swimlane.copy(_id); }); }, /** |