From 84a7674e4f6556b8663f94a5360c29a5a276f2c8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Jul 2012 23:04:37 -0700 Subject: 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 --- js/components/layout/document-bar.reel/document-bar.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'js/components/layout/document-bar.reel/document-bar.js') 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, { }, //////////////////////////////////////////////////////////////////// // + btnCode: { + value: null + }, + btnDesign: { + value: null + }, + btnPreview: { + value: null + }, + //////////////////////////////////////////////////////////////////// + // _visible: { value: false }, @@ -113,6 +124,7 @@ exports.DocumentBar = Montage.create(Component, { // this.btnCode.addEventListener('click', this.showViewCode.bind(this), false); this.btnDesign.addEventListener('click', this.showViewDesign.bind(this), false); + this.btnPreview.addEventListener('click', this, false); } }, //////////////////////////////////////////////////////////////////// @@ -207,8 +219,8 @@ exports.DocumentBar = Montage.create(Component, { } }, - handlePreviewAction: { - value: function(event) { + handleClick: { + value: function(evt) { NJevent("executePreview"); } } -- cgit v1.2.3