1318 |
alexandre_ |
1 |
/*
|
|
|
2 |
Copyright (c) 2004-2006, The Dojo Foundation
|
|
|
3 |
All Rights Reserved.
|
|
|
4 |
|
|
|
5 |
Licensed under the Academic Free License version 2.1 or above OR the
|
|
|
6 |
modified BSD license. For more information on Dojo licensing, see:
|
|
|
7 |
|
|
|
8 |
http://dojotoolkit.org/community/licensing.shtml
|
|
|
9 |
*/
|
|
|
10 |
|
|
|
11 |
dojo.provide("dojo.widget.LayoutContainer");
|
|
|
12 |
dojo.require("dojo.widget.*");
|
|
|
13 |
dojo.require("dojo.widget.html.layout");
|
|
|
14 |
dojo.widget.defineWidget("dojo.widget.LayoutContainer", dojo.widget.HtmlWidget, {isContainer:true, layoutChildPriority:"top-bottom", postCreate:function () {
|
|
|
15 |
dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority);
|
|
|
16 |
}, addChild:function (child, overrideContainerNode, pos, ref, insertIndex) {
|
|
|
17 |
dojo.widget.LayoutContainer.superclass.addChild.call(this, child, overrideContainerNode, pos, ref, insertIndex);
|
|
|
18 |
dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority);
|
|
|
19 |
}, removeChild:function (pane) {
|
|
|
20 |
dojo.widget.LayoutContainer.superclass.removeChild.call(this, pane);
|
|
|
21 |
dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority);
|
|
|
22 |
}, onResized:function () {
|
|
|
23 |
dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority);
|
|
|
24 |
}, show:function () {
|
|
|
25 |
this.domNode.style.display = "";
|
|
|
26 |
this.checkSize();
|
|
|
27 |
this.domNode.style.display = "none";
|
|
|
28 |
this.domNode.style.visibility = "";
|
|
|
29 |
dojo.widget.LayoutContainer.superclass.show.call(this);
|
|
|
30 |
}});
|
|
|
31 |
dojo.lang.extend(dojo.widget.Widget, {layoutAlign:"none"});
|
|
|
32 |
|