aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/popup/popup.reel
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-03 22:53:07 -0700
committerValerio Virgillito2012-05-03 22:53:07 -0700
commit24b483db367291b72170f969de78efcb1a9b95bd (patch)
treea691a7803cefbfa76a6331a50cbeebcd16287d91 /node_modules/montage/ui/popup/popup.reel
parentdc93269cfa7c315d22d85c8217e2412749643f28 (diff)
downloadninja-24b483db367291b72170f969de78efcb1a9b95bd.tar.gz
integrating the latest montage version
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/popup/popup.reel')
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.css20
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.html12
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.js16
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) {