summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
Diffstat (limited to 'client/components')
-rw-r--r--client/components/swimlanes/swimlaneHeader.jade15
-rw-r--r--client/components/swimlanes/swimlaneHeader.js16
-rw-r--r--client/components/swimlanes/swimlanes.jade5
3 files changed, 32 insertions, 4 deletions
diff --git a/client/components/swimlanes/swimlaneHeader.jade b/client/components/swimlanes/swimlaneHeader.jade
new file mode 100644
index 00000000..17eb3ea4
--- /dev/null
+++ b/client/components/swimlanes/swimlaneHeader.jade
@@ -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
diff --git a/client/components/swimlanes/swimlaneHeader.js b/client/components/swimlanes/swimlaneHeader.js
new file mode 100644
index 00000000..b3f93536
--- /dev/null
+++ b/client/components/swimlanes/swimlaneHeader.js
@@ -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');
diff --git a/client/components/swimlanes/swimlanes.jade b/client/components/swimlanes/swimlanes.jade
index 765f6d49..6fc24d4c 100644
--- a/client/components/swimlanes/swimlanes.jade
+++ b/client/components/swimlanes/swimlanes.jade
@@ -1,8 +1,6 @@
template(name="swimlane")
.swimlane.js-lists
- .swimlane-header-wrap
- .swimlane-header
- = title
+ +swimlaneHeader
if isMiniScreen
if currentList
+list(currentList)
@@ -17,7 +15,6 @@ template(name="swimlane")
if currentCardIsInThisList _id ../_id
+cardDetails(currentCard)
if currentUser.isBoardMember
- +addListForm
+addListAndSwimlaneForm
template(name="listsGroup")