Browse Source

#940 "Close" and "Reopen" buttons were not working on IE (due to extra commas at the end of JS lists)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3228 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 years ago
parent
commit
9bc37294b2
1 changed files with 11 additions and 3 deletions
  1. 11 3
      portal/index.php

+ 11 - 3
portal/index.php

@@ -1164,9 +1164,17 @@ function MakeStimulusForm(WebPage $oP, $oObj, $sStimulusCode, $aEditAtt)
 
 function RunStimulusDialog(sStimulusCode, sTitle, sOkButtonLabel)
 {
+	var sWidth = 'auto';
+	if (sStimulusCode == 'ev_reopen')
+	{
+		// Avoid having a dialog spanning the complete width of the window
+		// just because it contains a CaseLog entry
+		sWidth = '80%';
+	}
+				
 	$('#'+sStimulusCode+'_dialog').dialog({
 		height: 'auto',
-		width: 'auto',
+		width: sWidth,
 		modal: true,
 		title: sTitle,
 		buttons: [
@@ -1175,8 +1183,8 @@ function RunStimulusDialog(sStimulusCode, sTitle, sOkButtonLabel)
 		} },
 		{ text: "$sCancelButtonLabel", click: function() {
 			$(this).dialog( "close" );
-		} },
-		],
+		} }
+		]
 	});
 	// Start the validation
 	CheckFields(sStimulusCode+'_form', false);