mirror of
https://github.com/wekan/wekan.git
synced 2026-02-11 02:34:20 +01:00
Fix popup title
Add element title modification
This commit is contained in:
parent
abb7108321
commit
888e1ad5d3
4 changed files with 11 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue