mirror of
https://github.com/wekan/wekan.git
synced 2025-12-19 17:00:13 +01:00
* 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.
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// XXX This event list must be abstracted somewhere else.
|
|
function whichTransitionEvent() {
|
|
var t;
|
|
var el = document.createElement('fakeelement');
|
|
var transitions = {
|
|
transition:'transitionend',
|
|
OTransition:'oTransitionEnd',
|
|
MozTransition:'transitionend',
|
|
WebkitTransition:'webkitTransitionEnd'
|
|
};
|
|
|
|
for (t in transitions) {
|
|
if (el.style[t] !== undefined) {
|
|
return transitions[t];
|
|
}
|
|
}
|
|
}
|
|
var transitionEvent = whichTransitionEvent();
|
|
|
|
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(transitionEvent, function() {
|
|
node.parentNode.removeChild(node);
|
|
});
|
|
}
|
|
};
|
|
});
|