mirror of
https://github.com/wekan/wekan.git
synced 2025-12-15 23:10:13 +01:00
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.
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
// XXX This event list must be abstracted somewhere else.
|
|
var endTransitionEvents = [
|
|
'webkitTransitionEnd',
|
|
'otransitionend',
|
|
'oTransitionEnd',
|
|
'msTransitionEnd',
|
|
'transitionend'
|
|
].join(' ');
|
|
|
|
Popup.template.events({
|
|
click: function(evt) {
|
|
if (evt.originalEvent) {
|
|
evt.originalEvent.clickInPopup = true;
|
|
}
|
|
},
|
|
'click .js-back-view': function() {
|
|
Popup.back();
|
|
},
|
|
'click .js-close-pop-over': function() {
|
|
Popup.close();
|
|
},
|
|
'click .js-confirm': function() {
|
|
this.__afterConfirmAction.call(this);
|
|
}
|
|
});
|
|
|
|
// When a popup content is removed (ie, when the user press the "back" button),
|
|
// we need to wait for the container translation to end before removing the
|
|
// actual DOM element. For that purpose we use the undocumented `_uihooks` API.
|
|
Popup.template.onRendered(function() {
|
|
var container = this.find('.content-container');
|
|
container._uihooks = {
|
|
removeElement: function(node) {
|
|
$(node).addClass('no-height');
|
|
$(container).one(endTransitionEvents, function() {
|
|
node.parentNode.removeChild(node);
|
|
});
|
|
}
|
|
};
|
|
});
|