mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 13:42:04 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
9d763b60a5
|
@ -4,6 +4,7 @@
|
||||||
- fix lots of HTTP-Headers in op.Ajax.php (Closes: #233)
|
- fix lots of HTTP-Headers in op.Ajax.php (Closes: #233)
|
||||||
- Timeline will be updated by ajax call, clicking on an item in the timeline
|
- Timeline will be updated by ajax call, clicking on an item in the timeline
|
||||||
will output some document information
|
will output some document information
|
||||||
|
- Timeline now ends at end of the last day. Previously this day wasn't included
|
||||||
- new attribute type 'date'
|
- new attribute type 'date'
|
||||||
- all dates are now in format 'yyyy-mm-dd'
|
- all dates are now in format 'yyyy-mm-dd'
|
||||||
- fix fatal error when requesting new password
|
- fix fatal error when requesting new password
|
||||||
|
|
|
@ -2200,9 +2200,8 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
$queryStr = "SELECT document FROM tblDocumentContent WHERE date > ".$startts." AND date < ".$endts;
|
$queryStr = "SELECT document FROM tblDocumentContent WHERE date > ".$startts." AND date < ".$endts;
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (!$resArr)
|
if ($resArr === false)
|
||||||
return false;
|
return false;
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
|
||||||
foreach($resArr as $rec) {
|
foreach($resArr as $rec) {
|
||||||
$document = $this->getDocument($rec['document']);
|
$document = $this->getDocument($rec['document']);
|
||||||
$timeline = array_merge($timeline, $document->getTimeline());
|
$timeline = array_merge($timeline, $document->getTimeline());
|
||||||
|
|
|
@ -35,17 +35,6 @@ if (!$user->isAdmin()) {
|
||||||
}
|
}
|
||||||
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
$rootfolder = $dms->getFolder($settings->_rootFolderID);
|
||||||
|
|
||||||
if(!empty($_GET['fromdate'])) {
|
|
||||||
$from = makeTsFromLongDate($_GET['fromdate'].' 00:00:00');
|
|
||||||
} else {
|
|
||||||
$from = time()-7*86400;
|
|
||||||
}
|
|
||||||
if(!empty($_GET['todate'])) {
|
|
||||||
$to = makeTsFromLongDate($_GET['todate'].' 23:59:59');
|
|
||||||
} else {
|
|
||||||
$to = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET['skip']))
|
if(isset($_GET['skip']))
|
||||||
$skip = $_GET['skip'];
|
$skip = $_GET['skip'];
|
||||||
else
|
else
|
||||||
|
|
|
@ -82,28 +82,28 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($todate) {
|
if($todate) {
|
||||||
$to = makeTsFromLongDate($todate.' 00:00:00');
|
$to = makeTsFromLongDate($todate.' 23:59:59');
|
||||||
} else {
|
} else {
|
||||||
$to = time()-7*86400;
|
$to = time()-7*86400;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $dms->getTimeline($from, $to);
|
if($data = $dms->getTimeline($from, $to)) {
|
||||||
|
foreach($data as $i=>$item) {
|
||||||
foreach($data as &$item) {
|
switch($item['type']) {
|
||||||
switch($item['type']) {
|
case 'add_version':
|
||||||
case 'add_version':
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
break;
|
||||||
break;
|
case 'add_file':
|
||||||
case 'add_file':
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
break;
|
||||||
break;
|
case 'status_change':
|
||||||
case 'status_change':
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
$msg = '???';
|
||||||
$msg = '???';
|
}
|
||||||
|
$data[$i]['msg'] = $msg;
|
||||||
}
|
}
|
||||||
$item['msg'] = $msg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$jsondata = array();
|
$jsondata = array();
|
||||||
|
@ -144,7 +144,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($todate) {
|
if($todate) {
|
||||||
$to = makeTsFromLongDate($todate.' 00:00:00');
|
$to = makeTsFromLongDate($todate.' 23:59:59');
|
||||||
} else {
|
} else {
|
||||||
$to = time();
|
$to = time();
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,6 @@ echo "<div class=\"well\">\n";
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#update').click(function(ev){
|
$('#update').click(function(ev){
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
console.log($('#form1').serialize());
|
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
'out.Timeline.php?action=data&' + $('#form1').serialize(),
|
'out.Timeline.php?action=data&' + $('#form1').serialize(),
|
||||||
function(data) {
|
function(data) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user