From ba4a6558b418c79258b265278984ffa23aff2f54 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 13:44:19 +0100 Subject: [PATCH 01/70] add new document list ReceiveOwner, list docs with revision in AppRevOwner --- SeedDMS_Core/Core/inc.ClassDMS.php | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 8d8fe20f4..65785a018 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1016,7 +1016,7 @@ class SeedDMS_Core_DMS { $queryStr = ''; } break; // }}} - case 'AppRevOwner': // Documents waiting for review/approval I'm owning {{{ + case 'AppRevOwner': // Documents waiting for review/approval/revision I'm owning {{{ $user = $param1; $orderby = $param3; if($param4 == 'desc') @@ -1024,7 +1024,7 @@ class SeedDMS_Core_DMS { else $orderdir = 'ASC'; $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") "; + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_IN_REVISION.") "; if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; @@ -1034,6 +1034,36 @@ class SeedDMS_Core_DMS { // "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". // "ORDER BY `statusDate` DESC"; break; // }}} + case 'ReceiveOwner': // Documents waiting for reception I'm owning {{{ + $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + + $qs = 'SELECT DISTINCT documentID FROM `tblDocumentRecipients` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentRecipients`.`version` AND `ttcontentid`.`document` = `tblDocumentRecipients`.`documentID`'; + $ra = $this->db->getResultArray($qs); + if (is_bool($ra) && !$ra) { + return false; + } + $docs = array(); + foreach($ra as $d) { + $docs[] = $d['documentID']; + } + + if ($docs) { + $queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") "; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."'"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; + } else { + $queryStr = ''; + } + break; // }}} case 'RejectOwner': // Documents that has been rejected and I'm owning {{{ $user = $param1; $orderby = $param3; From 520a783407f2412a1e23af1bf4c965def61cfd31 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 13:44:57 +0100 Subject: [PATCH 02/70] add list listReceiveOwner(), group lists in sections --- views/bootstrap/class.MyDocuments.php | 45 +++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index e4b1805a7..f08778eac 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -252,6 +252,36 @@ $(document).ready( function() { } } /* }}} */ + function listReceiveOwner() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $orderby = $this->params['orderby']; + $orderdir = $this->params['orderdir']; + $cachedir = $this->params['cachedir']; + $showtree = $this->params['showtree']; + $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewconverters']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); + + /* Get list of documents owned by current user */ + $resArr = $dms->getDocumentList('ReceiveOwner', $user, false, $orderby, $orderdir); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_user_reception")); + if($resArr) { + $this->printList($resArr, $previewer, 'listReveiveOwner'); + } + else printMLText("empty_notify_list"); + } /* }}} */ + function listMyDocs() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -559,12 +589,22 @@ $(document).ready( function() { echo '
'; echo '
'; + $this->contentHeading(getMLText("my_documents")); echo ''; + $this->contentHeading(getMLText("tasks")); + echo ''; + $this->contentHeading(getMLText("misc")); + echo '
+
+
+ +
+ + + -
+ - - - - - - - - - - - - - -
:
: +
+ +
+ +
+
+
+ +
-
- - '/> - - +
+
+
+ +
+ + '/> + + Date: Tue, 17 Jan 2017 18:35:30 +0100 Subject: [PATCH 15/70] printPopupBox() can return html instead of printing it --- views/bootstrap/class.Bootstrap.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 9b5e4e323..4fdb6c90c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2442,13 +2442,16 @@ mayscript> $this->printTimelineHtml($height); } /* }}} */ - protected function printPopupBox($title, $content) { /* {{{ */ -?> - + protected function printPopupBox($title, $content, $ret=false) { /* {{{ */ + $html = ' + '.$title.' -'; + if($ret) + return $html; + else + echo $html; } /* }}} */ protected function printAccordion($title, $content) { /* {{{ */ From b769ae3805e25eab73403d8615dee6db482e18c6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 20:40:42 +0100 Subject: [PATCH 16/70] use popupbox to show comments of document reception --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c9594912f..e353b889b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2169,7 +2169,7 @@ $(document).ready( function() {
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
"; if($allcomments) - $content .= implode('
', $allcomments); + $content .= $this->printPopupBox('kkkk', implode('
', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From ffcd0e8a4a8b637440d84bd69e513bdfa739e1c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:09:32 +0100 Subject: [PATCH 17/70] add style for span.closepopupbox --- styles/bootstrap/application.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/styles/bootstrap/application.css b/styles/bootstrap/application.css index 413ce0ce7..ba0203cfd 100644 --- a/styles/bootstrap/application.css +++ b/styles/bootstrap/application.css @@ -185,7 +185,13 @@ div.popupbox { padding: 15px; display: none; position: absolute; - width: 200px; + width: 250px; +} + +div.popupbox span.closepopupbox { + position: absolute; + right: 5px; + top: 0px; } @media (max-width: 480px) { From 3dcf867634fd9ae97ed76009175a91c2786c0d46 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:09:50 +0100 Subject: [PATCH 18/70] add code to open and close popup box --- styles/bootstrap/application.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 037f2731b..c67376d3f 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -989,9 +989,10 @@ $(document).ready(function() { /* {{{ */ }); }); - $('span.openpopupbox').on('click', function(e) { - $('div.popupbox').toggle(); - console.log('Hallo'); + $("body").on("click", "span.openpopupbox", function(e) { + $(""+$(e.target).data("href")).toggle(); + }); + $("body").on("click", "span.closepopupbox", function(e) { + $(this).parent().hide(); }); - }); /* }}} */ From b8d4d12f4edb8d3f6dfe88daa887a9a8e8cc96c9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:10:21 +0100 Subject: [PATCH 19/70] allow to place several popup boxes on a page --- views/bootstrap/class.Bootstrap.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 4fdb6c90c..0beca50f7 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2443,10 +2443,20 @@ mayscript> } /* }}} */ protected function printPopupBox($title, $content, $ret=false) { /* {{{ */ + $id = md5(uniqid()); + /* + $this->addFooterJS(' +$("body").on("click", "span.openpopupbox", function(e) { + $(""+$(e.target).data("href")).toggle(); +// $("div.popupbox").toggle(); +}); +'); + */ $html = ' - '.$title.' - "; if($allcomments) - $content .= $this->printPopupBox('kkkk', implode('
', $allcomments), true); + $content .= $this->printPopupBox(getMLText('comments'), implode('
', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From 75d84138326b316ec4bb80481c8bc3a73a869e86 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:31:34 +0100 Subject: [PATCH 21/70] open popupbox even if title is an tag --- styles/bootstrap/application.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index c67376d3f..935d9bf30 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -992,6 +992,9 @@ $(document).ready(function() { /* {{{ */ $("body").on("click", "span.openpopupbox", function(e) { $(""+$(e.target).data("href")).toggle(); }); + $("body").on("click", "span.openpopupbox i", function(e) { + $(e.target).parent().click(); + }); $("body").on("click", "span.closepopupbox", function(e) { $(this).parent().hide(); }); From 98cf6c65dfcf582b3382c963c29af2428a817a90 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:32:02 +0100 Subject: [PATCH 22/70] set more styles of popupbox --- styles/bootstrap/application.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/styles/bootstrap/application.css b/styles/bootstrap/application.css index ba0203cfd..3cde817fa 100644 --- a/styles/bootstrap/application.css +++ b/styles/bootstrap/application.css @@ -179,8 +179,12 @@ span.openpopupbox { } div.popupbox { + margin-top: 5px; background-color: #fff; border-radius: 4px; + color: black; + text-align: left; + text-shadow: none; border: 1px solid #ccc; padding: 15px; display: none; From e6e14fb37a6a8bce6d6ba1c25c0cd7ad50685cd5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:45:27 +0100 Subject: [PATCH 23/70] show comments of reception seperated by decline/aknowledge --- views/bootstrap/class.Bootstrap.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index cbba93e53..d7cf903cb 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2156,20 +2156,18 @@ $(document).ready( function() { } if($owner->getID() == $user->getID() && $receiptStatus = $latestContent->getReceiptStatus()) { $rstat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0); - $allcomments = array(); + $allcomments = array('-1'=>array(), '1'=>array()); foreach ($receiptStatus as $r) { $rstat[''.$r['status']]++; if($r['comment']) - $allcomments[] = $r['comment']; + $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']); } $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; $content .= ";
-
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '')."
-
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
+
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['1']), true) : "")."
+
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['-1']), true) : "")."
"; - if($allcomments) - $content .= $this->printPopupBox(getMLText('comments'), implode('
', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From 17b72a9d0c000a1d363fd8ab6d15dd2fbe22cc1d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:46:43 +0100 Subject: [PATCH 24/70] add entry to 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 87a215088..4988bcb53 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - list of documents to look at now contains documents in revision - add list of documents waiting for reception on MyDocuments page - group document lists on MyDocuments page into three sections +- show progressbar and comments for reception of document in documentlist -------------------------------------------------------------------------------- Changes in version 5.1.1 From 16342981ebd2f6bae17b2e916ba7bae0f88454b7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:00:38 +0100 Subject: [PATCH 25/70] output progressbar only if receipts are available --- views/bootstrap/class.Bootstrap.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d7cf903cb..3d6c6c5e3 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2163,11 +2163,13 @@ $(document).ready( function() { $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']); } $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; - $content .= "; + if($totalreceipts) { + $content .= ";
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['1']), true) : "")."
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['-1']), true) : "")."
"; + } } $content .= ""; // $content .= "".$version.""; From 825c4378a0613201d5cd6f1868d4d7356601bb51 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:08:17 +0100 Subject: [PATCH 26/70] add latest version 5.1.2 which somehow got lost --- SeedDMS_Core/package.xml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 4450cf615..287a7fa15 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2016-11-08 + 2017-01-18 - 5.0.9 - 5.0.9 + 5.1.2 + 5.1.2 stable @@ -24,7 +24,7 @@ GPL License -- all changes from 5.0.8 merged +- all changes from 5.0.9 merged @@ -1278,6 +1278,22 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - all changes from 4.3.31 merged + + 2016-11-08 + + + 5.0.9 + 5.0.9 + + + stable + stable + + GPL License + +- all changes from 4.3.32 merged + + 2016-03-09 From 6513642efb983c20e74e94da60ed9e028be39ede Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:39:29 +0100 Subject: [PATCH 27/70] change order of lists in section 'tasks' has now same order like tasks in the header menu --- views/bootstrap/class.MyDocuments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 00ac681aa..78f844ae2 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -574,10 +574,10 @@ $(document).ready( function() { $resArr = $dms->getDocumentList('WorkflowByMe', $user); echo '
  • '.count($resArr).''.getMLText("documents_to_process").'
  • '; } - $resArr = $dms->getDocumentList('ReviseByMe', $user); - echo '
  • '.count($resArr).''.getMLText("documents_to_revise").'
  • '; $resArr = $dms->getDocumentList('ReceiptByMe', $user); echo '
  • '.count($resArr).''.getMLText("documents_to_receipt").'
  • '; + $resArr = $dms->getDocumentList('ReviseByMe', $user); + echo '
  • '.count($resArr).''.getMLText("documents_to_revise").'
  • '; echo ''; $this->contentHeading(getMLText("misc")); echo '