aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-18 23:04:37 -0700
committerValerio Virgillito2012-07-18 23:04:37 -0700
commit84a7674e4f6556b8663f94a5360c29a5a276f2c8 (patch)
tree7ff698ef0e5fb157e864e4da699fd4a019918b6e /js/components/layout
parentaaf19014186e881078148394c107278b8b3b28f6 (diff)
downloadninja-84a7674e4f6556b8663f94a5360c29a5a276f2c8.tar.gz
Preview button: enabling the entire button to handle a mouse click
- Then entire button area (button and icon) is not click enabled to launch a Chrome Preview instead of only the actual button. Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components/layout')
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html13
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js16
2 files changed, 18 insertions, 11 deletions
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index ccf759ef..3e3ac936 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -75,13 +75,7 @@ POSSIBILITY OF SUCH DAMAGE.
75 "element": {"#": "previewButton"}, 75 "element": {"#": "previewButton"},
76 "identifier": "preview", 76 "identifier": "preview",
77 "label": "Preview" 77 "label": "Preview"
78 }, 78 }
79 "listeners": [
80 {
81 "type": "action",
82 "listener": {"@": "owner"}
83 }
84 ]
85 }, 79 },
86 80
87 "owner": { 81 "owner": {
@@ -90,7 +84,8 @@ POSSIBILITY OF SUCH DAMAGE.
90 "element": {"#": "documentBar"}, 84 "element": {"#": "documentBar"},
91 "zoomControl": {"@": "hottext1"}, 85 "zoomControl": {"@": "hottext1"},
92 "btnDesign": {"#": "buttonDesign"}, 86 "btnDesign": {"#": "buttonDesign"},
93 "btnCode": {"#": "buttonCode"} 87 "btnCode": {"#": "buttonCode"},
88 "btnPreview": {"#": "buttonPreview"}
94 } 89 }
95 } 90 }
96 } 91 }
@@ -126,7 +121,7 @@ POSSIBILITY OF SUCH DAMAGE.
126 121
127 </section> 122 </section>
128 123
129 <section class="inactive"> 124 <section data-montage-id="buttonPreview" class="inactive">
130 125
131 <div class="viewicon viewPreview"></div> 126 <div class="viewicon viewPreview"></div>
132 127
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index a9c98507..5623f825 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -65,6 +65,17 @@ exports.DocumentBar = Montage.create(Component, {
65 }, 65 },
66 //////////////////////////////////////////////////////////////////// 66 ////////////////////////////////////////////////////////////////////
67 // 67 //
68 btnCode: {
69 value: null
70 },
71 btnDesign: {
72 value: null
73 },
74 btnPreview: {
75 value: null
76 },
77 ////////////////////////////////////////////////////////////////////
78 //
68 _visible: { 79 _visible: {
69 value: false 80 value: false
70 }, 81 },
@@ -113,6 +124,7 @@ exports.DocumentBar = Montage.create(Component, {
113 // 124 //
114 this.btnCode.addEventListener('click', this.showViewCode.bind(this), false); 125 this.btnCode.addEventListener('click', this.showViewCode.bind(this), false);
115 this.btnDesign.addEventListener('click', this.showViewDesign.bind(this), false); 126 this.btnDesign.addEventListener('click', this.showViewDesign.bind(this), false);
127 this.btnPreview.addEventListener('click', this, false);
116 } 128 }
117 }, 129 },
118 //////////////////////////////////////////////////////////////////// 130 ////////////////////////////////////////////////////////////////////
@@ -207,8 +219,8 @@ exports.DocumentBar = Montage.create(Component, {
207 } 219 }
208 }, 220 },
209 221
210 handlePreviewAction: { 222 handleClick: {
211 value: function(event) { 223 value: function(evt) {
212 NJevent("executePreview"); 224 NJevent("executePreview");
213 } 225 }
214 } 226 }