summaryrefslogtreecommitdiffstats
path: root/client/components/main/popup.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-06-12 13:59:39 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-06-12 17:48:15 +0200
commitc8945679872a0708eb67a477a99a65d508c84cb0 (patch)
tree5cf9f2cc842f891451f7bc247b5f0833c1ab39e7 /client/components/main/popup.js
parent216887490e3be0ba141484afc11d37475e91562d (diff)
downloadwekan-c8945679872a0708eb67a477a99a65d508c84cb0.tar.gz
wekan-c8945679872a0708eb67a477a99a65d508c84cb0.tar.bz2
wekan-c8945679872a0708eb67a477a99a65d508c84cb0.zip
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.
Diffstat (limited to 'client/components/main/popup.js')
-rw-r--r--client/components/main/popup.js21
1 files changed, 1 insertions, 20 deletions
diff --git a/client/components/main/popup.js b/client/components/main/popup.js
index 8cb12dd0..5fc4e979 100644
--- a/client/components/main/popup.js
+++ b/client/components/main/popup.js
@@ -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);
});
}