Changeset 13897
- Timestamp:
- 06/04/08 19:18:42 (6 months ago)
- Location:
- dijit/trunk/layout
- Files:
-
- 8 modified
-
AccordionContainer.js (modified) (1 diff)
-
BorderContainer.js (modified) (5 diffs)
-
LayoutContainer.js (modified) (3 diffs)
-
SplitContainer.js (modified) (5 diffs)
-
StackContainer.js (modified) (4 diffs)
-
TabContainer.js (modified) (1 diff)
-
templates/TabContainer.html (modified) (1 diff)
-
_LayoutWidget.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/layout/AccordionContainer.js
r13886 r13897 31 31 _verticalSpace: 0, 32 32 33 // class: String 34 // Class name to apply to this.domNode 35 "class": "dijitAccordionContainer", 36 33 37 postCreate: function(){ 34 38 this.domNode.style.overflow = "hidden"; 35 39 this.inherited(arguments); 36 40 dijit.setWaiRole(this.domNode, "tablist"); 37 dojo.addClass(this.domNode, "dijitAccordionContainer");38 41 }, 39 42 -
dijit/trunk/layout/BorderContainer.js
r13779 r13897 47 47 persist: false, // Boolean 48 48 49 // class: String 50 // Class name to apply to this.domNode 51 "class": "dijitBorderContainer", 52 49 53 // _splitterClass: String 50 54 // Optional hook to override the default Splitter widget used by BorderContainer … … 56 60 this._splitters = {}; 57 61 this._splitterThickness = {}; 58 dojo.addClass(this.domNode, "dijitBorderContainer");59 62 }, 60 63 … … 75 78 var region = child.region; 76 79 if(region){ 77 // dojo.addClass(child.domNode, "dijitBorderContainerPane"); 78 child.domNode.style.position = "absolute"; // bill says not to set this in CSS, since we can't keep others 79 // from destroying the class list 80 this.inherited(arguments); 81 82 // set position directly; we could set a class name like dijitBorderContainerPane with 83 // position:absolute but it might be overridden by (for example) a position:relative 84 // in the dijitTabContainer class 85 child.domNode.style.position = "absolute"; 80 86 81 87 var ltr = this.isLeftToRight(); … … 111 117 addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){ 112 118 this.inherited(arguments); 113 this._setupChild(child);114 119 if(this._started){ 115 120 this._layoutChildren(); //OPT … … 131 136 this._layoutChildren(child.region); 132 137 } 138 this.inherited(arguments); 133 139 }, 134 140 -
dijit/trunk/layout/LayoutContainer.js
r12773 r13897 31 31 // | <div dojoType="dijit.layout.ContentPane" layoutAlign="client">client area</div> 32 32 // | </div> 33 // | 34 // | Lays out each child in the natural order the children occur in. 35 // | Basically each child is laid out into the "remaining space", where "remaining space" is initially 36 // | the content area of this widget, but is reduced to a smaller rectangle each time a child is added. 37 // 33 // 34 // Lays out each child in the natural order the children occur in. 35 // Basically each child is laid out into the "remaining space", where "remaining space" is initially 36 // the content area of this widget, but is reduced to a smaller rectangle each time a child is added. 37 38 // class: String 39 // Class name to apply to this.domNode 40 "class": "dijitLayoutContainer", 38 41 39 42 constructor: function(){ … … 46 49 47 50 addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){ 48 dijit._Container.prototype.addChild.apply(this,arguments);51 this.inherited(arguments); 49 52 if(this._started){ 50 53 dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren()); … … 53 56 54 57 removeChild: function(/*Widget*/ widget){ 55 dijit._Container.prototype.removeChild.apply(this,arguments);58 this.inherited(arguments); 56 59 if(this._started){ 57 60 dijit.layout.layoutChildren(this.domNode, this._contentBox, this.getChildren()); -
dijit/trunk/layout/SplitContainer.js
r13182 r13897 43 43 persist: true, 44 44 45 // class: String 46 // Class name to apply to this.domNode 47 "class": "dijitSplitContainer", 48 45 49 postMixInProperties: function(){ 46 50 this.inherited("postMixInProperties",arguments); … … 49 53 50 54 postCreate: function(){ 51 this.inherited( "postCreate",arguments);55 this.inherited(arguments); 52 56 this.sizers = []; 53 dojo.addClass(this.domNode, "dijitSplitContainer"); 57 54 58 // overflow has to be explicitly hidden for splitContainers using gekko (trac #1435) 55 59 // to keep other combined css classes from inadvertantly making the overflow visible … … 91 95 dojo.forEach(this.getChildren(), function(child, i, children){ 92 96 // attach the children and create the draggers 93 this._ injectChild(child);97 this._setupChild(child); 94 98 95 99 if(i < children.length-1){ … … 105 109 }, 106 110 107 _injectChild: function(child){ 111 _setupChild: function(/*Widget*/ child){ 112 this.inherited(arguments); 108 113 child.domNode.style.position = "absolute"; 109 114 dojo.addClass(child.domNode, "dijitSplitPane"); … … 158 163 // insertIndex: postion in the "stack" to add the child widget 159 164 160 this.inherited( "addChild",arguments);165 this.inherited(arguments); 161 166 162 167 if(this._started){ 163 168 // Do the stuff that startup() does for each widget 164 this._injectChild(child);165 169 var children = this.getChildren(); 166 170 if(children.length > 1){ -
dijit/trunk/layout/StackContainer.js
r13547 r13897 22 22 // 23 23 // Can be base class for container, Wizard, Show, etc. 24 // 25 // 24 26 25 // doLayout: Boolean 27 26 // if true, change the size of my currently displayed child to match my size 28 27 doLayout: true, 28 29 // class: String 30 // Class name to apply to this.domNode 31 "class": "dijitStackContainer", 29 32 30 33 _started: false, … … 73 76 }, 74 77 75 _setupChild: function(/*Widget*/ page){78 _setupChild: function(/*Widget*/ child){ 76 79 // Summary: prepare the given child 77 80 78 page.domNode.style.display = "none"; 81 this.inherited(arguments); 82 83 child.domNode.style.display = "none"; 79 84 80 85 // since we are setting the width/height of the child elements, they need 81 86 // to be position:relative, or IE has problems (See bug #2033) 82 page.domNode.style.position = "relative";83 84 return page; // dijit._Widget87 child.domNode.style.position = "relative"; 88 89 return child; // dijit._Widget 85 90 }, 86 91 … … 88 93 // summary: Adds a widget to the stack 89 94 90 dijit._Container.prototype.addChild.apply(this, arguments); 91 child = this._setupChild(child); 95 this.inherited(arguments); 92 96 93 97 if(this._started){ … … 107 111 // summary: Removes the pane from the stack 108 112 109 dijit._Container.prototype.removeChild.apply(this,arguments);113 this.inherited(arguments); 110 114 111 115 // If we are being destroyed than don't run the code below (to select another page), because we are deleting -
dijit/trunk/layout/TabContainer.js
r13696 r13897 16 16 // Publishes topics [widgetId]-addChild, [widgetId]-removeChild, and [widgetId]-selectChild 17 17 // (where [widgetId] is the id of the TabContainer itself. 18 // 18 19 19 // tabPosition: String 20 20 // Defines where tabs go relative to tab content. 21 21 // "top", "bottom", "left-h", "right-h" 22 22 tabPosition: "top", 23 24 // class: String 25 // Class name to apply to this.domNode 26 "class": "dijitTabContainer", 23 27 24 28 templateString: null, // override setting in StackContainer -
dijit/trunk/layout/templates/TabContainer.html
r11100 r13897 1 <div class="dijitTabContainer">1 <div> 2 2 <div dojoAttachPoint="tablistNode"></div> 3 3 <div class="dijitTabPaneWrapper" dojoAttachPoint="containerNode"></div> -
dijit/trunk/layout/_LayoutWidget.js
r12336 r13897 11 11 // Widgets which mixin this code must define layout() to lay out the children 12 12 13 // class: String 14 // Class name to apply to this.domNode 15 "class": "dijitLayoutContainer", 16 13 17 isLayoutContainer: true, 14 18 15 19 postCreate: function(){ 16 20 dojo.addClass(this.domNode, "dijitContainer"); 21 dojo.addClass(this.domNode, this["class"]); 17 22 }, 18 23 … … 87 92 // This is called after startup(), and also when the widget's size has been 88 93 // changed. 94 }, 95 96 _setupChild: function(/*Widget*/child){ 97 // summary: common setup for initial children or children which are added after startup 98 if(child["class"]){ 99 dojo.addClass(child.domNode, this["class"]+"-"+child["class"]); 100 } 101 }, 102 103 addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex){ 104 this.inherited(arguments); 105 this._setupChild(child); 106 }, 107 108 removeChild: function(/*Widget*/ child){ 109 if(child["class"]){ 110 dojo.removeClass(child.domNode, this["class"]+"-"+child["class"]); 111 } 112 this.inherited(arguments); 89 113 } 90 114 }