mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	timeline can be limited to date range
This commit is contained in:
		
							parent
							
								
									083e323721
								
							
						
					
					
						commit
						c8b007a1af
					
				|  | @ -2017,7 +2017,7 @@ mayscript> | |||
| 	 * | ||||
| 	 * @param object $document document | ||||
| 	 */ | ||||
| 	protected function printTimeline($timeline, $height=300) { /* {{{ */ | ||||
| 	protected function printTimeline($timeline, $height=300, $start='', $end='') { /* {{{ */ | ||||
| ?>
 | ||||
| 	<script type="text/javascript"> | ||||
| 		var timeline; | ||||
|  | @ -2038,7 +2038,18 @@ mayscript> | |||
| 		// specify options
 | ||||
| 		var options = { | ||||
| 			'width':  '100%', | ||||
| 			'height': '<?= $height ?>px', | ||||
| 			'_height': '<?= $height ?>px', | ||||
| 			'height': '100%', | ||||
| <?php | ||||
| 		if($start) { | ||||
| 			$tmp = explode('-', $start); | ||||
| 			echo "'min': new Date(".$tmp[0].", ".($tmp[1]-1).", ".$tmp[2]."),"; | ||||
| 		} | ||||
| 		if($end) { | ||||
| 			$tmp = explode('-', $end); | ||||
| 			echo "'max': new Date(".$tmp[0].", ".($tmp[1]-1).", ".$tmp[2]."),"; | ||||
| 		} | ||||
| ?>
 | ||||
| 			'editable': false,   // enable dragging and editing events
 | ||||
| 			'style': 'box', | ||||
| 			'locale': 'de_DE' | ||||
|  | @ -2052,7 +2063,7 @@ mayscript> | |||
| 		}); | ||||
| 
 | ||||
| 	</script> | ||||
| 	<div id="timeline"></div> | ||||
| 	<div id="timeline" style="height: <?= $height ?>px;"></div> | ||||
| <?php | ||||
| 	} /* }}} */ | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann