summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/components/main/popup.styl10
-rw-r--r--client/components/main/popup.tpl.jade2
-rw-r--r--client/lib/popup.js4
3 files changed, 11 insertions, 5 deletions
diff --git a/client/components/main/popup.styl b/client/components/main/popup.styl
index ce40fc83..550f80f1 100644
--- a/client/components/main/popup.styl
+++ b/client/components/main/popup.styl
@@ -1,5 +1,7 @@
@import 'nib'
+$popupWidth = 300px
+
.pop-over
background: #fff
border-radius: 3px
@@ -7,13 +9,13 @@
border-bottom-color: #c2c2c2
box-shadow: 0 1px 6px rgba(0, 0, 0, .3)
position: absolute
- width: 300px
+ width: $popupWidth
z-index: 99999
margin-top: 5px
hr
margin: 4px -10px
- width: 300px
+ width: $popupWidth
input[type="text"],
input[type="email"],
@@ -118,6 +120,10 @@
.at-result
background: #b2dfdb
+ for depth in (1..6)
+ .popup-container-depth-{depth}
+ transform: translateX(- depth * $popupWidth)
+
.select-members-list
margin-bottom: 8px
diff --git a/client/components/main/popup.tpl.jade b/client/components/main/popup.tpl.jade
index e6cc982a..1add6033 100644
--- a/client/components/main/popup.tpl.jade
+++ b/client/components/main/popup.tpl.jade
@@ -13,7 +13,7 @@
//-
We display the all stack of popup content next to each other and move
the "window" by translating .content-container inside .content-wrapper.
- .content-container(style="transform:translateX({{containerTranslation}}px)")
+ .content-container(class="popup-container-depth-{{depth}}")
each stack
//-
XXX We need a better way to express the "is the last element" condition.
diff --git a/client/lib/popup.js b/client/lib/popup.js
index 6193cb13..3813319d 100644
--- a/client/lib/popup.js
+++ b/client/lib/popup.js
@@ -52,6 +52,7 @@ Popup = {
hasPopupParent: self._hasPopupParent(),
title: self._getTitle(popupName),
openerElement: openerElement,
+ depth: self._stack.length,
offset: self._getOffset(openerElement),
dataContext: this.currentData && this.currentData() || this
});
@@ -69,8 +70,7 @@ Popup = {
self.current = Blaze.renderWithData(self.template, function() {
self._dep.depend();
return _.extend(self._stack[self._stack.length - 1], {
- stack: self._stack,
- containerTranslation: (self._stack.length - 1) * -300
+ stack: self._stack
});
}, document.body);