2019-11-26 02:29:36 +02:00
|
|
|
import { Cookies } from 'meteor/ostrio:cookies';
|
|
|
|
const cookies = new Cookies();
|
2018-07-06 12:48:46 -04:00
|
|
|
const { calculateIndex, enableClickOnTouch } = Utils;
|
2015-09-03 23:12:46 +02:00
|
|
|
|
2015-05-14 14:27:39 +02:00
|
|
|
BlazeComponent.extendComponent({
|
2015-09-03 23:12:46 +02:00
|
|
|
// Proxy
|
|
|
|
openForm(options) {
|
2015-10-31 09:26:55 -07:00
|
|
|
this.childComponents('listBody')[0].openForm(options);
|
Renaissance
_,,ad8888888888bba,_
,ad88888I888888888888888ba,
,88888888I88888888888888888888a,
,d888888888I8888888888888888888888b,
d88888PP"""" ""YY88888888888888888888b,
,d88"'__,,--------,,,,.;ZZZY8888888888888,
,8IIl'" ;;l"ZZZIII8888888888,
,I88l;' ;lZZZZZ888III8888888,
,II88Zl;. ;llZZZZZ888888I888888,
,II888Zl;. .;;;;;lllZZZ888888I8888b
,II8888Z;; `;;;;;''llZZ8888888I8888,
II88888Z;' .;lZZZ8888888I888b
II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888
II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888,
II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I
,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888
II888888l `;; .;llZZ8888888888I888,
,II888888Z; ;;; .;;llZZZ8888888888I888I
III888888Zl; .., `;; ,;;lllZZZ88888888888I888
II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888,
II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b
]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888,
II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I
II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888
II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888
`II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888
II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888,
`II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b
`II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888
`II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888,
II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b,
,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b,
II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888,
II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b,
,II888888888PZ;;' `8888888I8888888888888b,
II888888888' 888888I8888888888888888
,II888888888 ,888888I8888888888888888
,d88888888888 d888888I8888888888ZZZZZZ
,ad888888888888I 8888888I8888ZZZZZZZZZZZZ
888888888888888' 888888IZZZZZZZZZZZZZZZZZ
8888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZ
888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZ
8888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZ
888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ88888888
888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ8888888888888
8888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ88888888888888888
88888888888888888888888888888888888ZZZZZZZZZZZZZZZ88888888888888888888
8888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888
888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888
8888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888
88888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888888
8888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Normand 8
88888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Veilleux 8
8888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888888
2015-05-12 19:20:58 +02:00
|
|
|
},
|
|
|
|
|
2015-09-03 23:12:46 +02:00
|
|
|
onCreated() {
|
2015-05-23 22:23:27 +02:00
|
|
|
this.newCardFormIsVisible = new ReactiveVar(true);
|
|
|
|
},
|
|
|
|
|
2015-06-17 12:51:03 +02:00
|
|
|
// The jquery UI sortable library is the best solution I've found so far. I
|
|
|
|
// tried sortable and dragula but they were not powerful enough four our use
|
|
|
|
// case. I also considered writing/forking a drag-and-drop + sortable library
|
|
|
|
// but it's probably too much work.
|
|
|
|
// By calling asking the sortable library to cancel its move on the `stop`
|
|
|
|
// callback, we basically solve all issues related to reactive updates. A
|
|
|
|
// comment below provides further details.
|
2015-09-03 23:12:46 +02:00
|
|
|
onRendered() {
|
2018-02-01 12:43:44 -03:00
|
|
|
const boardComponent = this.parentComponent().parentComponent();
|
2018-02-28 11:24:39 -03:00
|
|
|
|
|
|
|
function userIsMember() {
|
2019-06-28 12:52:09 -05:00
|
|
|
return (
|
2019-11-26 02:29:36 +02:00
|
|
|
Meteor.user() &&
|
|
|
|
Meteor.user().isBoardMember() &&
|
|
|
|
!Meteor.user().isCommentOnly()
|
2019-06-28 12:52:09 -05:00
|
|
|
);
|
2018-02-28 11:24:39 -03:00
|
|
|
}
|
|
|
|
|
2015-09-03 23:12:46 +02:00
|
|
|
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
|
|
|
|
const $cards = this.$('.js-minicards');
|
2018-12-20 14:42:46 +05:30
|
|
|
|
2015-05-27 17:17:00 +02:00
|
|
|
$cards.sortable({
|
2017-10-04 17:48:37 +02:00
|
|
|
connectWith: '.js-minicards:not(.js-list-full)',
|
2015-05-27 17:17:00 +02:00
|
|
|
tolerance: 'pointer',
|
2018-03-06 21:17:20 -03:00
|
|
|
appendTo: '.board-canvas',
|
2015-09-03 23:12:46 +02:00
|
|
|
helper(evt, item) {
|
|
|
|
const helper = item.clone();
|
2015-05-29 23:35:30 +02:00
|
|
|
if (MultiSelection.isActive()) {
|
2015-09-03 23:12:46 +02:00
|
|
|
const andNOthers = $cards.find('.js-minicard.is-checked').length - 1;
|
2015-05-29 23:35:30 +02:00
|
|
|
if (andNOthers > 0) {
|
2019-06-28 12:52:09 -05:00
|
|
|
helper.append(
|
|
|
|
$(
|
|
|
|
Blaze.toHTML(
|
|
|
|
HTML.DIV(
|
|
|
|
{ class: 'and-n-other' },
|
|
|
|
TAPi18n.__('and-n-other-card', { count: andNOthers }),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
2015-05-29 23:35:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return helper;
|
|
|
|
},
|
2015-06-17 12:51:03 +02:00
|
|
|
distance: 7,
|
2015-05-27 17:17:00 +02:00
|
|
|
items: itemsSelector,
|
2015-05-29 23:35:30 +02:00
|
|
|
placeholder: 'minicard-wrapper placeholder',
|
2015-09-03 23:12:46 +02:00
|
|
|
start(evt, ui) {
|
2018-09-12 18:35:56 +02:00
|
|
|
ui.helper.css('z-index', 1000);
|
2015-05-28 17:22:24 +02:00
|
|
|
ui.placeholder.height(ui.helper.height());
|
2017-02-05 21:01:15 -05:00
|
|
|
EscapeActions.executeUpTo('popup-close');
|
2015-05-29 23:35:30 +02:00
|
|
|
boardComponent.setIsDragging(true);
|
2015-05-27 17:17:00 +02:00
|
|
|
},
|
2015-09-03 23:12:46 +02:00
|
|
|
stop(evt, ui) {
|
2015-06-17 12:51:03 +02:00
|
|
|
// To attribute the new index number, we need to get the DOM element
|
2015-05-27 17:17:00 +02:00
|
|
|
// of the previous and the following card -- if any.
|
2015-09-03 23:12:46 +02:00
|
|
|
const prevCardDom = ui.item.prev('.js-minicard').get(0);
|
|
|
|
const nextCardDom = ui.item.next('.js-minicard').get(0);
|
|
|
|
const nCards = MultiSelection.isActive() ? MultiSelection.count() : 1;
|
|
|
|
const sortIndex = calculateIndex(prevCardDom, nextCardDom, nCards);
|
|
|
|
const listId = Blaze.getData(ui.item.parents('.list').get(0))._id;
|
2019-03-05 22:35:45 +01:00
|
|
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
|
|
|
let swimlaneId = '';
|
2019-06-28 12:52:09 -05:00
|
|
|
if (
|
2019-11-26 02:29:36 +02:00
|
|
|
Utils.boardView() === 'board-view-swimlanes' ||
|
|
|
|
currentBoard.isTemplatesBoard()
|
2019-06-28 12:52:09 -05:00
|
|
|
)
|
2019-03-05 22:35:45 +01:00
|
|
|
swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id;
|
2019-06-28 12:52:09 -05:00
|
|
|
else if (
|
2019-11-26 02:29:36 +02:00
|
|
|
Utils.boardView() === 'board-view-lists' ||
|
|
|
|
Utils.boardView() === 'board-view-cal' ||
|
|
|
|
!Utils.boardView
|
2019-06-28 12:52:09 -05:00
|
|
|
)
|
2019-03-05 22:35:45 +01:00
|
|
|
swimlaneId = currentBoard.getDefaultSwimline()._id;
|
2015-05-29 23:35:30 +02:00
|
|
|
|
2015-06-17 12:51:03 +02:00
|
|
|
// Normally the jquery-ui sortable library moves the dragged DOM element
|
|
|
|
// to its new position, which disrupts Blaze reactive updates mechanism
|
|
|
|
// (especially when we move the last card of a list, or when multiple
|
|
|
|
// users move some cards at the same time). To prevent these UX glitches
|
|
|
|
// we ask sortable to gracefully cancel the move, and to put back the
|
|
|
|
// DOM in its initial state. The card move is then handled reactively by
|
|
|
|
// Blaze with the below query.
|
|
|
|
$cards.sortable('cancel');
|
|
|
|
|
2015-05-29 23:35:30 +02:00
|
|
|
if (MultiSelection.isActive()) {
|
2015-09-08 20:19:42 +02:00
|
|
|
Cards.find(MultiSelection.getMongoSelector()).forEach((card, i) => {
|
2019-06-28 12:52:09 -05:00
|
|
|
card.move(
|
|
|
|
currentBoard._id,
|
|
|
|
swimlaneId,
|
|
|
|
listId,
|
|
|
|
sortIndex.base + i * sortIndex.increment,
|
|
|
|
);
|
2015-05-29 23:35:30 +02:00
|
|
|
});
|
|
|
|
} else {
|
2015-09-03 23:12:46 +02:00
|
|
|
const cardDomElement = ui.item.get(0);
|
2015-09-08 20:19:42 +02:00
|
|
|
const card = Blaze.getData(cardDomElement);
|
2019-03-16 22:43:47 +01:00
|
|
|
card.move(currentBoard._id, swimlaneId, listId, sortIndex.base);
|
2015-05-29 23:35:30 +02:00
|
|
|
}
|
|
|
|
boardComponent.setIsDragging(false);
|
2015-09-03 23:12:46 +02:00
|
|
|
},
|
2015-05-27 17:17:00 +02:00
|
|
|
});
|
|
|
|
|
2018-07-06 12:48:46 -04:00
|
|
|
// ugly touch event hotfix
|
2018-07-06 14:42:36 -04:00
|
|
|
enableClickOnTouch(itemsSelector);
|
2018-07-06 12:48:46 -04:00
|
|
|
|
2015-12-29 18:08:24 +01:00
|
|
|
this.autorun(() => {
|
2019-11-19 14:09:36 +02:00
|
|
|
let showDesktopDragHandles = false;
|
|
|
|
currentUser = Meteor.user();
|
|
|
|
if (currentUser) {
|
2019-11-19 21:55:43 +02:00
|
|
|
showDesktopDragHandles = (currentUser.profile || {})
|
|
|
|
.showDesktopDragHandles;
|
2019-11-20 21:10:11 +02:00
|
|
|
} else if (cookies.has('showDesktopDragHandles')) {
|
|
|
|
showDesktopDragHandles = true;
|
2019-11-19 14:09:36 +02:00
|
|
|
} else {
|
2019-11-20 21:10:11 +02:00
|
|
|
showDesktopDragHandles = false;
|
2019-11-19 14:09:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!Utils.isMiniScreen() && showDesktopDragHandles) {
|
2019-11-13 19:33:13 +02:00
|
|
|
$cards.sortable({
|
|
|
|
handle: '.handle',
|
|
|
|
});
|
2020-02-07 03:16:16 +02:00
|
|
|
} else if (!Utils.isMiniScreen() && !showDesktopDragHandles) {
|
2019-11-13 19:33:13 +02:00
|
|
|
$cards.sortable({
|
|
|
|
handle: '.minicard',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-04-23 00:54:39 +02:00
|
|
|
if ($cards.data('uiSortable')) {
|
2020-02-07 03:16:16 +02:00
|
|
|
$cards.sortable(
|
|
|
|
'option',
|
|
|
|
'disabled',
|
|
|
|
// Disable drag-dropping when user is not member/is miniscreen
|
2020-04-23 00:54:39 +02:00
|
|
|
!userIsMember() || Utils.isMiniScreen(),
|
2020-02-07 03:16:16 +02:00
|
|
|
// Not disable drag-dropping while in multi-selection mode
|
|
|
|
// MultiSelection.isActive() || !userIsMember(),
|
|
|
|
);
|
|
|
|
}
|
2015-12-29 18:08:24 +01:00
|
|
|
});
|
|
|
|
|
2015-05-27 17:17:00 +02:00
|
|
|
// We want to re-run this function any time a card is added.
|
2015-09-03 23:12:46 +02:00
|
|
|
this.autorun(() => {
|
|
|
|
const currentBoardId = Tracker.nonreactive(() => {
|
2015-05-27 17:17:00 +02:00
|
|
|
return Session.get('currentBoard');
|
|
|
|
});
|
|
|
|
Cards.find({ boardId: currentBoardId }).fetch();
|
2015-09-03 23:12:46 +02:00
|
|
|
Tracker.afterFlush(() => {
|
2015-05-24 12:30:58 +02:00
|
|
|
$cards.find(itemsSelector).droppable({
|
2015-05-14 14:27:39 +02:00
|
|
|
hoverClass: 'draggable-hover-card',
|
2015-05-24 12:30:58 +02:00
|
|
|
accept: '.js-member,.js-label',
|
2015-09-03 23:12:46 +02:00
|
|
|
drop(event, ui) {
|
|
|
|
const cardId = Blaze.getData(this)._id;
|
2015-09-08 20:19:42 +02:00
|
|
|
const card = Cards.findOne(cardId);
|
Renaissance
_,,ad8888888888bba,_
,ad88888I888888888888888ba,
,88888888I88888888888888888888a,
,d888888888I8888888888888888888888b,
d88888PP"""" ""YY88888888888888888888b,
,d88"'__,,--------,,,,.;ZZZY8888888888888,
,8IIl'" ;;l"ZZZIII8888888888,
,I88l;' ;lZZZZZ888III8888888,
,II88Zl;. ;llZZZZZ888888I888888,
,II888Zl;. .;;;;;lllZZZ888888I8888b
,II8888Z;; `;;;;;''llZZ8888888I8888,
II88888Z;' .;lZZZ8888888I888b
II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888
II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888,
II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I
,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888
II888888l `;; .;llZZ8888888888I888,
,II888888Z; ;;; .;;llZZZ8888888888I888I
III888888Zl; .., `;; ,;;lllZZZ88888888888I888
II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888,
II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b
]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888,
II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I
II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888
II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888
`II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888
II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888,
`II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b
`II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888
`II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888,
II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b,
,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b,
II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888,
II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b,
,II888888888PZ;;' `8888888I8888888888888b,
II888888888' 888888I8888888888888888
,II888888888 ,888888I8888888888888888
,d88888888888 d888888I8888888888ZZZZZZ
,ad888888888888I 8888888I8888ZZZZZZZZZZZZ
888888888888888' 888888IZZZZZZZZZZZZZZZZZ
8888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZ
888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZ
8888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZ
888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ88888888
888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ8888888888888
8888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ88888888888888888
88888888888888888888888888888888888ZZZZZZZZZZZZZZZ88888888888888888888
8888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888
888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888
8888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888
88888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888888
8888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Normand 8
88888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Veilleux 8
8888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888888
2015-05-12 19:20:58 +02:00
|
|
|
|
2015-05-24 12:30:58 +02:00
|
|
|
if (ui.draggable.hasClass('js-member')) {
|
2015-09-03 23:12:46 +02:00
|
|
|
const memberId = Blaze.getData(ui.draggable.get(0)).userId;
|
2015-09-08 20:19:42 +02:00
|
|
|
card.assignMember(memberId);
|
2015-05-24 12:30:58 +02:00
|
|
|
} else {
|
2015-09-03 23:12:46 +02:00
|
|
|
const labelId = Blaze.getData(ui.draggable.get(0))._id;
|
2015-09-08 20:19:42 +02:00
|
|
|
card.addLabel(labelId);
|
2015-05-24 12:30:58 +02:00
|
|
|
}
|
2015-09-03 23:12:46 +02:00
|
|
|
},
|
Renaissance
_,,ad8888888888bba,_
,ad88888I888888888888888ba,
,88888888I88888888888888888888a,
,d888888888I8888888888888888888888b,
d88888PP"""" ""YY88888888888888888888b,
,d88"'__,,--------,,,,.;ZZZY8888888888888,
,8IIl'" ;;l"ZZZIII8888888888,
,I88l;' ;lZZZZZ888III8888888,
,II88Zl;. ;llZZZZZ888888I888888,
,II888Zl;. .;;;;;lllZZZ888888I8888b
,II8888Z;; `;;;;;''llZZ8888888I8888,
II88888Z;' .;lZZZ8888888I888b
II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888
II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888,
II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I
,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888
II888888l `;; .;llZZ8888888888I888,
,II888888Z; ;;; .;;llZZZ8888888888I888I
III888888Zl; .., `;; ,;;lllZZZ88888888888I888
II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888,
II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b
]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888,
II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I
II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888
II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888
`II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888
II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888,
`II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b
`II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888
`II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888,
II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b,
,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b,
II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888,
II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b,
,II888888888PZ;;' `8888888I8888888888888b,
II888888888' 888888I8888888888888888
,II888888888 ,888888I8888888888888888
,d88888888888 d888888I8888888888ZZZZZZ
,ad888888888888I 8888888I8888ZZZZZZZZZZZZ
888888888888888' 888888IZZZZZZZZZZZZZZZZZ
8888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZ
888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZ
8888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZ
888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ88888888
888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ8888888888888
8888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ88888888888888888
88888888888888888888888888888888888ZZZZZZZZZZZZZZZ88888888888888888888
8888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888
888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888
8888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888
88888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888888
8888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Normand 8
88888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Veilleux 8
8888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888888
2015-05-12 19:20:58 +02:00
|
|
|
});
|
|
|
|
});
|
2015-05-27 17:17:00 +02:00
|
|
|
});
|
2015-09-03 23:12:46 +02:00
|
|
|
},
|
Renaissance
_,,ad8888888888bba,_
,ad88888I888888888888888ba,
,88888888I88888888888888888888a,
,d888888888I8888888888888888888888b,
d88888PP"""" ""YY88888888888888888888b,
,d88"'__,,--------,,,,.;ZZZY8888888888888,
,8IIl'" ;;l"ZZZIII8888888888,
,I88l;' ;lZZZZZ888III8888888,
,II88Zl;. ;llZZZZZ888888I888888,
,II888Zl;. .;;;;;lllZZZ888888I8888b
,II8888Z;; `;;;;;''llZZ8888888I8888,
II88888Z;' .;lZZZ8888888I888b
II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888
II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888,
II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I
,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888
II888888l `;; .;llZZ8888888888I888,
,II888888Z; ;;; .;;llZZZ8888888888I888I
III888888Zl; .., `;; ,;;lllZZZ88888888888I888
II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888,
II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b
]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888,
II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I
II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888
II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888
`II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888
II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888,
`II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b
`II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888
`II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888,
II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b,
,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b,
II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888,
II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b,
,II888888888PZ;;' `8888888I8888888888888b,
II888888888' 888888I8888888888888888
,II888888888 ,888888I8888888888888888
,d88888888888 d888888I8888888888ZZZZZZ
,ad888888888888I 8888888I8888ZZZZZZZZZZZZ
888888888888888' 888888IZZZZZZZZZZZZZZZZZ
8888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZ
888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZ
8888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZ
888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ88888888
888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ8888888888888
8888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ88888888888888888
88888888888888888888888888888888888ZZZZZZZZZZZZZZZ88888888888888888888
8888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888
888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888
8888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888
88888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888888
8888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Normand 8
88888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Veilleux 8
8888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888888
2015-05-12 19:20:58 +02:00
|
|
|
}).register('list');
|
2017-11-29 17:06:33 +09:00
|
|
|
|
2019-10-29 19:05:44 +02:00
|
|
|
Template.list.helpers({
|
|
|
|
showDesktopDragHandles() {
|
2019-11-19 14:09:36 +02:00
|
|
|
currentUser = Meteor.user();
|
|
|
|
if (currentUser) {
|
|
|
|
return (currentUser.profile || {}).showDesktopDragHandles;
|
2020-01-03 06:49:35 +02:00
|
|
|
} else if (cookies.has('showDesktopDragHandles')) {
|
|
|
|
return true;
|
New feature: Now there is popup selection of Lists/Swimlanes/Calendar/Roles.
New feature, not set visible yet, because switching to it does not
work properly yet: Collapsible Swimlanes #2804
Fix: Public board now loads correctly. When you select one of Lists/Swimlanes/Calendar view and
reload webbrowser page, it can change view. Closes #2311
Fix: List sorting commented out. Closes #2800
Fix: Errors hasHiddenMinicardText, hasShowDragHandles, showSort, hasSortBy, profile,
FirefoxAndroid/IE11/Vivaldi/Chromium browsers not working by using
cookies instead of database.
More details at https://github.com/wekan/wekan/issues/2643#issuecomment-554907955
Note: Cookie changes are not always immediate, if there is no effect,
you may need to reload webbrowser page.
Closes #2643 .
Thanks to xet7 !
2019-11-18 22:23:49 +02:00
|
|
|
} else {
|
2020-01-03 06:49:35 +02:00
|
|
|
return false;
|
New feature: Now there is popup selection of Lists/Swimlanes/Calendar/Roles.
New feature, not set visible yet, because switching to it does not
work properly yet: Collapsible Swimlanes #2804
Fix: Public board now loads correctly. When you select one of Lists/Swimlanes/Calendar view and
reload webbrowser page, it can change view. Closes #2311
Fix: List sorting commented out. Closes #2800
Fix: Errors hasHiddenMinicardText, hasShowDragHandles, showSort, hasSortBy, profile,
FirefoxAndroid/IE11/Vivaldi/Chromium browsers not working by using
cookies instead of database.
More details at https://github.com/wekan/wekan/issues/2643#issuecomment-554907955
Note: Cookie changes are not always immediate, if there is no effect,
you may need to reload webbrowser page.
Closes #2643 .
Thanks to xet7 !
2019-11-18 22:23:49 +02:00
|
|
|
}
|
2019-10-29 19:05:44 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-11-29 17:06:33 +09:00
|
|
|
Template.miniList.events({
|
|
|
|
'click .js-select-list'() {
|
|
|
|
const listId = this._id;
|
|
|
|
Session.set('currentList', listId);
|
|
|
|
},
|
|
|
|
});
|