mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 05:08:48 +01:00
UI improvements
* Implement visibility choice on board creation;
* Rework the board header bar. Remove links to un-implemented
features;
* Implement a board star counter (visible if the board have >2 stars);
* Define a new icon (a thin cross) to close elements;
* Remove $(document).on('mouseover') event handlers that were
basically fired hundreds of times for nothing, we now define a proper
Tracker dependency to execute jquery-ui plugin initialization only
when something has changed;
* Bug fixes related to list scrolling.
This commit is contained in:
parent
42f6dc686f
commit
dcc64f44f9
51 changed files with 644 additions and 990 deletions
|
|
@ -68,23 +68,39 @@ BlazeComponent.extendComponent({
|
|||
return this.getView() + 'Sidebar';
|
||||
},
|
||||
|
||||
// Board members can assign people or labels by drag-dropping elements from
|
||||
// the sidebar to the cards on the board. In order to re-initialize the
|
||||
// jquery-ui plugin any time a draggable member or label is modified or
|
||||
// removed we use a autorun function and register a dependency on the both
|
||||
// members and labels fields of the current board document.
|
||||
onRendered: function() {
|
||||
var self = this;
|
||||
if (! Meteor.userId() || ! Meteor.user().isBoardMember())
|
||||
return;
|
||||
|
||||
$(document).on('mouseover', function() {
|
||||
self.$('.js-member,.js-label').draggable({
|
||||
appendTo: 'body',
|
||||
helper: 'clone',
|
||||
revert: 'invalid',
|
||||
revertDuration: 150,
|
||||
snap: false,
|
||||
snapMode: 'both',
|
||||
start: function() {
|
||||
Popup.close();
|
||||
self.autorun(function() {
|
||||
var currentBoardId = Tracker.nonreactive(function() {
|
||||
return Session.get('currentBoard');
|
||||
});
|
||||
Boards.findOne(currentBoardId, {
|
||||
fields: {
|
||||
members: 1,
|
||||
labels: 1
|
||||
}
|
||||
});
|
||||
Tracker.afterFlush(function() {
|
||||
self.$('.js-member,.js-label').draggable({
|
||||
appendTo: 'body',
|
||||
helper: 'clone',
|
||||
revert: 'invalid',
|
||||
revertDuration: 150,
|
||||
snap: false,
|
||||
snapMode: 'both',
|
||||
start: function() {
|
||||
EscapeActions.executeLowerThan('popup');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue