Changeset 12161
- Timestamp:
- 01/25/08 01:07:09 (7 months ago)
- Location:
- dijit/trunk
- Files:
-
- 3 modified
-
Dialog.js (modified) (5 diffs)
-
layout/ContentPane.js (modified) (4 diffs)
-
tests/test_Dialog.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/Dialog.js
r12144 r12161 144 144 _lastFocusItem:null, 145 145 146 // doLayout: Boolean 147 // Don't change this parameter from the default value. 148 // This ContentPane parameter doesn't make sense for Dialog, since Dialog 149 // is never a child of a layout Container, nor can you specify the size of 150 // Dialog in order to control the size of an inner widget. 151 doLayout: false, 152 146 153 attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap), 147 154 {title: "titleBar"}), … … 150 157 dojo.body().appendChild(this.domNode); 151 158 this.inherited("postCreate",arguments); 152 this.domNode.style. display="none";159 this.domNode.style.visibility="hidden"; 153 160 this.connect(this, "onExecute", "hide"); 154 161 this.connect(this, "onCancel", "hide"); … … 204 211 duration: this.duration, 205 212 onEnd: function(){ 206 node.style. display="none";213 node.style.visibility="hidden"; 207 214 } 208 215 }), … … 300 307 301 308 dojo.style(this.domNode, "opacity", 0); 302 this.domNode.style. display="block";309 this.domNode.style.visibility=""; 303 310 this.open = true; 304 311 this._loadCheck(); // lazy load trigger … … 343 350 layout: function() { 344 351 // summary: position the Dialog and the underlay 345 if(this.domNode.style. display == "block"){352 if(this.domNode.style.visibility != "hidden"){ 346 353 this._underlay.layout(); 347 354 this._position(); -
dijit/trunk/layout/ContentPane.js
r12160 r12161 75 75 "class": "dijitContentPane", 76 76 77 // layout: String/Boolean77 // doLayout: String/Boolean 78 78 // false - don't adjust size of children 79 79 // true - looks for the first sizable child widget (ie, having resize() method) and sets it's size to 80 // however big the ContentPane is 80 // however big the ContentPane is (TODO: implement) 81 81 // auto - if there is a single sizable child widget (ie, having resize() method), set it's size to 82 82 // however big the ContentPane is … … 103 103 startup: function(){ 104 104 if(this._started){ return; } 105 this._checkIfSingleChild(); 106 if(this._singleChild){ 107 this._singleChild.startup(); 105 if(this.doLayout != "false" && this.doLayout !== false){ 106 this._checkIfSingleChild(); 107 if(this._singleChild){ 108 this._singleChild.startup(); 109 } 108 110 } 109 111 this._loadCheck(); … … 174 176 } 175 177 176 //if(this.doLayout != "false" && this.doLayout !== false){178 if(this.doLayout != "false" && this.doLayout !== false){ 177 179 this._checkIfSingleChild(); 178 180 console.log("singlechild " , this._singleChild, " my content box is ", this._contentBox); … … 181 183 this._singleChild.resize(this._contentBox || dojo.contentBox(this.containerNode || this.domNode)); 182 184 } 183 //}185 } 184 186 185 187 this._onLoadHandler(); -
dijit/trunk/tests/test_Dialog.html
r12144 r12161 22 22 dojo.require("dijit.form.TimeTextBox"); 23 23 dojo.require("dijit.form.FilteringSelect"); 24 dojo.require("dijit.layout.TabContainer"); 24 25 dojo.require("dijit.Menu"); 25 26 dojo.require("dojo.parser"); // scan page for widgets and instantiate them … … 155 156 </div> 156 157 158 <button dojoType="dijit.form.Button" onclick="dijit.byId('tabDialog').show()">Show TabContainer Dialog</button> | 159 160 <div dojoType="dijit.Dialog" id="tabDialog" title="TabContainer Dialog"> 161 <div dojoType="dijit.layout.TabContainer" style="width: 400px; height: 400px;"> 162 <div dojoType="dijit.layout.ContentPane" title="First tab"> 163 <p> 164 This is the first tab. 165 </p> 166 <p> 167 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean 168 semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin 169 porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi. 170 Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis. 171 Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae 172 risus. 173 </p> 174 </div> 175 <div dojoType="dijit.layout.ContentPane" title="Second tab"> 176 <p> 177 This is the second tab. 178 </p> 179 <p> 180 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean 181 semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin 182 porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi. 183 Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis. 184 Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae 185 risus. 186 </p> 187 </div> 188 </div> 189 </div> 157 190 158 191 <button dojoType="dijit.form.Button" onclick="dijit.byId('fifthDlg').show();">Test slow loading HREF Dialog</button>