From 03b8a87824550feff7835904b7c1b56f5c74cf04 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 19 Apr 2012 13:32:07 -0700 Subject: cleanup unused code. Signed-off-by: Valerio Virgillito --- .../ui/modalDialog/modal-dialog-manager.js | 123 --------------------- js/components/ui/modalDialog/modalDialogHeader.js | 82 -------------- .../modalDialogHeader.reel/modalDialogHeader.css | 30 ----- .../modalDialogHeader.reel/modalDialogHeader.html | 33 ------ .../ui/radio-button.reel/radio-button.html | 32 ------ js/components/ui/radio-button.reel/radio-button.js | 44 -------- .../ui/row-renderer.reel/row-renderer.html | 37 ------- js/components/ui/row-renderer.reel/row-renderer.js | 18 --- 8 files changed, 399 deletions(-) delete mode 100755 js/components/ui/modalDialog/modal-dialog-manager.js delete mode 100755 js/components/ui/modalDialog/modalDialogHeader.js delete mode 100755 js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.css delete mode 100755 js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.html delete mode 100755 js/components/ui/radio-button.reel/radio-button.html delete mode 100755 js/components/ui/radio-button.reel/radio-button.js delete mode 100755 js/components/ui/row-renderer.reel/row-renderer.html delete mode 100755 js/components/ui/row-renderer.reel/row-renderer.js (limited to 'js/components/ui') diff --git a/js/components/ui/modalDialog/modal-dialog-manager.js b/js/components/ui/modalDialog/modal-dialog-manager.js deleted file mode 100755 index c06b35d6..00000000 --- a/js/components/ui/modalDialog/modal-dialog-manager.js +++ /dev/null @@ -1,123 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Popup = require("js/components/popup.reel").Popup; -var popupManagerModule = require("js/components/popup-manager.reel"); -var modalDialogHeader = require("js/components/ui/modalDialog/modalDialogHeader"); - -exports.ModalDialogMananger = (require("montage/core/core").Montage).create(require("montage/ui/component").Component, { - - _container: { - enumerable: false, - value: null - }, - - _blockScreen: { - enumerable: false, - value: null - }, - - /** - * Assign a container to be the block screen - * - * @param {Element} container - */ - init: { - enumerable: true, - value: function (blockScreen, container) { - container.style.position = 'absolute'; - container.style.top = 0; - container.style.left = 0; - container.style.width = '100%'; - container.style.height = '100%'; - container.style.display = "none"; - this._container = container; - - blockScreen.style.position = 'absolute'; - blockScreen.style.top = 0; - blockScreen.style.left = 0; - blockScreen.style.width = '100%'; - blockScreen.style.height = '100%'; - blockScreen.style.backgroundColor = "#8c8c8c"; - blockScreen.style.opacity = "0.8"; - blockScreen.style.display = "none"; - this._blockScreen = blockScreen; - } - }, - - /** - * Show a modal dialog at the center of the browser - */ - showModalDialog:{ - writable:false, - enumerable:true, - value: function(title, popupBackgroundColor, contentDiv){ - //place block screen on top of everything - this._blockScreen.style.zIndex = popupManagerModule.PopupMananger._getNextHighestZindex(document.body); - this._blockScreen.style.display = "block"; - this._container.style.zIndex = parseInt(this._blockScreen.style.zIndex) +1; - - - var modalContent = document.createElement("div"); - - //hack (elements needs to be on DOM to be drawn) - //add modal dialog header - var headerEl = document.createElement('div'); - var header = modalDialogHeader.ModalDialogHeader.create(); - header.element = headerEl; - if((typeof title === "undefined") || (title === null)){ - header.showTitle = false; - }else{ - header.title = title; - } - this._container.appendChild(headerEl); - header.needsDraw = true; - - //add dialog content - - modalContent.appendChild(contentDiv); - -// var that = this; -// setTimeout(function(){that.closeModalDialog()}, 5000);//test - - var popupEl = document.createElement('div'); - var pop = Popup.create(); - //Setting container and content - pop.element = popupEl; - pop.content = modalContent; - pop.position = {x:"30%", y:"15%"};//pass in real calculated center position - pop.zIndex = popupManagerModule.PopupMananger._getNextHighestZindex(this._container); - this._container.appendChild(popupEl); - popupEl.style.opacity = 1; - pop.needsDraw = true; - - //overrride modal dialog background color - if((typeof popupBackgroundColor !== "undefined") || (popupBackgroundColor !== null)){ - pop.element.style.backgroundColor = popupBackgroundColor; - } - //hack - place the rendered header in the right place now - this._container.removeChild(headerEl); - modalContent.insertBefore(headerEl, modalContent.firstChild); - - - this._container.style.display = "block"; - - } - }, - - closeModalDialog:{ - writable:false, - enumerable:true, - value: function(){ - //remove dialog - while(this._container.hasChildNodes()){ - this._container.removeChild(this._container.lastChild); - } - this._container.style.display = "none"; - this._blockScreen.style.display ="none"; - } - } -}); \ No newline at end of file diff --git a/js/components/ui/modalDialog/modalDialogHeader.js b/js/components/ui/modalDialog/modalDialogHeader.js deleted file mode 100755 index 6770f60a..00000000 --- a/js/components/ui/modalDialog/modalDialogHeader.js +++ /dev/null @@ -1,82 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -var modalDialogManagerModule = require("js/components/ui/modalDialog/modal-dialog-manager"); - -var ModalDialogHeader = exports.ModalDialogHeader = Montage.create(Component, { - - _firstTime: { - enumerable: false, - value: true - }, - - showTitle:{ - enumerable: true, - value: true - }, - - title:{ - enumerable : true, - value: "Default Title" - }, - - showClose:{ - enumerable: true, - value: true - }, - - willDraw: { - enumerable: false, - value: function() { - - } - }, - - draw: { - enumerable: false, - value: function() { - var closeElement = this.cross; - if(closeElement){ - if(!this.showClose){ - closeElement.style.visibility = "hidden"; - }else{ - closeElement.addEventListener("click", function(){ - modalDialogManagerModule.ModalDialogMananger.closeModalDialog(); - }, false); - } - } - var titleElement = this.title; - if(titleElement){ - if(this.showTitle){ - titleElement.innerHTML = this.title; - }else{ - titleElement.style.visibility = "hidden"; - } - } - - if(!this.showClose){ - closeElement.style.display = "none"; - } - if(!this.showTitle){ - this.separator.style.display = "none"; - } - - this.element.parentNode.addEventListener("closeDialog", function(evt){ - modalDialogManagerModule.ModalDialogMananger.closeModalDialog(); - }, false); - } - }, - - didDraw: { - enumerable: false, - value: function() { - - } - } -}); \ No newline at end of file diff --git a/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.css b/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.css deleted file mode 100755 index 01205298..00000000 --- a/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.css +++ /dev/null @@ -1,30 +0,0 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -.modalDialogHeader{ - padding-bottom: 5px; - margin-bottom: 5px; -} - -.modalDialogHeader .separator{ - height: 4px; - width:auto; -} - -.close{ - float: right; - cursor: pointer; - position:relative; - top:-1.4em; - right:5px; - color: #8c8c8c; - font-weight:bold; -} - -.title{ - text-align: center; -} - diff --git a/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.html b/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.html deleted file mode 100755 index fca3ed78..00000000 --- a/js/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - -
-
Header Title
- x -
-
- - \ No newline at end of file diff --git a/js/components/ui/radio-button.reel/radio-button.html b/js/components/ui/radio-button.reel/radio-button.html deleted file mode 100755 index 265501f4..00000000 --- a/js/components/ui/radio-button.reel/radio-button.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - -
-
-
- - - diff --git a/js/components/ui/radio-button.reel/radio-button.js b/js/components/ui/radio-button.reel/radio-button.js deleted file mode 100755 index a356fefe..00000000 --- a/js/components/ui/radio-button.reel/radio-button.js +++ /dev/null @@ -1,44 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.RadioButton = Montage.create(Component, { - - data: { value: null }, - - _selected: { value: null }, - - selected: { - get: function() { return this._selected; }, - set: function(value) { - this._selected = value; - this.needsDraw = true; - } - }, - - prepareForDraw: { - enumerable: false, - value: function() { - this.element.addEventListener("click", this, false); - } - }, - - draw: { - enumerable: false, - value: function() { - - } - }, - - handleClick: { - value: function(event) { - - } - } - -}); diff --git a/js/components/ui/row-renderer.reel/row-renderer.html b/js/components/ui/row-renderer.reel/row-renderer.html deleted file mode 100755 index f081eb84..00000000 --- a/js/components/ui/row-renderer.reel/row-renderer.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/js/components/ui/row-renderer.reel/row-renderer.js b/js/components/ui/row-renderer.reel/row-renderer.js deleted file mode 100755 index ba71ce12..00000000 --- a/js/components/ui/row-renderer.reel/row-renderer.js +++ /dev/null @@ -1,18 +0,0 @@ -/* -This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; - -exports.RowRenderer = Montage.create(Component, { - - objects : {value : null, writable: true, enumerable: true, configurable: true }, - - axis: {value : null, writable: true, enumerable: true, configurable: true }, - - mylist: {value : null, writable: true, enumerable: true, configurable: true } - -}); -- cgit v1.2.3