mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add ability to edit swimlane name
This commit is contained in:
parent
42bc905c16
commit
3414cb84ad
3 changed files with 32 additions and 4 deletions
15
client/components/swimlanes/swimlaneHeader.jade
Normal file
15
client/components/swimlanes/swimlaneHeader.jade
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
template(name="swimlaneHeader")
|
||||||
|
.swimlane-header-wrap
|
||||||
|
+inlinedForm
|
||||||
|
+editSwimlaneTitleForm
|
||||||
|
else
|
||||||
|
.swimlane-header(
|
||||||
|
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
||||||
|
= title
|
||||||
|
|
||||||
|
template(name="editSwimlaneTitleForm")
|
||||||
|
.list-composer
|
||||||
|
input.list-name-input.full-line(type="text" value=title autofocus)
|
||||||
|
.edit-controls.clearfix
|
||||||
|
button.primary.confirm(type="submit") {{_ 'save'}}
|
||||||
|
a.fa.fa-times-thin.js-close-inlined-form
|
||||||
16
client/components/swimlanes/swimlaneHeader.js
Normal file
16
client/components/swimlanes/swimlaneHeader.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
BlazeComponent.extendComponent({
|
||||||
|
editTitle(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
const newTitle = this.childComponents('inlinedForm')[0].getValue().trim();
|
||||||
|
const swimlane = this.currentData();
|
||||||
|
if (newTitle) {
|
||||||
|
swimlane.rename(newTitle.trim());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
events() {
|
||||||
|
return [{
|
||||||
|
submit: this.editTitle,
|
||||||
|
}];
|
||||||
|
},
|
||||||
|
}).register('swimlaneHeader');
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
template(name="swimlane")
|
template(name="swimlane")
|
||||||
.swimlane.js-lists
|
.swimlane.js-lists
|
||||||
.swimlane-header-wrap
|
+swimlaneHeader
|
||||||
.swimlane-header
|
|
||||||
= title
|
|
||||||
if isMiniScreen
|
if isMiniScreen
|
||||||
if currentList
|
if currentList
|
||||||
+list(currentList)
|
+list(currentList)
|
||||||
|
|
@ -17,7 +15,6 @@ template(name="swimlane")
|
||||||
if currentCardIsInThisList _id ../_id
|
if currentCardIsInThisList _id ../_id
|
||||||
+cardDetails(currentCard)
|
+cardDetails(currentCard)
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
+addListForm
|
|
||||||
+addListAndSwimlaneForm
|
+addListAndSwimlaneForm
|
||||||
|
|
||||||
template(name="listsGroup")
|
template(name="listsGroup")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue