summaryrefslogtreecommitdiffstats
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
parent5bc355f9a5e78df4c19764fdc4a343a46af4fdf8 (diff)
downloadwekan-f3b858ca212bdce571b56325eaa205feda60dca2.tar.gz
wekan-f3b858ca212bdce571b56325eaa205feda60dca2.tar.bz2
wekan-f3b858ca212bdce571b56325eaa205feda60dca2.zip
Revert drag handle changes.
-rw-r--r--client/components/cards/checklists.jade15
-rw-r--r--client/components/cards/checklists.js40
-rw-r--r--client/components/cards/checklists.styl19
-rw-r--r--client/components/cards/minicard.jade9
-rw-r--r--client/components/cards/minicard.js3
-rw-r--r--client/components/cards/minicard.styl16
-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
-rw-r--r--client/components/swimlanes/swimlaneHeader.jade5
-rw-r--r--client/components/swimlanes/swimlaneHeader.js6
-rw-r--r--client/components/swimlanes/swimlanes.js39
-rw-r--r--client/components/swimlanes/swimlanes.styl16
-rw-r--r--client/components/users/userHeader.jade5
-rw-r--r--client/components/users/userHeader.js6
-rw-r--r--models/users.js24
17 files changed, 17 insertions, 265 deletions
diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade
index 635b4092..279d3671 100644
--- a/client/components/cards/checklists.jade
+++ b/client/components/cards/checklists.jade
@@ -31,20 +31,10 @@ template(name="checklistDetail")
h2.title.js-open-inlined-form.is-editable
+viewer
= checklist.title
- if isMiniScreen
- a.checklist-handle.handle.fa.fa-arrows.js-checklist-handle
- unless isMiniScreen
- if showDesktopDragHandles
- a.checklist-handle.handle.fa.fa-arrows.js-checklist-handle
else
h2.title
+viewer
= checklist.title
- if isMiniScreen
- a.checklist-handle.handle.fa.fa-arrows.js-checklist-handle
- unless isMiniScreen
- if showDesktopDragHandles
- a.checklist-handle.handle.fa.fa-arrows.js-checklist-handle
+checklistItems(checklist = checklist)
template(name="checklistDeleteDialog")
@@ -85,11 +75,6 @@ template(name="checklistItems")
+editChecklistItemForm(type = 'item' item = item checklist = checklist)
else
+checklistItemDetail(item = item checklist = checklist)
- if isMiniScreen
- a.checklist-item-handle.handle.fa.fa-arrows.js-checklist-item-handle
- unless isMiniScreen
- if showDesktopDragHandles
- a.checklist-item-handle.handle.fa.fa-arrows.js-checklist-item-handle
if canModifyCard
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
+addChecklistItemForm
diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js
index 2128b67d..57939eb8 100644
--- a/client/components/cards/checklists.js
+++ b/client/components/cards/checklists.js
@@ -39,7 +39,6 @@ function initSorting(items) {
// ugly touch event hotfix
enableClickOnTouch('.js-checklist-item:not(.placeholder)');
-
}
BlazeComponent.extendComponent({
@@ -61,30 +60,6 @@ BlazeComponent.extendComponent({
if ($itemsDom.data('sortable')) {
$(self.itemsDom).sortable('option', 'disabled', !userIsMember());
}
- if(Utils.isMiniScreen()) {
- this.$('.js-checklists').sortable({
- handle: '.checklist-handle',
- });
- this.$('.js-checklist-item').sortable({
- handle: '.checklist-item-handle',
- });
- } else {
- if (Meteor.user().hasShowDesktopDragHandles()) {
- this.$('.js-checklists').sortable({
- handle: '.checklist-handle',
- });
- this.$('.js-checklist-item').sortable({
- handle: '.checklist-item-handle',
- });
- } else {
- this.$('.js-checklists').sortable({
- handle: '.checklist-title',
- });
- this.$('.js-checklist-item').sortable({
- handle: '.checklist-item',
- });
- }
- }
});
},
@@ -97,12 +72,6 @@ BlazeComponent.extendComponent({
},
}).register('checklistDetail');
-Template.checklistDetail.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
-
BlazeComponent.extendComponent({
addChecklist(event) {
event.preventDefault();
@@ -228,12 +197,6 @@ BlazeComponent.extendComponent({
},
}).register('checklists');
-Template.checklists.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
-
Template.checklistDeleteDialog.onCreated(() => {
const $cardDetails = this.$('.card-details');
this.scrollState = {
@@ -268,9 +231,6 @@ Template.checklistItemDetail.helpers({
!Meteor.user().isCommentOnly()
);
},
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
});
BlazeComponent.extendComponent({
diff --git a/client/components/cards/checklists.styl b/client/components/cards/checklists.styl
index dd3afe04..8ac37a15 100644
--- a/client/components/cards/checklists.styl
+++ b/client/components/cards/checklists.styl
@@ -35,14 +35,6 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
&.is-finished
color: #3cb500
- .checklist-handle
- position: absolute
- float: right
- padding-bottom: 30px
- transform: translateY(-50%)
- left: 400px
- font-size: 18px
-
.js-delete-checklist
@extends .delete-text
@@ -78,7 +70,7 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
margin-left: 12%
float: left
.toggle-delete-checklist-dialog
- margin-right: 20%
+ margin-right: 12%
float: right
#card-details-overlay
@@ -133,19 +125,12 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
&.is-checked
color: #8c8c8c
font-style: italic
- &.viewer
+ & .viewer
p
margin-bottom: 2px
display: block
word-wrap: break-word
max-width: 420px
- .checklist-item-handle
- position: absolute
- float: right
- padding-bottom: 30px
- transform: translateY(-50%)
- left: 400px
- font-size: 18px
.js-delete-checklist-item
margin: 0 0 0.5em 1.33em
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 2bc20622..3806ce41 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -3,13 +3,6 @@ template(name="minicard")
class="{{#if isLinkedCard}}linked-card{{/if}}"
class="{{#if isLinkedBoard}}linked-board{{/if}}"
class="minicard-{{colorClass}}")
- unless isMiniScreen
- if showDesktopDragHandles
- .handle
- .fa.fa-arrows
- if isMiniScreen
- .handle
- .fa.fa-arrows
if cover
.minicard-cover(style="background-image: url('{{cover.url}}');")
if labels
@@ -22,6 +15,8 @@ template(name="minicard")
if hiddenMinicardLabelText
.minicard-label(class="card-label-{{color}}" title="{{name}}")
.minicard-title
+ .handle
+ .fa.fa-arrows
if $eq 'prefix-with-full-path' currentBoard.presentParentTask
.parent-prefix
| {{ parentString ' > ' }}
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index 4c76db46..4c25c11d 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -26,9 +26,6 @@ BlazeComponent.extendComponent({
}).register('minicard');
Template.minicard.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
hiddenMinicardLabelText() {
return Meteor.user().hasHiddenMinicardLabelText();
},
diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl
index 428a7abe..30228063 100644
--- a/client/components/cards/minicard.styl
+++ b/client/components/cards/minicard.styl
@@ -105,25 +105,13 @@
right: 5px;
top: 5px;
display:none;
- @media only screen and (min-width: 1200px) {
+ // @media only screen and (max-width: 1199px) {
+ @media only screen and (max-width: 800px) {
display:block;
}
.fa-arrows
font-size:20px;
color: #ccc;
- //.handle-minicard-desktop
- // width: 20px;
- // height: 20px;
- // position: absolute;
- // right: 5px;
- // top: 5px;
- // display:none;
- // @media only screen and (min-width: 1200px) {
- // display:block;
- // }
- // .fa-arrows
- // font-size:20px;
- // color: #ccc;
.minicard-title
p:last-child
margin-bottom: 0
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');
diff --git a/client/components/swimlanes/swimlaneHeader.jade b/client/components/swimlanes/swimlaneHeader.jade
index dde8561e..8c6aa5a3 100644
--- a/client/components/swimlanes/swimlaneHeader.jade
+++ b/client/components/swimlanes/swimlaneHeader.jade
@@ -16,11 +16,6 @@ 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 isMiniScreen
- a.swimlane-header-menu-miniscreen-handle.handle.fa.fa-arrows.js-swimlane-header-handle
- unless isMiniScreen
- 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 6f8029fd..ee21d100 100644
--- a/client/components/swimlanes/swimlaneHeader.js
+++ b/client/components/swimlanes/swimlaneHeader.js
@@ -28,12 +28,6 @@ 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.js b/client/components/swimlanes/swimlanes.js
index ed53b9e9..e0857003 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -101,8 +101,6 @@ function initSortable(boardComponent, $listsDom) {
// is not a board member
boardComponent.autorun(() => {
const $listDom = $listsDom;
-
-
if ($listDom.data('sortable')) {
$listsDom.sortable(
'option',
@@ -110,33 +108,6 @@ function initSortable(boardComponent, $listsDom) {
MultiSelection.isActive() || !userIsMember(),
);
}
-
-
- if (Utils.isMiniScreen()) {
- this.$('.js-lists').sortable({
- handle: '.list-header-menu-handle',
- });
- this.$('.js-swimlanes').sortable({
- handle: '.swimlane-header-menu-miniscreen-handle',
- });
- } else {
- if (Meteor.user().hasShowDesktopDragHandles()) {
- this.$('.js-lists').sortable({
- handle: '.list-header-menu-handle',
- });
- this.$('.js-swimlanes').sortable({
- handle: '.swimlane-header-menu-handle',
- });
- } else {
- this.$('.js-lists').sortable({
- handle: '.list-header',
- });
- this.$('.js-swimlanes').sortable({
- handle: '.swimlane-header',
- });
- }
- }
-
});
}
@@ -187,7 +158,6 @@ BlazeComponent.extendComponent({
'p',
'.js-list-header',
];
-
if (
$(evt.target).closest(noDragInside.join(',')).length === 0 &&
this.$('.swimlane').prop('clientHeight') > evt.offsetY
@@ -263,9 +233,6 @@ BlazeComponent.extendComponent({
}).register('addListForm');
Template.swimlane.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
canSeeAddList() {
return (
Meteor.user() &&
@@ -308,9 +275,3 @@ BlazeComponent.extendComponent({
initSortable(boardComponent, $listsDom);
},
}).register('listsGroup');
-
-Template.listsGroup.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
-});
diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl
index 4fbfce4f..1056e1e3 100644
--- a/client/components/swimlanes/swimlanes.styl
+++ b/client/components/swimlanes/swimlanes.styl
@@ -50,22 +50,6 @@
margin-left: 5px
margin-right: 10px
- .swimlane-header-menu-handle
- position: absolute
- padding: 7px
- top: 50%
- transform: translateY(-50%)
- left: 300px
- font-size: 18px
-
- .swimlane-header-menu-miniscreen-handle
- position: absolute
- padding: 7px
- top: 50%
- transform: translateY(-50%)
- left: 487px
- font-size: 18px
-
.list-group
height: 100%
diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade
index 50a80396..946bdab1 100644
--- a/client/components/users/userHeader.jade
+++ b/client/components/users/userHeader.jade
@@ -79,11 +79,6 @@ template(name="changeSettingsPopup")
if hiddenSystemMessages
i.fa.fa-check
li
- a.js-toggle-desktop-drag-handles
- | {{_ 'show-desktop-drag-handles'}}
- if showDesktopDragHandles
- i.fa.fa-check
- li
label.bold
| {{_ 'show-cards-minimum-count'}}
input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="0" max="99" onkeydown="return false")
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index 194f990f..36fb2020 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -161,9 +161,6 @@ Template.changeLanguagePopup.events({
});
Template.changeSettingsPopup.helpers({
- showDesktopDragHandles() {
- return Meteor.user().hasShowDesktopDragHandles();
- },
hiddenSystemMessages() {
return Meteor.user().hasHiddenSystemMessages();
},
@@ -173,9 +170,6 @@ Template.changeSettingsPopup.helpers({
});
Template.changeSettingsPopup.events({
- 'click .js-toggle-desktop-drag-handles'() {
- Meteor.call('toggleDesktopDragHandles');
- },
'click .js-toggle-system-messages'() {
Meteor.call('toggleSystemMessages');
},
diff --git a/models/users.js b/models/users.js
index 93fb409e..9147322c 100644
--- a/models/users.js
+++ b/models/users.js
@@ -109,13 +109,6 @@ Users.attachSchema(
type: String,
optional: true,
},
- 'profile.showDesktopDragHandles': {
- /**
- * does the user want to hide system messages?
- */
- type: Boolean,
- optional: true,
- },
'profile.hiddenSystemMessages': {
/**
* does the user want to hide system messages?
@@ -375,11 +368,6 @@ Users.helpers({
return _.contains(notifications, activityId);
},
- hasShowDesktopDragHandles() {
- const profile = this.profile || {};
- return profile.showDesktopDragHandles || false;
- },
-
hasHiddenSystemMessages() {
const profile = this.profile || {};
return profile.hiddenSystemMessages || false;
@@ -485,14 +473,6 @@ Users.mutations({
else this.addTag(tag);
},
- toggleDesktopHandles(value = false) {
- return {
- $set: {
- 'profile.showDesktopDragHandles': !value,
- },
- };
- },
-
toggleSystem(value = false) {
return {
$set: {
@@ -569,10 +549,6 @@ Meteor.methods({
Users.update(userId, { $set: { username } });
}
},
- toggleDesktopDragHandles() {
- const user = Meteor.user();
- user.toggleDesktopHandles(user.hasShowDesktopDragHandles());
- },
toggleSystemMessages() {
const user = Meteor.user();
user.toggleSystem(user.hasHiddenSystemMessages());