incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r438260 - /incubator/xap/trunk/src/xap/components/dojo/FreePanel.js
Date Tue, 29 Aug 2006 22:17:57 GMT
Author: jmargaris
Date: Tue Aug 29 15:17:56 2006
New Revision: 438260

URL: http://svn.apache.org/viewvc?rev=438260&view=rev
Log:
added freepanel as new dojo-esque widget

Added:
    incubator/xap/trunk/src/xap/components/dojo/FreePanel.js   (with props)

Added: incubator/xap/trunk/src/xap/components/dojo/FreePanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/dojo/FreePanel.js?rev=438260&view=auto
==============================================================================
--- incubator/xap/trunk/src/xap/components/dojo/FreePanel.js (added)
+++ incubator/xap/trunk/src/xap/components/dojo/FreePanel.js Tue Aug 29 15:17:56 2006
@@ -0,0 +1,37 @@
+dojo.widget.manager.registerWidgetPackage("xap.components.dojo");
+
+Xap.provide("xap.components.dojo.FreePanel");
+
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.dom");
+dojo.require("dojo.html");
+dojo.require("dojo.style");
+dojo.require("dojo.event");
+
+dojo.widget.tags.addParseTreeHandler("dojo:FreePanel");
+
+xap.components.dojo.FreePanel = function(){
+	dojo.widget.HtmlWidget.call(this);
+}
+dojo.inherits(xap.components.dojo.FreePanel, dojo.widget.HtmlWidget);
+
+dojo.lang.extend(xap.components.dojo.FreePanel, {
+
+	//setting display:block on a div should work but doesn't.
+	//If you set absolute position on a div then it creates a block in the box
+	//model but then the div is absolute which we don't want.
+	//so we put stuff in a table which DOES define a block in the box model
+	templateString: '<table cellPadding="0" cellSpacing="0"><tr><td><div
dojoAttachPoint="containerNode" style="width: 100%; height: 100%; position:relative"></td></tr></table>',
+	templateCssPath: null ,
+	widgetType: "FreePanel",
+	isContainer: true,
+	
+	addChild: function(child, overrideContainerNode, pos, ref, insertIndex){
+		child.domNode.style.position = "absolute";
+		dojo.widget.html.TabContainer.superclass.addChild.call(this,child, overrideContainerNode,
pos, ref, insertIndex);
+	}
+}
+);
+
+

Propchange: incubator/xap/trunk/src/xap/components/dojo/FreePanel.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message