Skip to content

Commit

Permalink
Fix popup title
Browse files Browse the repository at this point in the history
Add element title modification
  • Loading branch information
andresmanelli committed Feb 27, 2019
1 parent abb7108 commit 888e1ad
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions client/components/lists/listBody.jade
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions client/components/lists/listBody.js
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion i18n/en.i18n.json
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions models/boards.js
Expand Up @@ -326,8 +326,7 @@ Boards.helpers({
archived: false,
}).forEach((swimlane) => {
swimlane.type = 'swimlane';
swimlane.boardId = _id;
swimlane.copy(oldId);
swimlane.copy(_id);
});
},
/**
Expand Down

0 comments on commit 888e1ad

Please sign in to comment.