mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01: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
|
h2.title.js-open-inlined-form.is-editable
|
||||||
+viewer
|
+viewer
|
||||||
= checklist.title
|
= 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
|
else
|
||||||
h2.title
|
h2.title
|
||||||
+viewer
|
+viewer
|
||||||
= checklist.title
|
= 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)
|
+checklistItems(checklist = checklist)
|
||||||
|
|
||||||
template(name="checklistDeleteDialog")
|
template(name="checklistDeleteDialog")
|
||||||
|
|
@ -85,11 +75,6 @@ template(name="checklistItems")
|
||||||
+editChecklistItemForm(type = 'item' item = item checklist = checklist)
|
+editChecklistItemForm(type = 'item' item = item checklist = checklist)
|
||||||
else
|
else
|
||||||
+checklistItemDetail(item = item checklist = checklist)
|
+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
|
if canModifyCard
|
||||||
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
|
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
|
||||||
+addChecklistItemForm
|
+addChecklistItemForm
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ function initSorting(items) {
|
||||||
|
|
||||||
// ugly touch event hotfix
|
// ugly touch event hotfix
|
||||||
enableClickOnTouch('.js-checklist-item:not(.placeholder)');
|
enableClickOnTouch('.js-checklist-item:not(.placeholder)');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
|
|
@ -61,30 +60,6 @@ BlazeComponent.extendComponent({
|
||||||
if ($itemsDom.data('sortable')) {
|
if ($itemsDom.data('sortable')) {
|
||||||
$(self.itemsDom).sortable('option', 'disabled', !userIsMember());
|
$(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');
|
}).register('checklistDetail');
|
||||||
|
|
||||||
Template.checklistDetail.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
addChecklist(event) {
|
addChecklist(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -228,12 +197,6 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
}).register('checklists');
|
}).register('checklists');
|
||||||
|
|
||||||
Template.checklists.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
Template.checklistDeleteDialog.onCreated(() => {
|
Template.checklistDeleteDialog.onCreated(() => {
|
||||||
const $cardDetails = this.$('.card-details');
|
const $cardDetails = this.$('.card-details');
|
||||||
this.scrollState = {
|
this.scrollState = {
|
||||||
|
|
@ -268,9 +231,6 @@ Template.checklistItemDetail.helpers({
|
||||||
!Meteor.user().isCommentOnly()
|
!Meteor.user().isCommentOnly()
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,6 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||||
&.is-finished
|
&.is-finished
|
||||||
color: #3cb500
|
color: #3cb500
|
||||||
|
|
||||||
.checklist-handle
|
|
||||||
position: absolute
|
|
||||||
float: right
|
|
||||||
padding-bottom: 30px
|
|
||||||
transform: translateY(-50%)
|
|
||||||
left: 400px
|
|
||||||
font-size: 18px
|
|
||||||
|
|
||||||
.js-delete-checklist
|
.js-delete-checklist
|
||||||
@extends .delete-text
|
@extends .delete-text
|
||||||
|
|
||||||
|
|
@ -78,7 +70,7 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||||
margin-left: 12%
|
margin-left: 12%
|
||||||
float: left
|
float: left
|
||||||
.toggle-delete-checklist-dialog
|
.toggle-delete-checklist-dialog
|
||||||
margin-right: 20%
|
margin-right: 12%
|
||||||
float: right
|
float: right
|
||||||
|
|
||||||
#card-details-overlay
|
#card-details-overlay
|
||||||
|
|
@ -133,19 +125,12 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||||
&.is-checked
|
&.is-checked
|
||||||
color: #8c8c8c
|
color: #8c8c8c
|
||||||
font-style: italic
|
font-style: italic
|
||||||
&.viewer
|
& .viewer
|
||||||
p
|
p
|
||||||
margin-bottom: 2px
|
margin-bottom: 2px
|
||||||
display: block
|
display: block
|
||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
max-width: 420px
|
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
|
.js-delete-checklist-item
|
||||||
margin: 0 0 0.5em 1.33em
|
margin: 0 0 0.5em 1.33em
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,6 @@ template(name="minicard")
|
||||||
class="{{#if isLinkedCard}}linked-card{{/if}}"
|
class="{{#if isLinkedCard}}linked-card{{/if}}"
|
||||||
class="{{#if isLinkedBoard}}linked-board{{/if}}"
|
class="{{#if isLinkedBoard}}linked-board{{/if}}"
|
||||||
class="minicard-{{colorClass}}")
|
class="minicard-{{colorClass}}")
|
||||||
unless isMiniScreen
|
|
||||||
if showDesktopDragHandles
|
|
||||||
.handle
|
|
||||||
.fa.fa-arrows
|
|
||||||
if isMiniScreen
|
|
||||||
.handle
|
|
||||||
.fa.fa-arrows
|
|
||||||
if cover
|
if cover
|
||||||
.minicard-cover(style="background-image: url('{{cover.url}}');")
|
.minicard-cover(style="background-image: url('{{cover.url}}');")
|
||||||
if labels
|
if labels
|
||||||
|
|
@ -22,6 +15,8 @@ template(name="minicard")
|
||||||
if hiddenMinicardLabelText
|
if hiddenMinicardLabelText
|
||||||
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
||||||
.minicard-title
|
.minicard-title
|
||||||
|
.handle
|
||||||
|
.fa.fa-arrows
|
||||||
if $eq 'prefix-with-full-path' currentBoard.presentParentTask
|
if $eq 'prefix-with-full-path' currentBoard.presentParentTask
|
||||||
.parent-prefix
|
.parent-prefix
|
||||||
| {{ parentString ' > ' }}
|
| {{ parentString ' > ' }}
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,6 @@ BlazeComponent.extendComponent({
|
||||||
}).register('minicard');
|
}).register('minicard');
|
||||||
|
|
||||||
Template.minicard.helpers({
|
Template.minicard.helpers({
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
hiddenMinicardLabelText() {
|
hiddenMinicardLabelText() {
|
||||||
return Meteor.user().hasHiddenMinicardLabelText();
|
return Meteor.user().hasHiddenMinicardLabelText();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -105,25 +105,13 @@
|
||||||
right: 5px;
|
right: 5px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
display:none;
|
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;
|
display:block;
|
||||||
}
|
}
|
||||||
.fa-arrows
|
.fa-arrows
|
||||||
font-size:20px;
|
font-size:20px;
|
||||||
color: #ccc;
|
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
|
.minicard-title
|
||||||
p:last-child
|
p:last-child
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,15 @@ BlazeComponent.extendComponent({
|
||||||
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
|
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
|
||||||
const $cards = this.$('.js-minicards');
|
const $cards = this.$('.js-minicards');
|
||||||
|
|
||||||
|
if (Utils.isMiniScreen()) {
|
||||||
|
$('.js-minicards').sortable({
|
||||||
|
handle: '.handle',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$cards.sortable({
|
$cards.sortable({
|
||||||
connectWith: '.js-minicards:not(.js-list-full)',
|
connectWith: '.js-minicards:not(.js-list-full)',
|
||||||
tolerance: 'pointer',
|
tolerance: 'pointer',
|
||||||
handle: 'list-header',
|
|
||||||
appendTo: '.board-canvas',
|
appendTo: '.board-canvas',
|
||||||
helper(evt, item) {
|
helper(evt, item) {
|
||||||
const helper = item.clone();
|
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
|
// Disable drag-dropping if the current user is not a board member or is comment only
|
||||||
this.autorun(() => {
|
this.autorun(() => {
|
||||||
$cards.sortable('option', 'disabled', !userIsMember());
|
$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.
|
// We want to re-run this function any time a card is added.
|
||||||
|
|
@ -165,21 +155,9 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
}).register('list');
|
}).register('list');
|
||||||
|
|
||||||
Template.list.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
Template.miniList.events({
|
Template.miniList.events({
|
||||||
'click .js-select-list'() {
|
'click .js-select-list'() {
|
||||||
const listId = this._id;
|
const listId = this._id;
|
||||||
Session.set('currentList', listId);
|
Session.set('currentList', listId);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.miniList.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
|
||||||
|
|
@ -84,16 +84,17 @@
|
||||||
padding-left: 10px
|
padding-left: 10px
|
||||||
color: #a6a6a6
|
color: #a6a6a6
|
||||||
|
|
||||||
|
|
||||||
.list-header-menu
|
.list-header-menu
|
||||||
position: absolute
|
position: absolute
|
||||||
padding: 27px 19px
|
padding: 27px 19px
|
||||||
margin-top: 1px
|
margin-top: 1px
|
||||||
top: -7px
|
top: -7px
|
||||||
right: 3px
|
right: -7px
|
||||||
|
|
||||||
.list-header-plus-icon
|
.list-header-plus-icon
|
||||||
color: #a6a6a6
|
color: #a6a6a6
|
||||||
margin-right: 15px
|
margin-right: 10px
|
||||||
|
|
||||||
.highlight
|
.highlight
|
||||||
color: #ce1414
|
color: #ce1414
|
||||||
|
|
@ -164,16 +165,7 @@
|
||||||
|
|
||||||
@media screen and (max-width: 800px)
|
@media screen and (max-width: 800px)
|
||||||
.list-header-menu
|
.list-header-menu
|
||||||
position: absolute
|
margin-right: 30px
|
||||||
padding: 27px 19px
|
|
||||||
margin-top: 1px
|
|
||||||
top: -7px
|
|
||||||
margin-right: 50px
|
|
||||||
right: -3px
|
|
||||||
|
|
||||||
.list-header
|
|
||||||
.list-header-name
|
|
||||||
margin-left: 1.4rem
|
|
||||||
|
|
||||||
.mini-list
|
.mini-list
|
||||||
flex: 0 0 60px
|
flex: 0 0 60px
|
||||||
|
|
@ -229,25 +221,9 @@
|
||||||
padding: 7px
|
padding: 7px
|
||||||
top: 50%
|
top: 50%
|
||||||
transform: translateY(-50%)
|
transform: translateY(-50%)
|
||||||
right: 47px
|
right: 17px
|
||||||
font-size: 20px
|
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
|
.link-board-wrapper
|
||||||
display: flex
|
display: flex
|
||||||
align-items: baseline
|
align-items: baseline
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,8 @@ template(name="listHeader")
|
||||||
if canSeeAddCard
|
if canSeeAddCard
|
||||||
a.js-add-card.fa.fa-plus.list-header-plus-icon
|
a.js-add-card.fa.fa-plus.list-header-plus-icon
|
||||||
a.fa.fa-navicon.js-open-list-menu
|
a.fa.fa-navicon.js-open-list-menu
|
||||||
a.list-header-menu-handle-miniscreen-angle-left.handle.fa.fa-arrows.js-list-handle
|
|
||||||
else
|
else
|
||||||
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
|
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
|
else if currentUser.isBoardMember
|
||||||
if isWatching
|
if isWatching
|
||||||
i.list-header-watch-icon.fa.fa-eye
|
i.list-header-watch-icon.fa.fa-eye
|
||||||
|
|
@ -42,8 +39,6 @@ template(name="listHeader")
|
||||||
if canSeeAddCard
|
if canSeeAddCard
|
||||||
a.js-add-card.fa.fa-plus.list-header-plus-icon
|
a.js-add-card.fa.fa-plus.list-header-plus-icon
|
||||||
a.fa.fa-navicon.js-open-list-menu
|
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")
|
template(name="editListTitleForm")
|
||||||
.list-composer
|
.list-composer
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,6 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
}).register('listHeader');
|
}).register('listHeader');
|
||||||
|
|
||||||
Template.listHeader.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
Template.listActionPopup.helpers({
|
Template.listActionPopup.helpers({
|
||||||
isWipLimitEnabled() {
|
isWipLimitEnabled() {
|
||||||
return Template.currentData().getWipLimit('enabled');
|
return Template.currentData().getWipLimit('enabled');
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,6 @@ template(name="swimlaneFixedHeader")
|
||||||
unless currentUser.isCommentOnly
|
unless currentUser.isCommentOnly
|
||||||
a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon
|
a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon
|
||||||
a.fa.fa-navicon.js-open-swimlane-menu
|
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")
|
template(name="editSwimlaneTitleForm")
|
||||||
.list-composer
|
.list-composer
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,6 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
}).register('swimlaneHeader');
|
}).register('swimlaneHeader');
|
||||||
|
|
||||||
Template.swimlaneHeader.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
Template.swimlaneActionPopup.events({
|
Template.swimlaneActionPopup.events({
|
||||||
'click .js-set-swimlane-color': Popup.open('setSwimlaneColor'),
|
'click .js-set-swimlane-color': Popup.open('setSwimlaneColor'),
|
||||||
'click .js-close-swimlane'(event) {
|
'click .js-close-swimlane'(event) {
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@ function initSortable(boardComponent, $listsDom) {
|
||||||
// is not a board member
|
// is not a board member
|
||||||
boardComponent.autorun(() => {
|
boardComponent.autorun(() => {
|
||||||
const $listDom = $listsDom;
|
const $listDom = $listsDom;
|
||||||
|
|
||||||
|
|
||||||
if ($listDom.data('sortable')) {
|
if ($listDom.data('sortable')) {
|
||||||
$listsDom.sortable(
|
$listsDom.sortable(
|
||||||
'option',
|
'option',
|
||||||
|
|
@ -110,33 +108,6 @@ function initSortable(boardComponent, $listsDom) {
|
||||||
MultiSelection.isActive() || !userIsMember(),
|
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',
|
'p',
|
||||||
'.js-list-header',
|
'.js-list-header',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$(evt.target).closest(noDragInside.join(',')).length === 0 &&
|
$(evt.target).closest(noDragInside.join(',')).length === 0 &&
|
||||||
this.$('.swimlane').prop('clientHeight') > evt.offsetY
|
this.$('.swimlane').prop('clientHeight') > evt.offsetY
|
||||||
|
|
@ -263,9 +233,6 @@ BlazeComponent.extendComponent({
|
||||||
}).register('addListForm');
|
}).register('addListForm');
|
||||||
|
|
||||||
Template.swimlane.helpers({
|
Template.swimlane.helpers({
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
canSeeAddList() {
|
canSeeAddList() {
|
||||||
return (
|
return (
|
||||||
Meteor.user() &&
|
Meteor.user() &&
|
||||||
|
|
@ -308,9 +275,3 @@ BlazeComponent.extendComponent({
|
||||||
initSortable(boardComponent, $listsDom);
|
initSortable(boardComponent, $listsDom);
|
||||||
},
|
},
|
||||||
}).register('listsGroup');
|
}).register('listsGroup');
|
||||||
|
|
||||||
Template.listsGroup.helpers({
|
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
|
||||||
|
|
@ -50,22 +50,6 @@
|
||||||
margin-left: 5px
|
margin-left: 5px
|
||||||
margin-right: 10px
|
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
|
.list-group
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,6 @@ template(name="changeSettingsPopup")
|
||||||
| {{_ 'hide-system-messages'}}
|
| {{_ 'hide-system-messages'}}
|
||||||
if hiddenSystemMessages
|
if hiddenSystemMessages
|
||||||
i.fa.fa-check
|
i.fa.fa-check
|
||||||
li
|
|
||||||
a.js-toggle-desktop-drag-handles
|
|
||||||
| {{_ 'show-desktop-drag-handles'}}
|
|
||||||
if showDesktopDragHandles
|
|
||||||
i.fa.fa-check
|
|
||||||
li
|
li
|
||||||
label.bold
|
label.bold
|
||||||
| {{_ 'show-cards-minimum-count'}}
|
| {{_ 'show-cards-minimum-count'}}
|
||||||
|
|
|
||||||
|
|
@ -161,9 +161,6 @@ Template.changeLanguagePopup.events({
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.changeSettingsPopup.helpers({
|
Template.changeSettingsPopup.helpers({
|
||||||
showDesktopDragHandles() {
|
|
||||||
return Meteor.user().hasShowDesktopDragHandles();
|
|
||||||
},
|
|
||||||
hiddenSystemMessages() {
|
hiddenSystemMessages() {
|
||||||
return Meteor.user().hasHiddenSystemMessages();
|
return Meteor.user().hasHiddenSystemMessages();
|
||||||
},
|
},
|
||||||
|
|
@ -173,9 +170,6 @@ Template.changeSettingsPopup.helpers({
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.changeSettingsPopup.events({
|
Template.changeSettingsPopup.events({
|
||||||
'click .js-toggle-desktop-drag-handles'() {
|
|
||||||
Meteor.call('toggleDesktopDragHandles');
|
|
||||||
},
|
|
||||||
'click .js-toggle-system-messages'() {
|
'click .js-toggle-system-messages'() {
|
||||||
Meteor.call('toggleSystemMessages');
|
Meteor.call('toggleSystemMessages');
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -109,13 +109,6 @@ Users.attachSchema(
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
'profile.showDesktopDragHandles': {
|
|
||||||
/**
|
|
||||||
* does the user want to hide system messages?
|
|
||||||
*/
|
|
||||||
type: Boolean,
|
|
||||||
optional: true,
|
|
||||||
},
|
|
||||||
'profile.hiddenSystemMessages': {
|
'profile.hiddenSystemMessages': {
|
||||||
/**
|
/**
|
||||||
* does the user want to hide system messages?
|
* does the user want to hide system messages?
|
||||||
|
|
@ -375,11 +368,6 @@ Users.helpers({
|
||||||
return _.contains(notifications, activityId);
|
return _.contains(notifications, activityId);
|
||||||
},
|
},
|
||||||
|
|
||||||
hasShowDesktopDragHandles() {
|
|
||||||
const profile = this.profile || {};
|
|
||||||
return profile.showDesktopDragHandles || false;
|
|
||||||
},
|
|
||||||
|
|
||||||
hasHiddenSystemMessages() {
|
hasHiddenSystemMessages() {
|
||||||
const profile = this.profile || {};
|
const profile = this.profile || {};
|
||||||
return profile.hiddenSystemMessages || false;
|
return profile.hiddenSystemMessages || false;
|
||||||
|
|
@ -485,14 +473,6 @@ Users.mutations({
|
||||||
else this.addTag(tag);
|
else this.addTag(tag);
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleDesktopHandles(value = false) {
|
|
||||||
return {
|
|
||||||
$set: {
|
|
||||||
'profile.showDesktopDragHandles': !value,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleSystem(value = false) {
|
toggleSystem(value = false) {
|
||||||
return {
|
return {
|
||||||
$set: {
|
$set: {
|
||||||
|
|
@ -569,10 +549,6 @@ Meteor.methods({
|
||||||
Users.update(userId, { $set: { username } });
|
Users.update(userId, { $set: { username } });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleDesktopDragHandles() {
|
|
||||||
const user = Meteor.user();
|
|
||||||
user.toggleDesktopHandles(user.hasShowDesktopDragHandles());
|
|
||||||
},
|
|
||||||
toggleSystemMessages() {
|
toggleSystemMessages() {
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
user.toggleSystem(user.hasHiddenSystemMessages());
|
user.toggleSystem(user.hasHiddenSystemMessages());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue