set a default dialog width/height of 60%
This commit is contained in:
parent
39d909ab5f
commit
e180c0b6c4
1 changed files with 8 additions and 1 deletions
|
|
@ -430,6 +430,13 @@ WebGUI.Admin.prototype.openModalDialog
|
||||||
return; // Can't have more than one open
|
return; // Can't have more than one open
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !width ) {
|
||||||
|
width = parseInt( YAHOO.util.Dom.getViewportWidth() * 0.6 ) + "px";
|
||||||
|
}
|
||||||
|
if ( !height ) {
|
||||||
|
height = parseInt( YAHOO.util.Dom.getViewportHeight() * 0.6 ) + "px";
|
||||||
|
}
|
||||||
|
|
||||||
var dialog = new YAHOO.widget.Panel( 'adminModalDialog', {
|
var dialog = new YAHOO.widget.Panel( 'adminModalDialog', {
|
||||||
"width" : width,
|
"width" : width,
|
||||||
"height" : height,
|
"height" : height,
|
||||||
|
|
@ -441,7 +448,7 @@ WebGUI.Admin.prototype.openModalDialog
|
||||||
visible : true,
|
visible : true,
|
||||||
draggable : false
|
draggable : false
|
||||||
} );
|
} );
|
||||||
dialog.setBody( '<iframe src="' + url + '" width="' + width + '" height="' + height + '"></iframe>' );
|
dialog.setBody( '<iframe src="' + url + '" width="100%" height="100%"></iframe>' );
|
||||||
dialog.render( document.body );
|
dialog.render( document.body );
|
||||||
|
|
||||||
this.modalDialog = dialog;
|
this.modalDialog = dialog;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue