Dialog which provides adjustments for working with a layout in a Dialog.
Add your neccessary layout config options to the dialogs config.
Example Usage (including a nested layout):
if(!dialog){
dialog = new YAHOO.ext.LayoutDialog("download-dlg", {
modal: true,
width:600,
height:450,
shadow:true,
minWidth:500,
minHeight:350,
autoTabs:true,
proxyDrag:true,
// layout config merges with the dialog config
center:{
tabPosition: 'top',
alwaysShowTabs: true
}
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.setDefaultButton(dialog.addButton('Close', dialog.hide, dialog));
dialog.addButton('Build It!', this.getDownload, this);
// we can even add nested layouts
var innerLayout = new YAHOO.ext.BorderLayout('dl-inner', {
east: {
initialSize: 200,
autoScroll:true,
split:true
},
center: {
autoScroll:true
}
});
innerLayout.beginUpdate();
innerLayout.add('east', new YAHOO.ext.ContentPanel('dl-details'));
innerLayout.add('center', new YAHOO.ext.ContentPanel('selection-panel'));
innerLayout.endUpdate(true);
// when doing updates to the top level layout in a dialog, you need to
// use dialog.beginUpdate()/endUpdate() instead of layout.beginUpdate()/endUpdate()
var layout = dialog.getLayout();
dialog.beginUpdate();
layout.add('center', new YAHOO.ext.ContentPanel('standard-panel',
{title: 'Download the Source', fitToFrame:true}));
layout.add('center', new YAHOO.ext.NestedLayoutPanel(innerLayout,
{title: 'Build your own yui-ext.js'}));
layout.getRegion('center').showPanel(sp);
dialog.endUpdate();
|
LayoutDialog(String/HTMLElement/YAHOO.ext.Element el , Object config ) |
LayoutDialog |
|
|
addButton(String/Object config , Function handler , [Object scope ]) : YAHOO.ext.Button |
BasicDialog |
Adds a button. |
|
addKeyListener(Number/Array/Object key , Function fn , [Object scope ]) : YAHOO.ext.BasicDialog |
BasicDialog |
Adds a key listener for when this dialog is displayed |
|
addListener(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this component |
|
beginUpdate() : void |
LayoutDialog |
Deprecated. Begins an update of the layout and sets display to block and visibility to hidden. Use standard beginUpda... |
|
bufferedListener(String eventName , Function handler , [Object scope ], [Number millis ]) : Function |
Observable |
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specifie... |
|
center() : YAHOO.ext.BasicDialog |
BasicDialog |
Centers this dialog |
|
delayedListener(String eventName , Function handler , [Object scope ], [Number delay ]) : Function |
Observable |
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for e... |
|
destroy([Boolean removeEl ]) : void |
BasicDialog |
Destroys this dialog |
|
endUpdate() : void |
LayoutDialog |
Deprecated. Ends update of the layout and resets display to none. Use standard beginUpdate/endUpdate on the layout. |
|
fireEvent(String eventName , Object... args ) : Boolean |
Observable |
Fires the specified event with the passed parameters (minus the event name). |
|
getEl() : YAHOO.ext.Element |
BasicDialog |
Returns the element for this dialog |
|
getLayout() : YAHOO.ext.BorderLayout |
LayoutDialog |
Get the BorderLayout for this dialog |
|
getTabs() : YAHOO.ext.TabPanel |
BasicDialog |
Returns the TabPanel component (if autoTabs) |
|
hide([Function callback ]) : YAHOO.ext.BasicDialog |
BasicDialog |
Hides the dialog. |
|
isVisible() : Boolean |
BasicDialog |
Returns true if the dialog is visible |
|
moveTo(Number x , Number y ) : YAHOO.ext.BasicDialog |
BasicDialog |
Moves the dialog to the specified point |
|
on(String eventName , Function handler , [Object scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this element (shorthand for addListener) |
|
purgeListeners() : void |
Observable |
Removes all listeners for this object |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener |
|
resizeTo(Number width , Number height ) : YAHOO.ext.BasicDialog |
BasicDialog |
Resizes the dialog. |
|
restoreState() : YAHOO.ext.BasicDialog |
BasicDialog |
Restores the previous state of the dialog if YAHOO.ext.state is configured |
|
setDefaultButton(YAHOO.ext.BasicDialog.Button btn ) : YAHOO.ext.BasicDialog |
BasicDialog |
Sets the default button to be focused when the dialog is displayed |
|
setTitle(String text ) : YAHOO.ext.BasicDialog |
BasicDialog |
Sets the dialog title. |
|
show([String/HTMLElement/YAHOO.ext.Element animateTarget ]) : YAHOO.ext.BasicDialog |
BasicDialog |
Shows the dialog. |
|
toBack() : YAHOO.ext.BasicDialog |
BasicDialog |
Sends this dialog to the back (under) of any other visible dialogs |
|
toFront() : YAHOO.ext.BasicDialog |
BasicDialog |
Brings this dialog to the front of any other visible dialogs |
|
beforehide : (YAHOO.ext.BasicDialog this ) |
BasicDialog |
Fires before this dialog is hidden. |
|
beforeshow : (YAHOO.ext.BasicDialog this ) |
BasicDialog |
Fires before this dialog is shown. |
|
hide : (YAHOO.ext.BasicDialog this ) |
BasicDialog |
Fires when this dialog is hidden. |
|
keydown : (YAHOO.ext.BasicDialog this , YAHOO.ext.EventObject e ) |
BasicDialog |
Fires when a key is pressed |
|
move : (YAHOO.ext.BasicDialog this , Number x , Number y ) |
BasicDialog |
Fires when this dialog is moved by the user. |
|
resize : (YAHOO.ext.BasicDialog this , Number width , Number height ) |
BasicDialog |
Fires when this dialog is resized by the user. |
|
show : (YAHOO.ext.BasicDialog this ) |
BasicDialog |
Fires when this dialog is shown. |