diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-05-24 12:30:58 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-05-24 22:11:40 +0200 |
commit | 781577db041e0008de22f31bcc1cb11ae96670e0 (patch) | |
tree | b45e220039b81149c463ee060dcc03d79e589a77 /client/components/sidebar | |
parent | 40b605f7d897db6eb2697be1748741221378e71c (diff) | |
download | wekan-781577db041e0008de22f31bcc1cb11ae96670e0.tar.gz wekan-781577db041e0008de22f31bcc1cb11ae96670e0.tar.bz2 wekan-781577db041e0008de22f31bcc1cb11ae96670e0.zip |
Experiment new ergonomics to interact with card details
The idea is that by displaying card details in a sidebar stuck on the
right of the screen, the mouse had to travel too much before
interacting with it. I also don’t want to use the Trello solution
(modal) on big screens, because I like the ability to interact with
the selected card and with the board at the same time (like in a
e-mail client).
The solution introduced in this commit consist of opening the card
detail in a column next to the minicard list.
This commit also fix right sidebar members and labels drag and drop.
Diffstat (limited to 'client/components/sidebar')
-rw-r--r-- | client/components/sidebar/rendered.js | 10 | ||||
-rw-r--r-- | client/components/sidebar/sidebar.js | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/client/components/sidebar/rendered.js b/client/components/sidebar/rendered.js index 2b58bf33..36b1255c 100644 --- a/client/components/sidebar/rendered.js +++ b/client/components/sidebar/rendered.js @@ -1,10 +1,11 @@ -Template.membersWidget.rendered = function() { +Template.membersWidget.onRendered(function() { + var self = this; if (! Meteor.user().isBoardMember()) return; _.each(['.js-member', '.js-label'], function(className) { - Utils.liveEvent('mouseover', function($this) { - $this.find(className).draggable({ + $(document).on('mouseover', function() { + self.$(className).draggable({ appendTo: 'body', helper: 'clone', revert: 'invalid', @@ -17,5 +18,4 @@ Template.membersWidget.rendered = function() { }); }); }); -}; - +}); diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index 3f0142d4..af676bf2 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -8,7 +8,8 @@ BlazeComponent.extendComponent({ }, onCreated: function() { - this._isOpen = new ReactiveVar(true); + this._isOpen = new ReactiveVar(! Session.get('currentCard')); + Sidebar = this; }, isOpen: function() { |