summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-02-27 21:32:28 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-02-27 21:50:08 +0100
commit888e1ad5d3e32be53283aa32198057f669f3d706 (patch)
treebfad5b37287aecc378d13089ac1877296cd51ba5 /client/components
parentabb71083215462d91b084c4de13af0b130638e4d (diff)
downloadwekan-888e1ad5d3e32be53283aa32198057f669f3d706.tar.gz
wekan-888e1ad5d3e32be53283aa32198057f669f3d706.tar.bz2
wekan-888e1ad5d3e32be53283aa32198057f669f3d706.zip
Fix popup title
Add element title modification
Diffstat (limited to 'client/components')
-rw-r--r--client/components/lists/listBody.jade4
-rw-r--r--client/components/lists/listBody.js5
2 files changed, 9 insertions, 0 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();
}