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