aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-bar.reel/document-bar.js
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/document-bar.reel/document-bar.js
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/document-bar.reel/document-bar.js')
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js16
1 files changed, 14 insertions, 2 deletions
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 }