mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	fix export, export xlsx, do not collapse search form anymore
This commit is contained in:
		
							parent
							
								
									20dd55840e
								
							
						
					
					
						commit
						50d528a831
					
				|  | @ -83,6 +83,7 @@ $(document).ready(function() { | |||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$entries = $this->params['searchhits']; | ||||
| 		$includecontent = $this->params['includecontent']; | ||||
| 
 | ||||
| 		include("../inc/inc.ClassDownloadMgr.php"); | ||||
| 		$downmgr = new SeedDMS_Download_Mgr(); | ||||
|  | @ -91,14 +92,14 @@ $(document).ready(function() { | |||
| 		foreach($entries as $entry) { | ||||
| 			if($entry->isType('document')) { | ||||
| 				$extracols = $this->callHook('extraDownloadColumns', $entry); | ||||
| 				if(isset($_GET['includecontent']) && $_GET['includecontent'] && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) { | ||||
| 				if($includecontent && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) { | ||||
| 					$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent); | ||||
| 				} else | ||||
| 					$downmgr->addItem($entry->getLatestContent(), $extracols); | ||||
| 			} | ||||
| 		} | ||||
| 		$filename = tempnam(sys_get_temp_dir(), ''); | ||||
| 		if(isset($_GET['includecontent']) && $_GET['includecontent']) { | ||||
| 		if($includecontent) { | ||||
| 			$downmgr->createArchive($filename); | ||||
| 			header("Content-Transfer-Encoding: binary"); | ||||
| 			header("Content-Length: " . filesize($filename)); | ||||
|  | @ -109,8 +110,8 @@ $(document).ready(function() { | |||
| 			$downmgr->createToc($filename); | ||||
| 			header("Content-Transfer-Encoding: binary"); | ||||
| 			header("Content-Length: " . filesize($filename)); | ||||
| 			header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xls\""); | ||||
| 			header("Content-Type: application/vnd.ms-excel"); | ||||
| 			header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xlsx\""); | ||||
| 			header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); | ||||
| 			header("Cache-Control: must-revalidate"); | ||||
| 		} | ||||
| 
 | ||||
|  | @ -241,9 +242,10 @@ function typeahead() { /* {{{ */ | |||
| 
 | ||||
| 		$this->rowStart(); | ||||
| 		$this->columnStart(4); | ||||
| 		$this->contentHeading("<button class=\"btn btn-primary\" id=\"searchform-toggle\" data-toggle=\"collapse\" href=\"#searchform\"><i class=\"fa fa-exchange\"></i></button> ".getMLText('search'), true); | ||||
| 		//$this->contentHeading("<button class=\"btn btn-primary\" id=\"searchform-toggle\" data-toggle=\"collapse\" href=\"#searchform\"><i class=\"fa fa-exchange\"></i></button> ".getMLText('search'), true);
 | ||||
| 		$this->contentHeading(getMLText('search'), true); | ||||
| 		if($this->query) { | ||||
| 		echo "<div id=\"searchform\" class=\"collapse mb-sm-4\">"; | ||||
| 		echo "<div id=\"searchform\" class=\"_collapse mb-sm-4\">"; | ||||
| 		} | ||||
| ?>
 | ||||
|   <ul class="nav nav-pills" id="searchtab"> | ||||
|  | @ -387,10 +389,12 @@ function typeahead() { /* {{{ */ | |||
| 					'element'=>'input', | ||||
| 					'type'=>'checkbox', | ||||
| 					'name'=>'includecontent', | ||||
| 					'id'=>'includecontent', | ||||
| 					'value'=>1, | ||||
| 				) | ||||
| 			); | ||||
| 			$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export')); | ||||
| 			//$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export'));
 | ||||
| 			print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), "<i class=\"fa fa-download\"></i> ".getMLText("export"), false, true)."\n"; | ||||
| 			$content = ob_get_clean(); | ||||
| 			$this->printAccordion(getMLText('export'), $content); | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann