瀏覽代碼

Fixed Trac#368: (regression compared to 1.0.2) textarea was too small when exporting a list as CSV.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1164 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 年之前
父節點
當前提交
a8665eef41
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      pages/UI.php

+ 3 - 2
pages/UI.php

@@ -483,7 +483,8 @@ function DisplaySearchSet($oP, $oFilter, $bSearchForm = true, $sBaseClass = '',
 	{
 		$oBlock = new DisplayBlock($oFilter, 'csv', false);
 		$oBlock->Display($oP, 1);
-		$oP->add_ready_script(" $('#csv').css('height', '95%');"); // adjust the size of the block
+		// Adjust the size of the Textarea containing the CSV to fit almost all the remaining space
+		$oP->add_ready_script(" $('#1>textarea').height($('#1').parent().height() - $('#0').outerHeight() - 30).width( $('#1').parent().width() - 20);"); // adjust the size of the block
 	}
 	else
 	{
@@ -676,7 +677,7 @@ try
 			$oP->set_title(Dict::S('UI:SearchResultsPageTitle'));
 			// TO DO: limit the search filter by the user context
 			$oFilter = CMDBSearchFilter::unserialize($sFilter); // TO DO : check that the filter is valid
-		DisplaySearchSet($oP, $oFilter, $bSearchForm, '' /* sBaseClass */, $sFormat);
+			DisplaySearchSet($oP, $oFilter, $bSearchForm, '' /* sBaseClass */, $sFormat);
 		break;
 	
 		///////////////////////////////////////////////////////////////////////////////////////////