mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40: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
42
client/lib/cssEvents.js
Normal file
42
client/lib/cssEvents.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// XXX Should we use something like Moderniz instead of our custom detector?
|
||||
|
||||
var whichTransitionEvent = function() {
|
||||
var t;
|
||||
var el = document.createElement('fakeelement');
|
||||
var transitions = {
|
||||
transition:'transitionend',
|
||||
OTransition:'oTransitionEnd',
|
||||
MSTransition:'msTransitionEnd',
|
||||
MozTransition:'transitionend',
|
||||
WebkitTransition:'webkitTransitionEnd'
|
||||
};
|
||||
|
||||
for (t in transitions) {
|
||||
if (el.style[t] !== undefined) {
|
||||
return transitions[t];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var whichAnimationEvent = function() {
|
||||
var t;
|
||||
var el = document.createElement('fakeelement');
|
||||
var transitions = {
|
||||
animation:'animationend',
|
||||
OAnimation:'oAnimationEnd',
|
||||
MSTransition:'msAnimationEnd',
|
||||
MozAnimation:'animationend',
|
||||
WebkitAnimation:'webkitAnimationEnd'
|
||||
};
|
||||
|
||||
for (t in transitions) {
|
||||
if (el.style[t] !== undefined) {
|
||||
return transitions[t];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CSSEvents = {
|
||||
transitionend: whichTransitionEvent(),
|
||||
animationend: whichAnimationEvent()
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue