mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Revert drag handle changes.
This commit is contained in:
parent
5bc355f9a5
commit
f3b858ca21
17 changed files with 17 additions and 265 deletions
|
@ -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
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ' > ' }}
|
||||
|
|
|
@ -26,9 +26,6 @@ BlazeComponent.extendComponent({
|
|||
}).register('minicard');
|
||||
|
||||
Template.minicard.helpers({
|
||||
showDesktopDragHandles() {
|
||||
return Meteor.user().hasShowDesktopDragHandles();
|
||||
},
|
||||
hiddenMinicardLabelText() {
|
||||
return Meteor.user().hasHiddenMinicardLabelText();
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
||||
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
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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%
|
||||
|
||||
|
|
|
@ -78,11 +78,6 @@ template(name="changeSettingsPopup")
|
|||
| {{_ 'hide-system-messages'}}
|
||||
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'}}
|
||||
|
|
|
@ -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');
|
||||
},
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue