Skip to content

Commit dd88eb4

Browse files
committed
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.
1 parent 5fa0821 commit dd88eb4

File tree

5 files changed

+34
-62
lines changed

5 files changed

+34
-62
lines changed

client/components/boards/boardBody.jade

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ template(name="boardBody")
2323
if isViewSwimlanes
2424
each currentBoard.swimlanes
2525
+swimlane(this)
26+
if currentUser.isBoardMember
27+
+addSwimlaneForm
2628
if isViewLists
2729
+listsGroup
2830
if isViewCalendar

client/components/lists/list.styl

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// transparent, because that won't work during a list drag.
1111
background: darken(white, 13%)
1212
border-left: 1px solid darken(white, 20%)
13-
border-bottom: 1px solid #CCC
1413
padding: 0
1514
float: left
1615

client/components/swimlanes/swimlanes.jade

+13-23
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
template(name="swimlane")
22
.swimlane.js-lists.js-swimlane
33
+swimlaneHeader
4-
if isMiniScreen
5-
if currentList
6-
+list(currentList)
4+
.swimlane.list-group.js-lists
5+
if isMiniScreen
6+
if currentList
7+
+list(currentList)
8+
else
9+
each currentBoard.lists
10+
+miniList(this)
11+
if currentUser.isBoardMember
12+
+addListForm
713
else
814
each currentBoard.lists
9-
+miniList(this)
15+
+list(this)
16+
if currentCardIsInThisList _id ../_id
17+
+cardDetails(currentCard)
1018
if currentUser.isBoardMember
1119
+addListForm
12-
else
13-
each currentBoard.lists
14-
+list(this)
15-
if currentCardIsInThisList _id ../_id
16-
+cardDetails(currentCard)
17-
if currentUser.isBoardMember
18-
+addListAndSwimlaneForm
1920

2021
template(name="listsGroup")
2122
.swimlane.list-group.js-lists
@@ -35,19 +36,8 @@ template(name="listsGroup")
3536
if currentUser.isBoardMember
3637
+addListForm
3738

38-
template(name="addListAndSwimlaneForm")
39+
template(name="addSwimlaneForm")
3940
.list.list-composer.js-list-composer
40-
.list-header
41-
+inlinedForm(autoclose=false)
42-
input.list-name-input.full-line(type="text" placeholder="{{_ 'add-list'}}"
43-
autocomplete="off" autofocus)
44-
.edit-controls.clearfix
45-
button.primary.confirm(type="submit") {{_ 'save'}}
46-
a.fa.fa-times-thin.js-close-inlined-form
47-
else
48-
a.open-list-composer.js-open-inlined-form
49-
i.fa.fa-plus
50-
| {{_ 'add-list'}}
5141
.list-header
5242
+inlinedForm(autoclose=false)
5343
input.swimlane-name-input.full-line(type="text" placeholder="{{_ 'add-swimlane'}}"

client/components/swimlanes/swimlanes.js

+12-27
Original file line numberDiff line numberDiff line change
@@ -185,37 +185,22 @@ BlazeComponent.extendComponent({
185185
return [{
186186
submit(evt) {
187187
evt.preventDefault();
188-
let titleInput = this.find('.list-name-input');
189-
if (titleInput) {
190-
const title = titleInput.value.trim();
191-
if (title) {
192-
Lists.insert({
193-
title,
194-
boardId: Session.get('currentBoard'),
195-
sort: $('.list').length,
196-
});
197-
198-
titleInput.value = '';
199-
titleInput.focus();
200-
}
201-
} else {
202-
titleInput = this.find('.swimlane-name-input');
203-
const title = titleInput.value.trim();
204-
if (title) {
205-
Swimlanes.insert({
206-
title,
207-
boardId: Session.get('currentBoard'),
208-
sort: $('.swimlane').length,
209-
});
210-
211-
titleInput.value = '';
212-
titleInput.focus();
213-
}
188+
let titleInput = this.find('.swimlane-name-input');
189+
const title = titleInput.value.trim();
190+
if (title) {
191+
Swimlanes.insert({
192+
title,
193+
boardId: Session.get('currentBoard'),
194+
sort: $('.swimlane').length,
195+
});
196+
197+
titleInput.value = '';
198+
titleInput.focus();
214199
}
215200
},
216201
}];
217202
},
218-
}).register('addListAndSwimlaneForm');
203+
}).register('addSwimlaneForm');
219204

220205
Template.swimlane.helpers({
221206
canSeeAddList() {

client/components/swimlanes/swimlanes.styl

+7-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// transparent, because that won't work during a swimlane drag.
66
background: darken(white, 13%)
77
display: flex
8-
flex-direction: row
8+
flex-direction: column
99
overflow: 0;
1010
max-height: 100%
1111

@@ -27,20 +27,15 @@
2727
.swimlane-header-wrap
2828
display: flex;
2929
flex-direction: row;
30-
flex: 0 0 50px;
31-
padding-bottom: 30px;
32-
border-bottom: 1px solid #CCC
30+
flex: 0 0 24px;
31+
background-color: #ccc;
3332

3433
.swimlane-header
35-
-ms-writing-mode: tb-rl;
36-
writing-mode: vertical-rl;
37-
transform: rotate(180deg);
3834
font-size: 14px;
39-
line-height: 50px;
40-
margin-top: 50px;
35+
padding: 5px 5px
4136
font-weight: bold;
4237
min-height: 9px;
43-
width: 50px;
38+
width: 100%;
4439
overflow: hidden;
4540
-o-text-overflow: ellipsis;
4641
text-overflow: ellipsis;
@@ -49,7 +44,8 @@
4944

5045
.swimlane-header-menu
5146
position: absolute
52-
padding: 20px 20px
47+
padding: 5px 5px
5348

5449
.list-group
50+
flex-direction: row
5551
height: 100%

0 commit comments

Comments
 (0)