diff options
author | Nivesh Rajbhandari | 2012-05-07 11:18:11 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-07 11:18:11 -0700 |
commit | e377a8dc0b0e34905782ed867acb5fe725ae0131 (patch) | |
tree | 6931311aabd7a4e366df195a168d437f1d0d8465 /node_modules/montage/ui/popup/popup.reel | |
parent | 8be6e94b57f4bd6e28754a6113b4d6a401365e13 (diff) | |
parent | 526e423e4a2734c2b139af23911e912452a4443f (diff) | |
download | ninja-e377a8dc0b0e34905782ed867acb5fe725ae0131.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'node_modules/montage/ui/popup/popup.reel')
-rwxr-xr-x | node_modules/montage/ui/popup/popup.reel/popup.css | 20 | ||||
-rwxr-xr-x | node_modules/montage/ui/popup/popup.reel/popup.html | 12 | ||||
-rwxr-xr-x | node_modules/montage/ui/popup/popup.reel/popup.js | 16 |
3 files changed, 32 insertions, 16 deletions
diff --git a/node_modules/montage/ui/popup/popup.reel/popup.css b/node_modules/montage/ui/popup/popup.reel/popup.css index 4597d8ac..6260b8a9 100755 --- a/node_modules/montage/ui/popup/popup.reel/popup.css +++ b/node_modules/montage/ui/popup/popup.reel/popup.css | |||
@@ -34,10 +34,22 @@ | |||
34 | } | 34 | } |
35 | 35 | ||
36 | .montage-popup-container { | 36 | .montage-popup-container { |
37 | background-color: #fff; | 37 | border: 1px solid #eee; |
38 | border-radius: 5px; | 38 | -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
39 | border: 3px solid #000; | 39 | -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
40 | 40 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); | |
41 | -webkit-transition: opacity .25s; | ||
42 | -moz-transition: opacity .25s; | ||
43 | -ms-transition: opacity .25s; | ||
44 | -o-transition: opacity .25s; | ||
45 | transition: opacity .25s; | ||
46 | background: white; | ||
47 | border: 1px solid rgba(0, 0, 0, .2); | ||
48 | cursor: default; | ||
49 | margin: 0; | ||
50 | outline: none; | ||
51 | width: auto; | ||
52 | border-radius: 3px; | ||
41 | } | 53 | } |
42 | 54 | ||
43 | .montage-popup-noborder { | 55 | .montage-popup-noborder { |
diff --git a/node_modules/montage/ui/popup/popup.reel/popup.html b/node_modules/montage/ui/popup/popup.reel/popup.html index 9948b868..5bc74dae 100755 --- a/node_modules/montage/ui/popup/popup.reel/popup.html +++ b/node_modules/montage/ui/popup/popup.reel/popup.html | |||
@@ -11,8 +11,7 @@ | |||
11 | <script type="text/montage-serialization"> | 11 | <script type="text/montage-serialization"> |
12 | { | 12 | { |
13 | "slot1": { | 13 | "slot1": { |
14 | "module": "montage/ui/slot.reel", | 14 | "prototype": "montage/ui/slot.reel", |
15 | "name": "Slot", | ||
16 | "properties": { | 15 | "properties": { |
17 | "element": { | 16 | "element": { |
18 | "#": "popup-content" | 17 | "#": "popup-content" |
@@ -20,8 +19,7 @@ | |||
20 | } | 19 | } |
21 | }, | 20 | }, |
22 | "owner": { | 21 | "owner": { |
23 | "module": "montage/ui/popup/popup.reel", | 22 | "prototype": "montage/ui/popup/popup.reel", |
24 | "name": "Popup", | ||
25 | "properties": { | 23 | "properties": { |
26 | "element": { | 24 | "element": { |
27 | "#": "popup-container" | 25 | "#": "popup-container" |
@@ -42,9 +40,9 @@ | |||
42 | 40 | ||
43 | </head> | 41 | </head> |
44 | <body> | 42 | <body> |
45 | <div id="popup-container" class="montage-invisible montage-popup-container"> | 43 | <div data-montage-id="popup-container" class="montage-invisible montage-popup-container"> |
46 | <div id="popup-wrapper" class="montage-popup-tooltip montage-popup-wrapper montage-popup-border"> | 44 | <div data-montage-id="popup-wrapper" class="montage-popup-tooltip montage-popup-wrapper montage-popup-border"> |
47 | <div id="popup-content" class="montage-popup-content"></div> | 45 | <div data-montage-id="popup-content" class="montage-popup-content"></div> |
48 | </div> | 46 | </div> |
49 | </div> | 47 | </div> |
50 | 48 | ||
diff --git a/node_modules/montage/ui/popup/popup.reel/popup.js b/node_modules/montage/ui/popup/popup.reel/popup.js index d0a7a1cc..84f845db 100755 --- a/node_modules/montage/ui/popup/popup.reel/popup.js +++ b/node_modules/montage/ui/popup/popup.reel/popup.js | |||
@@ -175,6 +175,11 @@ var Popup = exports.Popup = Montage.create(Component, { /** @lends module:"modul | |||
175 | 175 | ||
176 | } | 176 | } |
177 | }, | 177 | }, |
178 | |||
179 | focusOnShow: { | ||
180 | value: true | ||
181 | }, | ||
182 | |||
178 | /** | 183 | /** |
179 | Description TODO | 184 | Description TODO |
180 | @function | 185 | @function |
@@ -365,13 +370,12 @@ var Popup = exports.Popup = Montage.create(Component, { /** @lends module:"modul | |||
365 | hide: { | 370 | hide: { |
366 | value: function() { | 371 | value: function() { |
367 | //console.log('popup hide', this.element); | 372 | //console.log('popup hide', this.element); |
368 | this._removeEventListeners(); | ||
369 | |||
370 | var type = this.type, | 373 | var type = this.type, |
371 | self = this; | 374 | self = this; |
372 | 375 | ||
373 | this.application.getPopupSlot(type, this, function(slot) { | 376 | this.application.getPopupSlot(type, this, function(slot) { |
374 | self.application.returnPopupSlot(type); | 377 | self._removeEventListeners(); |
378 | //self.application.returnPopupSlot(type); | ||
375 | self.displayed = false; | 379 | self.displayed = false; |
376 | }); | 380 | }); |
377 | } | 381 | } |
@@ -395,7 +399,7 @@ var Popup = exports.Popup = Montage.create(Component, { /** @lends module:"modul | |||
395 | // look to see if any content is a modal | 399 | // look to see if any content is a modal |
396 | var i, len = activePopups.length; | 400 | var i, len = activePopups.length; |
397 | for(i=0; i< len; i++) { | 401 | for(i=0; i< len; i++) { |
398 | if(activePopups[i].content && activePopups[i].content.modal === true) { | 402 | if(activePopups[i].content && activePopups[i].content.modal === true && activePopups[i].content.displayed === true) { |
399 | count++; | 403 | count++; |
400 | } | 404 | } |
401 | } | 405 | } |
@@ -461,7 +465,9 @@ var Popup = exports.Popup = Montage.create(Component, { /** @lends module:"modul | |||
461 | 465 | ||
462 | this._positionPopup(); | 466 | this._positionPopup(); |
463 | // focus the content to enable key events such as ENTER/ESC | 467 | // focus the content to enable key events such as ENTER/ESC |
464 | this.content.element.focus(); | 468 | if(this.focusOnShow === true) { |
469 | this.content.element.focus(); | ||
470 | } | ||
465 | 471 | ||
466 | } else { | 472 | } else { |
467 | if(this.modal === true) { | 473 | if(this.modal === true) { |