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 --- js/components/menu/menu-item.reel/menu-item.css | 99 ------------ js/components/menu/menu-item.reel/menu-item.html | 97 ----------- js/components/menu/menu-item.reel/menu-item.js | 198 ----------------------- 3 files changed, 394 deletions(-) delete mode 100755 js/components/menu/menu-item.reel/menu-item.css delete mode 100755 js/components/menu/menu-item.reel/menu-item.html delete mode 100755 js/components/menu/menu-item.reel/menu-item.js (limited to 'js/components/menu/menu-item.reel') diff --git a/js/components/menu/menu-item.reel/menu-item.css b/js/components/menu/menu-item.reel/menu-item.css deleted file mode 100755 index 95fd673c..00000000 --- a/js/components/menu/menu-item.reel/menu-item.css +++ /dev/null @@ -1,99 +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. - */ - -.menuItem .menuName { - font-family: 'Droid Sans', sans-serif; - font-size: 10pt; - padding: 3px 12px 3px 8px; - text-shadow : 1px 1px 1px #000000; - cursor:pointer; -} - -.menuItem:hover { - background-color: #7f7f7f; - cursor:pointer; -} - -.menubg .subEntries { - top: 0%; - left: 100%; - width: auto; - white-space:nowrap; -} - -.itemSeparator:hover { - background-color: #474747; -} - -.separator{ - width:100%; - height:2px; - position: relative; - border: 1px groove #474747 ; - border-radius: 2px; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#474747), to(#cccccc)); - opacity: 0.5; -} - -.disabled { - opacity: 0.5; -} - -.disabled:hover { - background-color: #474747; -} - -.menubg .check { - float:left; - background-image: url(../../../../images/menu/checkmark.png); - background-repeat: no-repeat; - background-position: center; - width: 10px; - height: 15px; - opacity: 0; -} - -.menubg.submenu .rightArrow { - float: right; - background-image:url('../../../../images/menu/arrow.png'); - background-repeat: no-repeat; - background-position: center; - width: 10px; - height: 15px; - position: absolute; - right:4px; - top: 5px; - margin-left: 8px; -} - -.subEntries.subMenu .rightArrow { - opacity: 0; -} diff --git a/js/components/menu/menu-item.reel/menu-item.html b/js/components/menu/menu-item.reel/menu-item.html deleted file mode 100755 index 364a0997..00000000 --- a/js/components/menu/menu-item.reel/menu-item.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js deleted file mode 100755 index 63cc79b7..00000000 --- a/js/components/menu/menu-item.reel/menu-item.js +++ /dev/null @@ -1,198 +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; -var Component = require("montage/ui/component").Component; - -exports.MenuItem = Montage.create(Component, { - - itemBackground: { - value: null - }, - - itemText: { - value: null - }, - - subMenu: { - value: null - }, - - data: { - value: null - }, - - _enabled: { - value: false - }, - - enabled: { - get: function() { - return this._enabled; - }, - set: function(value) { - if(value !== this._enabled) { - this._enabled = value; - this.needsDraw = true; - } - } - }, - - _checked: { - value: null - }, - - checked: { - get: function() { - return this._checked; - }, - set: function(value) { - /* - if( Object.prototype.toString.call( value ) === '[object Array]' ) { - value = value.indexOf(this.data.displayText + "Panel") >= 0; - } - */ - - if(this._checked !== value) { - this._checked = value; - this.needsDraw = true; - } - } - }, - - submenu: { - value: false - }, - - subentries: { - value: [] - }, - - prepareForDraw: { - value: function() { - - if(!this.data) return; - - if(this.data.separator) { - this.element.classList.add("itemSeparator"); - this.itemBackground.classList.remove("menubg"); - this.itemBackground.classList.add("separator"); - - return; - - } - - // Binding the checked to the assigned bound property - if(this.data.checked) { - Object.defineBinding(this, "checked", { - boundObject: this.application.ninja.appModel, - boundObjectPropertyPath: this.data.checked.boundProperty - }); - - } - - if(this.data.submenu) { - this.submenu = true; - this.subentries = this.data.entries; - this.subMenu.classList.add("subMenu"); - } - - this.element.addEventListener("mouseover", this, false); - this.element.addEventListener("mouseout", this, false); - - this.itemText.innerHTML = this.data.displayText; - this.element.addEventListener("mouseup", this, true); - } - }, - - draw: { - value: function() { - - if(this.enabled) { - this.element.classList.remove("disabled"); - } else { - this.element.classList.add("disabled"); - } - - if(this.checked) { - this.itemBackground.classList.add("checked"); - } else { - this.itemBackground.classList.remove("checked"); - } - - if(this.submenu) { - this.itemBackground.classList.add("submenu"); - } - } - }, - - captureMouseup: { - value: function(event) { - - if(this.data.radio && this.checked){ - this.parentComponent.ownerComponent.toggleOnMenuItemAction(); - return; - } - - if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) { - if(this.data.action) { - NJevent ( this.data.action ); - } else if(this.checked !== null) { - this.checked = !this.checked; - } - this.parentComponent.ownerComponent.toggleOnMenuItemAction(); - } - - } - }, - - handleMouseover: { - value: function() { - if(this.enabled){ - this.element.style.backgroundColor = "#7f7f7f"; - this.element.style.cursor = "pointer"; - if(this.data.submenu) { - this.subMenu.style.display = "block"; - } - } - } - }, - - handleMouseout: { - value: function() { - this.element.style.backgroundColor = "#474747"; - if(this.data.submenu) { - this.subMenu.style.display = "none"; - } - } - } - -}); -- cgit v1.2.3