From e180c0b6c47e509638253befe84c25c233e25856 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Fri, 30 Jul 2010 14:28:59 -0500 Subject: [PATCH] set a default dialog width/height of 60% --- www/extras/admin/admin.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 0ef30546e..5b895f08d 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -430,6 +430,13 @@ WebGUI.Admin.prototype.openModalDialog 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', { "width" : width, "height" : height, @@ -441,7 +448,7 @@ WebGUI.Admin.prototype.openModalDialog visible : true, draggable : false } ); - dialog.setBody( '' ); + dialog.setBody( '' ); dialog.render( document.body ); this.modalDialog = dialog;