Explorar o código

internal: new autoOpen flag.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3853 a333f486-631f-4898-b8df-5754b55c2be0
dflaven %!s(int64=9) %!d(string=hai) anos
pai
achega
a7d9dda299
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      application/forms.class.inc.php

+ 3 - 1
application/forms.class.inc.php

@@ -339,7 +339,7 @@ EOF
 		return '</tr>';
 	}
 	
-	public function RenderAsDialog($oPage, $sDialogId, $sDialogTitle, $iDialogWidth, $sOkButtonLabel, $sIntroduction = null)
+	public function RenderAsDialog($oPage, $sDialogId, $sDialogTitle, $iDialogWidth, $sOkButtonLabel, $sIntroduction = null, $bAutoOpen = true)
 	{
 		$this->SetPrefix('dlg_'); // To make sure that the controls have different IDs that the property sheet which may be displayed at the same time
 		
@@ -355,12 +355,14 @@ EOF
 		$this->Render($oPage);
 		$oPage->add('</div>');
 		
+		$sAutoOpen = $bAutoOpen ? 'true' : 'false';
 		$oPage->add_ready_script(
 <<<EOF
 $('#$sDialogId').dialog({
 		height: 'auto',
 		width: $iDialogWidth,
 		modal: true,
+		autoOpen: $sAutoOpen,
 		title: '$sDialogTitle',
 		buttons: [
 		{ text: "$sOkButtonLabel", click: function() {