diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-05-22 19:40:12 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-05-22 19:40:12 +0200 |
commit | 6fe08cd4b3a0db0695db13a1b95cab7834de3ba6 (patch) | |
tree | 75eab6c86b48696c04dd205bd38b0887f9d72f78 /client/lib | |
parent | 790a0e0a2d703f4a318acea3b102fcc6f7aebbb0 (diff) | |
download | wekan-6fe08cd4b3a0db0695db13a1b95cab7834de3ba6.tar.gz wekan-6fe08cd4b3a0db0695db13a1b95cab7834de3ba6.tar.bz2 wekan-6fe08cd4b3a0db0695db13a1b95cab7834de3ba6.zip |
Animate popup screens transition
Diffstat (limited to 'client/lib')
-rw-r--r-- | client/lib/popup.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/client/lib/popup.js b/client/lib/popup.js index dd2a43b0..04f7dbf6 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -56,9 +56,9 @@ Popup = { // If there are no popup currently opened we use the Blaze API to render // one into the DOM. We use a reactive function as the data parameter that - // just return the top element on the stack and depends on our internal - // dependency that is being invalidated every time the top element of the - // stack has changed and we want to update the popup. + // return the the complete along with its top element and depends on our + // internal dependency that is being invalidated every time the top + // element of the stack has changed and we want to update the popup. // // Otherwise if there is already a popup open we just need to invalidate // our internal dependency, and since we just changed the top element of @@ -66,7 +66,10 @@ Popup = { if (! self.isOpen()) { self.current = Blaze.renderWithData(self.template, function() { self._dep.depend(); - return self._stack[self._stack.length - 1]; + return _.extend(self._stack[self._stack.length - 1], { + stack: self._stack, + containerTranslation: (self._stack.length - 1) * -300 + }); }, document.body); } else { |