From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- js/panels/CSSPanel/CSSPanel.js | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 js/panels/CSSPanel/CSSPanel.js (limited to 'js/panels/CSSPanel/CSSPanel.js') diff --git a/js/panels/CSSPanel/CSSPanel.js b/js/panels/CSSPanel/CSSPanel.js new file mode 100644 index 00000000..94860b30 --- /dev/null +++ b/js/panels/CSSPanel/CSSPanel.js @@ -0,0 +1,53 @@ +/* +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, + PanelBase = require("js/panels/PanelBase").PanelBase; + +var CSSPanelBase = require("js/panels/CSSPanel/CSSPanelBase.reel").CSSPanelBase; + +exports.CSSPanel = Montage.create(PanelBase, { + id : {value : "cssPanel", writable:true, enumerable:true, configurable:true}, + panelName : {value : "CSS", writable:true, enumerable:true, configurable:true}, + panelHeaderID : {value : "cssPanelHeader", writable:true, enumerable:true, configurable:true}, + disclosureIconID : {value : "cssPanelDisclosureIcon", writable:true, enumerable:true, configurable:true}, + closeButtonID : {value : "cssPanelCloseButton", writable:true, enumerable:true, configurable:true}, + panelContentID : {value : "cssPanelContent", writable:true, enumerable:true, configurable:true}, + + init : { + enumerable:true, + value : function (){ + this.minHeight = 300; + this.contentHeight = 300; + this.defaultHeight= 300; + + /* OLD WAY -- Removing the temporary div + // TODO: Remove this comment once this is tested. + + var panelContainer = document.createElement("div"); + this._cssPanelBase = CSSPanelBase.create(); + this._cssPanelBase.element = panelContainer; + + this.content = this._cssPanelBase; + this._cssPanelBase.needsDraw = true; + */ + //debugger; + this.content = CSSPanelBase.create(); + } + }, + reinit : { + value : function() { + this._cssPanelBase.clearStyleSheetList(); + this._cssPanelBase.clearCSSRules(); + this._cssPanelBase.populateStyleSheetList(); + } + }, + _cssPanelBase : { + enumerable: true, + value: null, + writable:true + } +}); \ No newline at end of file -- cgit v1.2.3