From b9afa81d391f51ea199fc12278b89bdda883dd97 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 17 Jul 2012 23:34:57 -0700 Subject: removed left over comments. Signed-off-by: Valerio Virgillito --- .../layout/document-bar.reel/document-bar.css | 13 +++- .../layout/document-bar.reel/document-bar.html | 23 +++++++ .../layout/document-bar.reel/document-bar.js | 6 ++ .../layout/stage-mode.reel/stage-mode.css | 49 -------------- .../layout/stage-mode.reel/stage-mode.html | 55 ---------------- js/components/layout/stage-mode.reel/stage-mode.js | 77 ---------------------- 6 files changed, 40 insertions(+), 183 deletions(-) delete mode 100755 js/components/layout/stage-mode.reel/stage-mode.css delete mode 100755 js/components/layout/stage-mode.reel/stage-mode.html delete mode 100755 js/components/layout/stage-mode.reel/stage-mode.js (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css index b86855b7..5eba72e8 100755 --- a/js/components/layout/document-bar.reel/document-bar.css +++ b/js/components/layout/document-bar.reel/document-bar.css @@ -75,7 +75,7 @@ POSSIBILITY OF SUCH DAMAGE. padding: 0; border: none; color: #FFF; - width: 44px; + width: 46px; text-transform: uppercase; text-align: left; float: left; @@ -83,6 +83,10 @@ POSSIBILITY OF SUCH DAMAGE. font-size: 11px; } +.preview:focus { + -webkit-box-shadow: none; +} + .documentBar .viewicon { background-repeat: no-repeat; background-position: center center; @@ -98,10 +102,15 @@ POSSIBILITY OF SUCH DAMAGE. } .documentBar .viewdesign { - background-image: url('../../../../js/panels/Color/colorpanelpopup.reel/img/icon_bitmap.png'); + background-image: url('../../../../js/panels/color/colorpanelpopup.reel/img/icon_bitmap.png'); background-size: 90%; } +.documentBar .viewPreview { + background-image: url('../../../../images/optionsbar/edit_mode.png'); + background-size: 100%; +} + .documentBar section.inactive .viewicon{ opacity: .5; } diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index 69f8107f..9e5e4eb2 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html @@ -68,6 +68,21 @@ POSSIBILITY OF SUCH DAMAGE. "condition": {"<-": "@owner.disabled"} } }, + + "menuItemButton": { + "prototype": "montage/ui/native/button.reel", + "properties": { + "element": {"#": "previewButton"}, + "identifier": "preview", + "label": "Preview" + }, + "listeners": [ + { + "type": "action", + "listener": {"@": "owner"} + } + ] + }, "owner": { "prototype": "js/components/layout/document-bar.reel", @@ -108,6 +123,14 @@ POSSIBILITY OF SUCH DAMAGE. + +
+ +
+ + + +
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 248bc8c4..fa0c8788 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -203,5 +203,11 @@ exports.DocumentBar = Montage.create(Component, { this.currentView = event._event.target.id; this.application.ninja.documentController.stage.stageView.switchDesignDocViews(event._event.target.id);//switch between design view } + }, + + handlePreviewAction: { + value: function(event) { + NJevent("executePreview"); + } } }); diff --git a/js/components/layout/stage-mode.reel/stage-mode.css b/js/components/layout/stage-mode.reel/stage-mode.css deleted file mode 100755 index c50679e8..00000000 --- a/js/components/layout/stage-mode.reel/stage-mode.css +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (c) 2012, Motorola Mobility LLC. -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of Motorola Mobility LLC nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - */ - -.stageMode { - width:26px; - height:23px; - position:absolute; - top:5px; - right:60px; - - opacity: 0.7; - background-repeat:no-repeat; -} - -.editMode { - background-image: url('../../../../images/optionsbar/edit_mode.png'); -} - -.liveMode { - background-image: url('../../../../images/optionsbar/live_mode.png'); -} diff --git a/js/components/layout/stage-mode.reel/stage-mode.html b/js/components/layout/stage-mode.reel/stage-mode.html deleted file mode 100755 index fb6a26b0..00000000 --- a/js/components/layout/stage-mode.reel/stage-mode.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - -
- - - diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js deleted file mode 100755 index bb8c4594..00000000 --- a/js/components/layout/stage-mode.reel/stage-mode.js +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright (c) 2012, Motorola Mobility LLC. -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of Motorola Mobility LLC nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - */ - -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; - -exports.StageMode = Montage.create(Component, { - - _chromePreview: { - value: null - }, - - chromePreview: { - get: function() { - return this._chromePreview; - }, - set: function(value) { - if(value !== this._chromePreview) { - this._chromePreview = value; - this.needsDraw = true; - } - } - }, - - prepareForDraw: { - value: function() { - this.element.addEventListener("click", this, false); - } - }, - - draw: { - value: function() { - if(this._livePreview) { - this.element.classList.remove("editMode"); - this.element.classList.add("liveMode"); - - } else { - this.element.classList.remove("liveMode"); - this.element.classList.add("editMode"); - } - } - }, - - handleClick: { - value: function(event) { - this.chromePreview = !this.chromePreview; - } - } -}); -- cgit v1.2.3 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.html | 13 ++++--------- js/components/layout/document-bar.reel/document-bar.js | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'js/components/layout') 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. "element": {"#": "previewButton"}, "identifier": "preview", "label": "Preview" - }, - "listeners": [ - { - "type": "action", - "listener": {"@": "owner"} - } - ] + } }, "owner": { @@ -90,7 +84,8 @@ POSSIBILITY OF SUCH DAMAGE. "element": {"#": "documentBar"}, "zoomControl": {"@": "hottext1"}, "btnDesign": {"#": "buttonDesign"}, - "btnCode": {"#": "buttonCode"} + "btnCode": {"#": "buttonCode"}, + "btnPreview": {"#": "buttonPreview"} } } } @@ -126,7 +121,7 @@ POSSIBILITY OF SUCH DAMAGE. -
+
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 From b59bb17d10a0f5c9c2e5ce0eb1e0e1c7da6c92f6 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Jul 2012 15:51:27 -0700 Subject: Unifying the banner and animation template display of ninja-content In the banner and animation template the stage element now shows div in both the pi and breadcrumb. IKNINJA: 1776 Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 2c6d941f..2fff245c 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html @@ -44,13 +44,17 @@ POSSIBILITY OF SUCH DAMAGE. } }, + "nodeNameConverter": { + "prototype": "js/components/converter/node-name-converter" + }, + "breadcrumbButton": { "prototype": "js/components/layout/bread-crumb-button.reel", "properties": { "element": {"#": "breadcrumbButton"} }, "bindings": { - "label": {"<-": "@buttonsList.objectAtCurrentIteration.label"}, + "label": {"<-": "@buttonsList.objectAtCurrentIteration.label", "converter": {"@": "nodeNameConverter"}}, "value": {"<-": "@buttonsList.objectAtCurrentIteration.nodeUuid"} } }, -- cgit v1.2.3