mirror of
https://github.com/wekan/wekan.git
synced 2025-12-27 04:38:49 +01:00
parent
21f90382d0
commit
34b232ac0a
1 changed files with 16 additions and 10 deletions
|
|
@ -6,25 +6,31 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
onCreated: function() {
|
onCreated: function() {
|
||||||
var self = this;
|
this.draggingActive = new ReactiveVar(false);
|
||||||
self.draggingActive = new ReactiveVar(false);
|
this.showOverlay = new ReactiveVar(false);
|
||||||
self.showOverlay = new ReactiveVar(false);
|
this.isBoardReady = new ReactiveVar(false);
|
||||||
self.isBoardReady = new ReactiveVar(false);
|
|
||||||
|
|
||||||
// The pattern we use to manually handle data loading is described here:
|
// The pattern we use to manually handle data loading is described here:
|
||||||
// https://kadira.io/academy/meteor-routing-guide/content/subscriptions-and-data-management/using-subs-manager
|
// https://kadira.io/academy/meteor-routing-guide/content/subscriptions-and-data-management/using-subs-manager
|
||||||
// XXX The boardId should be readed from some sort the component "props",
|
// XXX The boardId should be readed from some sort the component "props",
|
||||||
// unfortunatly, Blaze doesn't have this notion.
|
// unfortunatly, Blaze doesn't have this notion.
|
||||||
self.autorun(function() {
|
this.autorun(() => {
|
||||||
var handle = subManager.subscribe('board', Session.get('currentBoard'));
|
let currentBoardId = Session.get('currentBoard');
|
||||||
self.isBoardReady.set(handle.ready());
|
if (! currentBoardId)
|
||||||
|
return;
|
||||||
|
var handle = subManager.subscribe('board', currentBoardId);
|
||||||
|
Tracker.nonreactive(() => {
|
||||||
|
Tracker.autorun(() => {
|
||||||
|
this.isBoardReady.set(handle.ready());
|
||||||
|
})
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
self._isDragging = false;
|
this._isDragging = false;
|
||||||
self._lastDragPositionX = 0;
|
this._lastDragPositionX = 0;
|
||||||
|
|
||||||
// Used to set the overlay
|
// Used to set the overlay
|
||||||
self.mouseHasEnterCardDetails = false;
|
this.mouseHasEnterCardDetails = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
openNewListForm: function() {
|
openNewListForm: function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue