mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
		
						commit
						607251e02d
					
				|  | @ -47,6 +47,8 @@ if(isset($_GET['documentid']) && $_GET['documentid'] && is_numeric($_GET['docume | |||
| 	if($document = $dms->getDocument($_GET["documentid"])) { | ||||
| 		if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) { | ||||
| 			$content = $document->getContentByVersion($_GET['version']); | ||||
| 		} else { | ||||
| 			$content = $document->getLatestContent(); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  |  | |||
|  | @ -3849,7 +3849,7 @@ $(document).ready(function() { | |||
| 	 * | ||||
| 	 * @param object $document document | ||||
| 	 */ | ||||
| 	protected function printTimelineJs($timelineurl, $height=300, $start='', $end='', $skip=array()) { /* {{{ */ | ||||
| 	protected function printTimelineJs($timelineurl, $height=300, $start='', $end='', $skip=array(), $onselect="") { /* {{{ */ | ||||
| 		if(!$timelineurl) | ||||
| 			return; | ||||
| ?>
 | ||||
|  | @ -3876,21 +3876,16 @@ $(document).ready(function() { | |||
| 			'locale': '<?php echo $this->params['session']->getLanguage() ?>' | ||||
| 		}; | ||||
| 
 | ||||
| 		function onselect() { | ||||
| 			var sel = timeline.getSelection(); | ||||
| 			if (sel.length) { | ||||
| 				if (sel[0].row != undefined) { | ||||
| 					var row = sel[0].row; | ||||
| 					console.log(timeline.getItem(sel[0].row)); | ||||
| 					item = timeline.getItem(sel[0].row); | ||||
| 					$('div.ajax').trigger('update', {documentid: item.docid, version: item.version, statusid: item.statusid, statuslogid: item.statuslogid, fileid: item.fileid}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		$(document).ready(function () { | ||||
| 		// Instantiate our timeline object.
 | ||||
| 		timeline = new links.Timeline(document.getElementById('timeline'), options); | ||||
| 		links.events.addListener(timeline, 'select', onselect); | ||||
| <?php | ||||
| 		if($onselect): | ||||
| ?>
 | ||||
| 		links.events.addListener(timeline, 'select', <?= $onselect ?>);
 | ||||
| <?php | ||||
| 		endif; | ||||
| ?>
 | ||||
| 		$.getJSON( | ||||
| 			'<?php echo $timelineurl ?>',  | ||||
| 			function(data) { | ||||
|  |  | |||
|  | @ -158,10 +158,21 @@ $(document).ready(function () { | |||
| 		); | ||||
| 	}); | ||||
| }); | ||||
| 		function onselect() { | ||||
| 			var sel = timeline.getSelection(); | ||||
| 			if (sel.length) { | ||||
| 				if (sel[0].row != undefined) { | ||||
| 					var row = sel[0].row; | ||||
| 					console.log(timeline.getItem(sel[0].row)); | ||||
| 					item = timeline.getItem(sel[0].row); | ||||
| 					$('div.ajax').trigger('update', {documentid: item.docid, version: item.version, statusid: item.statusid, statuslogid: item.statuslogid, fileid: item.fileid}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| <?php | ||||
| 		$this->printDeleteDocumentButtonJs(); | ||||
| 		$timelineurl = 'out.Timeline.php?action=data&fromdate='.date('Y-m-d', $from).'&todate='.date('Y-m-d', $to).'&skip='.urldecode(http_build_query(array('skip'=>$skip))); | ||||
| 		$this->printTimelineJs($timelineurl, 550, ''/*date('Y-m-d', $from)*/, ''/*date('Y-m-d', $to+1)*/, $skip); | ||||
| 		$this->printTimelineJs($timelineurl, 550, ''/*date('Y-m-d', $from)*/, ''/*date('Y-m-d', $to+1)*/, $skip, 'onselect'); | ||||
| 		$this->printClickDocumentJs(); | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
|  |  | |||
|  | @ -3843,7 +3843,7 @@ $(document).ready(function() { | |||
| 	 * | ||||
| 	 * @param object $document document | ||||
| 	 */ | ||||
| 	protected function printTimelineJs($timelineurl, $height=300, $start='', $end='', $skip=array()) { /* {{{ */ | ||||
| 	protected function printTimelineJs($timelineurl, $height=300, $start='', $end='', $skip=array(), $onselect="") { /* {{{ */ | ||||
| 		if(!$timelineurl) | ||||
| 			return; | ||||
| ?>
 | ||||
|  | @ -3870,21 +3870,16 @@ $(document).ready(function() { | |||
| 			'locale': '<?php echo $this->params['session']->getLanguage() ?>' | ||||
| 		}; | ||||
| 
 | ||||
| 		function onselect() { | ||||
| 			var sel = timeline.getSelection(); | ||||
| 			if (sel.length) { | ||||
| 				if (sel[0].row != undefined) { | ||||
| 					var row = sel[0].row; | ||||
| 					console.log(timeline.getItem(sel[0].row)); | ||||
| 					item = timeline.getItem(sel[0].row); | ||||
| 					$('div.ajax').trigger('update', {documentid: item.docid, version: item.version, statusid: item.statusid, statuslogid: item.statuslogid, fileid: item.fileid}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		$(document).ready(function () { | ||||
| 		// Instantiate our timeline object.
 | ||||
| 		timeline = new links.Timeline(document.getElementById('timeline'), options); | ||||
| 		links.events.addListener(timeline, 'select', onselect); | ||||
| <?php | ||||
| 		if($onselect): | ||||
| ?>
 | ||||
| 		links.events.addListener(timeline, 'select', <?= $onselect ?>);
 | ||||
| <?php | ||||
| 		endif; | ||||
| ?>
 | ||||
| 		$.getJSON( | ||||
| 			'<?php echo $timelineurl ?>',  | ||||
| 			function(data) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann