Ver código fonte

Allow to specify the name of the PDF to download

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1906 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 anos atrás
pai
commit
405b2da785
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      application/itopwebpage.class.inc.php

+ 7 - 2
application/itopwebpage.class.inc.php

@@ -202,7 +202,7 @@ EOF
 			$("tbody tr.green_even:odd",table).removeClass('even').removeClass('green_even').addClass('green');
 		} 
 	});
-
+	
 	// Adjust initial size
 	$('.v-resizable').each( function()
 		{
@@ -844,7 +844,12 @@ EOF
 					$oMPDF->SetDocTemplate ($this->GetOutputOption('pdf', 'template_path'), 1);
 			}
 			$oMPDF->WriteHTML($sHtml);
-			$oMPDF->Output();
+			$sOutputName = $this->s_title.'.pdf';
+			if ($this->GetOutputOption('pdf', 'output_name'))
+			{
+				$sOutputName = $this->GetOutputOption('pdf', 'output_name');
+			}
+			$oMPDF->Output($sOutputName, 'I');
 		}
 	}