mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Work on the card activities and comments
This commit also introduces a new CSSEvents object that is used to abstract vendor specifics events related to CSS transitions and animations. Fixes #183. Fixes #179.
This commit is contained in:
parent
216887490e
commit
c894567987
31 changed files with 590 additions and 691 deletions
|
|
@ -1,22 +1,3 @@
|
|||
// 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 .js-back-view': function() {
|
||||
Popup.back();
|
||||
|
|
@ -50,7 +31,7 @@ Popup.template.onRendered(function() {
|
|||
container._uihooks = {
|
||||
removeElement: function(node) {
|
||||
$(node).addClass('no-height');
|
||||
$(container).one(transitionEvent, function() {
|
||||
$(container).one(CSSEvents.transitionend, function() {
|
||||
node.parentNode.removeChild(node);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue