summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-09-17 01:39:10 +0300
committerLauri Ojansivu <x@xet7.org>2019-09-17 01:39:10 +0300
commit03d7fc02ecc90690e1282d417f35b7e4561af066 (patch)
treefa11364240de3a1370d034dd9202413f471a6f48 /client/components/lists
parentddd00a27a97b047ca854ece80d8bc60021784f3f (diff)
downloadwekan-03d7fc02ecc90690e1282d417f35b7e4561af066.tar.gz
wekan-03d7fc02ecc90690e1282d417f35b7e4561af066.tar.bz2
wekan-03d7fc02ecc90690e1282d417f35b7e4561af066.zip
Drag handles. In Progress.
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js14
-rw-r--r--client/components/lists/list.styl22
-rw-r--r--client/components/lists/listHeader.jade4
-rw-r--r--client/components/lists/listHeader.js6
4 files changed, 40 insertions, 6 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index c2b39be9..b7b8b2e0 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -31,7 +31,13 @@ BlazeComponent.extendComponent({
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
const $cards = this.$('.js-minicards');
- if (window.matchMedia('(max-width: 1199px)').matches) {
+ if (Utils.isMiniScreen) {
+ $('.js-minicards').sortable({
+ handle: '.handle',
+ });
+ }
+
+ if (!Utils.isMiniScreen && showDesktopDragHandles) {
$('.js-minicards').sortable({
handle: '.handle',
});
@@ -155,6 +161,12 @@ BlazeComponent.extendComponent({
},
}).register('list');
+Template.list.helpers({
+ showDesktopDragHandles() {
+ return Meteor.user().hasShowDesktopDragHandles();
+ },
+});
+
Template.miniList.events({
'click .js-select-list'() {
const listId = this._id;
diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl
index 81938c1a..459481ea 100644
--- a/client/components/lists/list.styl
+++ b/client/components/lists/list.styl
@@ -84,17 +84,16 @@
padding-left: 10px
color: #a6a6a6
-
.list-header-menu
position: absolute
padding: 27px 19px
margin-top: 1px
top: -7px
- right: -7px
+ right: 3px
.list-header-plus-icon
color: #a6a6a6
- margin-right: 10px
+ margin-right: 15px
.highlight
color: #ce1414
@@ -165,7 +164,12 @@
@media screen and (max-width: 800px)
.list-header-menu
- margin-right: 30px
+ position: absolute
+ padding: 27px 19px
+ margin-top: 1px
+ top: -7px
+ margin-right: 50px
+ right: -3px
.mini-list
flex: 0 0 60px
@@ -221,9 +225,17 @@
padding: 7px
top: 50%
transform: translateY(-50%)
- right: 17px
+ margin-right: 27px
font-size: 20px
+ .list-header-menu-handle
+ position: absolute
+ padding: 7px
+ top: 50%
+ transform: translateY(-50%)
+ right: 10px
+ font-size: 24px
+
.link-board-wrapper
display: flex
align-items: baseline
diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade
index f930e57a..6a61a66f 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -29,8 +29,10 @@ template(name="listHeader")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon
a.fa.fa-navicon.js-open-list-menu
+ a.list-header-menu-handle.handle.fa.fa-arrows.js-list-handle
else
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
+ a.list-header-menu-handle.handle.fa.fa-arrows.js-list-handle
else if currentUser.isBoardMember
if isWatching
i.list-header-watch-icon.fa.fa-eye
@@ -39,6 +41,8 @@ template(name="listHeader")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon
a.fa.fa-navicon.js-open-list-menu
+ if showDesktopDragHandles
+ a.list-header-menu-handle.handle.fa.fa-arrows.js-list-handle
template(name="editListTitleForm")
.list-composer
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index e8a82499..5b7232cd 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -80,6 +80,12 @@ BlazeComponent.extendComponent({
},
}).register('listHeader');
+Template.listHeader.helpers({
+ showDesktopDragHandles() {
+ return Meteor.user().hasShowDesktopDragHandles();
+ },
+});
+
Template.listActionPopup.helpers({
isWipLimitEnabled() {
return Template.currentData().getWipLimit('enabled');