summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes/swimlanes.js
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-01-24 12:09:23 +0100
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-01-24 20:50:42 +0100
commitdd88eb4cc191a06f7eb84213b026dfb93546f245 (patch)
treee78486f56d862c0aabd1f0c8918a1c483d15dfe9 /client/components/swimlanes/swimlanes.js
parent5fa0821e078ff03647d23909517ddf6984f8baf5 (diff)
downloadwekan-dd88eb4cc191a06f7eb84213b026dfb93546f245.tar.gz
wekan-dd88eb4cc191a06f7eb84213b026dfb93546f245.tar.bz2
wekan-dd88eb4cc191a06f7eb84213b026dfb93546f245.zip
swimlane-view: have the swimlane header horizontal
This allows to use the header as a separator between swimlanes. This will be most useful when we can set the background color of these headers.
Diffstat (limited to 'client/components/swimlanes/swimlanes.js')
-rw-r--r--client/components/swimlanes/swimlanes.js39
1 files changed, 12 insertions, 27 deletions
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index 865895a9..a7743ec7 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -185,37 +185,22 @@ BlazeComponent.extendComponent({
return [{
submit(evt) {
evt.preventDefault();
- let titleInput = this.find('.list-name-input');
- if (titleInput) {
- const title = titleInput.value.trim();
- if (title) {
- Lists.insert({
- title,
- boardId: Session.get('currentBoard'),
- sort: $('.list').length,
- });
-
- titleInput.value = '';
- titleInput.focus();
- }
- } else {
- titleInput = this.find('.swimlane-name-input');
- const title = titleInput.value.trim();
- if (title) {
- Swimlanes.insert({
- title,
- boardId: Session.get('currentBoard'),
- sort: $('.swimlane').length,
- });
-
- titleInput.value = '';
- titleInput.focus();
- }
+ let titleInput = this.find('.swimlane-name-input');
+ const title = titleInput.value.trim();
+ if (title) {
+ Swimlanes.insert({
+ title,
+ boardId: Session.get('currentBoard'),
+ sort: $('.swimlane').length,
+ });
+
+ titleInput.value = '';
+ titleInput.focus();
}
},
}];
},
-}).register('addListAndSwimlaneForm');
+}).register('addSwimlaneForm');
Template.swimlane.helpers({
canSeeAddList() {