summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-10-03 06:03:11 +0300
committerLauri Ojansivu <x@xet7.org>2019-10-03 06:03:11 +0300
commitf3b858ca212bdce571b56325eaa205feda60dca2 (patch)
tree9bf0f7057dbc7af33d16ca2aec6e3383917f6dda /client/components/lists
parent5bc355f9a5e78df4c19764fdc4a343a46af4fdf8 (diff)
downloadwekan-f3b858ca212bdce571b56325eaa205feda60dca2.tar.gz
wekan-f3b858ca212bdce571b56325eaa205feda60dca2.tar.bz2
wekan-f3b858ca212bdce571b56325eaa205feda60dca2.zip
Revert drag handle changes.
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js34
-rw-r--r--client/components/lists/list.styl34
-rw-r--r--client/components/lists/listHeader.jade5
-rw-r--r--client/components/lists/listHeader.js6
4 files changed, 11 insertions, 68 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index fa70179b..bde43520 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -31,10 +31,15 @@ BlazeComponent.extendComponent({
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
const $cards = this.$('.js-minicards');
+ if (Utils.isMiniScreen()) {
+ $('.js-minicards').sortable({
+ handle: '.handle',
+ });
+ }
+
$cards.sortable({
connectWith: '.js-minicards:not(.js-list-full)',
tolerance: 'pointer',
- handle: 'list-header',
appendTo: '.board-canvas',
helper(evt, item) {
const helper = item.clone();
@@ -120,21 +125,6 @@ BlazeComponent.extendComponent({
// Disable drag-dropping if the current user is not a board member or is comment only
this.autorun(() => {
$cards.sortable('option', 'disabled', !userIsMember());
- if (Utils.isMiniScreen()) {
- this.$('.js-minicards').sortable({
- handle: '.handle',
- });
- } else {
- if (Meteor.user().hasShowDesktopDragHandles()) {
- this.$('.js-minicards').sortable({
- handle: '.handle',
- });
- } else {
- this.$('.js-minicards').sortable({
- handle: '.minicard-title',
- });
- }
- }
});
// We want to re-run this function any time a card is added.
@@ -165,21 +155,9 @@ BlazeComponent.extendComponent({
},
}).register('list');
-Template.list.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
-
Template.miniList.events({
'click .js-select-list'() {
const listId = this._id;
Session.set('currentList', listId);
},
});
-
-Template.miniList.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl
index 8523362f..81938c1a 100644
--- a/client/components/lists/list.styl
+++ b/client/components/lists/list.styl
@@ -84,16 +84,17 @@
padding-left: 10px
color: #a6a6a6
+
.list-header-menu
position: absolute
padding: 27px 19px
margin-top: 1px
top: -7px
- right: 3px
+ right: -7px
.list-header-plus-icon
color: #a6a6a6
- margin-right: 15px
+ margin-right: 10px
.highlight
color: #ce1414
@@ -164,16 +165,7 @@
@media screen and (max-width: 800px)
.list-header-menu
- position: absolute
- padding: 27px 19px
- margin-top: 1px
- top: -7px
- margin-right: 50px
- right: -3px
-
- .list-header
- .list-header-name
- margin-left: 1.4rem
+ margin-right: 30px
.mini-list
flex: 0 0 60px
@@ -229,25 +221,9 @@
padding: 7px
top: 50%
transform: translateY(-50%)
- right: 47px
+ right: 17px
font-size: 20px
- .list-header-menu-handle
- position: absolute
- padding: 7px
- top: 50%
- transform: translateY(-50%)
- right: 10px
- font-size: 24px
-
- .list-header-menu-handle-miniscreen-angle-left
- position: absolute
- padding: 7px
- top: 50%
- transform: translateY(-50%)
- right: 25px
- 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 78d0801a..f930e57a 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -29,11 +29,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
- a.list-header-menu-handle-miniscreen-angle-left.handle.fa.fa-arrows.js-list-handle
else
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
- |&nbsp;&nbsp;&nbsp;&nbsp;
- 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
@@ -42,8 +39,6 @@ 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 5b7232cd..e8a82499 100644
--- a/client/components/lists/listHeader.js
+++ b/client/components/lists/listHeader.js
@@ -80,12 +80,6 @@ BlazeComponent.extendComponent({
},
}).register('listHeader');
-Template.listHeader.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
-
Template.listActionPopup.helpers({
isWipLimitEnabled() {
return Template.currentData().getWipLimit('enabled');