summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/swimlanes')
-rw-r--r--client/components/swimlanes/swimlaneHeader.jade2
-rw-r--r--client/components/swimlanes/swimlaneHeader.js6
-rw-r--r--client/components/swimlanes/swimlanes.jade18
-rw-r--r--client/components/swimlanes/swimlanes.js35
-rw-r--r--client/components/swimlanes/swimlanes.styl8
5 files changed, 52 insertions, 17 deletions
diff --git a/client/components/swimlanes/swimlaneHeader.jade b/client/components/swimlanes/swimlaneHeader.jade
index 8c6aa5a3..fb6ef21d 100644
--- a/client/components/swimlanes/swimlaneHeader.jade
+++ b/client/components/swimlanes/swimlaneHeader.jade
@@ -16,6 +16,8 @@ template(name="swimlaneFixedHeader")
unless currentUser.isCommentOnly
a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon
a.fa.fa-navicon.js-open-swimlane-menu
+ if showDesktopDragHandles
+ a.swimlane-header-menu-handle.handle.fa.fa-arrows.js-swimlane-header-handle
template(name="editSwimlaneTitleForm")
.list-composer
diff --git a/client/components/swimlanes/swimlaneHeader.js b/client/components/swimlanes/swimlaneHeader.js
index ee21d100..6f8029fd 100644
--- a/client/components/swimlanes/swimlaneHeader.js
+++ b/client/components/swimlanes/swimlaneHeader.js
@@ -28,6 +28,12 @@ BlazeComponent.extendComponent({
},
}).register('swimlaneHeader');
+Template.swimlaneHeader.helpers({
+ showDesktopDragHandles() {
+ return Meteor.user().hasShowDesktopDragHandles();
+ },
+});
+
Template.swimlaneActionPopup.events({
'click .js-set-swimlane-color': Popup.open('setSwimlaneColor'),
'click .js-close-swimlane'(event) {
diff --git a/client/components/swimlanes/swimlanes.jade b/client/components/swimlanes/swimlanes.jade
index 3ad43777..98af6d54 100644
--- a/client/components/swimlanes/swimlanes.jade
+++ b/client/components/swimlanes/swimlanes.jade
@@ -12,13 +12,13 @@ template(name="swimlane")
unless currentUser.isCommentOnly
+addListForm
else
+ if currentUser.isBoardMember
+ unless currentUser.isCommentOnly
+ +addListForm
each lists
+list(this)
if currentCardIsInThisList _id ../_id
+cardDetails(currentCard)
- if currentUser.isBoardMember
- unless currentUser.isCommentOnly
- +addListForm
template(name="listsGroup")
.swimlane.list-group.js-lists
@@ -26,23 +26,23 @@ template(name="listsGroup")
if currentList
+list(currentList)
else
- each lists
- +miniList(this)
if currentUser.isBoardMember
unless currentUser.isCommentOnly
+addListForm
+ each lists
+ +miniList(this)
else
+ if currentUser.isBoardMember
+ unless currentUser.isCommentOnly
+ +addListForm
each lists
if visible this
+list(this)
if currentCardIsInThisList _id null
+cardDetails(currentCard)
- if currentUser.isBoardMember
- unless currentUser.isCommentOnly
- +addListForm
template(name="addListForm")
- .list.list-composer.js-list-composer
+ .list.list-composer.js-list-composer(class="{{#if isMiniScreen}}mini-list{{/if}}")
.list-header-add
+inlinedForm(autoclose=false)
input.list-name-input.full-line(type="text" placeholder="{{_ 'add-list'}}"
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index e0857003..8faad870 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -53,10 +53,21 @@ function initSortable(boardComponent, $listsDom) {
},
};
+ if (Utils.isMiniScreen) {
+ $listsDom.sortable({
+ handle: '.js-list-handle',
+ });
+ }
+
+ if (!Utils.isMiniScreen && showDesktopDragHandles) {
+ $listsDom.sortable({
+ handle: '.js-list-header',
+ });
+ }
+
$listsDom.sortable({
tolerance: 'pointer',
helper: 'clone',
- handle: '.js-list-header',
items: '.js-list:not(.js-list-composer)',
placeholder: 'list placeholder',
distance: 7,
@@ -151,13 +162,13 @@ BlazeComponent.extendComponent({
// define a list of elements in which we disable the dragging because
// the user will legitimately expect to be able to select some text with
// his mouse.
- const noDragInside = [
- 'a',
- 'input',
- 'textarea',
- 'p',
- '.js-list-header',
- ];
+
+ const noDragInside = ['a', 'input', 'textarea', 'p'].concat(
+ Util.isMiniScreen || (!Util.isMiniScreen && showDesktopDragHandles)
+ ? ['.js-list-handle', '.js-swimlane-header-handle']
+ : ['.js-list-header'],
+ );
+
if (
$(evt.target).closest(noDragInside.join(',')).length === 0 &&
this.$('.swimlane').prop('clientHeight') > evt.offsetY
@@ -233,6 +244,9 @@ BlazeComponent.extendComponent({
}).register('addListForm');
Template.swimlane.helpers({
+ showDesktopDragHandles() {
+ return Meteor.user().hasShowDesktopDragHandles();
+ },
canSeeAddList() {
return (
Meteor.user() &&
@@ -253,6 +267,11 @@ BlazeComponent.extendComponent({
return false;
}
}
+ if (Filter.lists._isActive()) {
+ if (!list.title.match(Filter.lists.getRegexSelector())) {
+ return false;
+ }
+ }
if (Filter.hideEmpty.isSelected()) {
const swimlaneId = this.parentComponent()
.parentComponent()
diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl
index 1056e1e3..503091ee 100644
--- a/client/components/swimlanes/swimlanes.styl
+++ b/client/components/swimlanes/swimlanes.styl
@@ -50,6 +50,14 @@
margin-left: 5px
margin-right: 10px
+ .swimlane-header-menu-handle
+ position: absolute
+ padding: 7px
+ top: 50%
+ transform: translateY(-50%)
+ left: 300px
+ font-size: 18px
+
.list-group
height: 100%