From 4f28cd19d14801daa5586434638ccc990d2201db Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 Nov 2019 15:39:47 +0100 Subject: [PATCH 1/4] show preview for all images supported by browser --- views/bootstrap/class.ViewDocument.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index ffb59411b..27461d1a1 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -384,6 +384,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { contentHeading(getMLText("preview")); ?> From 28e25498664faf90a3aabb4b8ad5653b87deb7e0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Nov 2019 15:22:00 +0100 Subject: [PATCH 2/4] menuTasks returns complete menuItem --- styles/bootstrap/application.js | 2 +- views/bootstrap/class.Bootstrap.php | 9 +++++---- views/bootstrap/class.Tasks.php | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index dfba97ef8..55d587257 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -1162,7 +1162,7 @@ $(document).ready(function() { /* {{{ */ if((typeof data.data.approval != 'undefined' && approval_count != data.data.approval.length) || (typeof data.data.review != 'undefined' && review_count != data.data.review.length) || (typeof data.data.workflow != 'undefined' && workflow_count != data.data.workflow.length)) { - $("#menu-tasks > ul > li").html('Loading').hide().load('../out/out.Tasks.php?action=menutasks').fadeIn('500') + $("#menu-tasks").html('Loading').hide().load('../out/out.Tasks.php?action=menutasks').fadeIn('500') approval_count = typeof data.data.approval != 'undefined' ? data.data.approval.length : 0; review_count = typeof data.data.review != 'undefined' ? data.data.review.length : 0; workflow_count = typeof data.data.workflow != 'undefined' ? data.data.workflow.length : 0; diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 95b11d2ea..d8c148740 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -336,11 +336,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if($this->params['enablemenutasks']) { echo "
"; - echo "
    \n"; - echo "
  • \n"; + echo "
    "; +// echo "
      \n"; +// echo "
    • \n"; // echo $this->menuTasks(array('review'=>array(), 'approval'=>array(), 'receipt'=>array(), 'revision'=>array())); - echo "
    • \n"; - echo "
    \n"; +// echo "
  • \n"; +// echo "
\n"; echo "
"; //$this->addFooterJS('checkTasks();'); } diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php index 4a8572366..8146e9beb 100644 --- a/views/bootstrap/class.Tasks.php +++ b/views/bootstrap/class.Tasks.php @@ -138,8 +138,8 @@ class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { $tasks = $this->__myTasks(); $content = ''; -// $content .= " \n"; + $content .= " \n"; + $content .= " \n"; echo $content; } /* }}} */ From 05f7807b05c71ceae2fa693754816daf7e95ca57 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Nov 2019 15:28:19 +0100 Subject: [PATCH 3/4] use update on div.ajax for updating tasks in menu --- styles/bootstrap/application.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 55d587257..da9d4e291 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -1162,7 +1162,8 @@ $(document).ready(function() { /* {{{ */ if((typeof data.data.approval != 'undefined' && approval_count != data.data.approval.length) || (typeof data.data.review != 'undefined' && review_count != data.data.review.length) || (typeof data.data.workflow != 'undefined' && workflow_count != data.data.workflow.length)) { - $("#menu-tasks").html('Loading').hide().load('../out/out.Tasks.php?action=menutasks').fadeIn('500') +// $("#menu-tasks").html('Loading').hide().load('../out/out.Tasks.php?action=menutasks').fadeIn('500') + $('#menu-tasks > div.ajax').trigger('update', {folderid: seeddms_folder}); approval_count = typeof data.data.approval != 'undefined' ? data.data.approval.length : 0; review_count = typeof data.data.review != 'undefined' ? data.data.review.length : 0; workflow_count = typeof data.data.workflow != 'undefined' ? data.data.workflow.length : 0; From 2b00423225e9263c0da0d72d7891e90bdc157d42 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 Nov 2019 07:25:53 +0100 Subject: [PATCH 4/4] get latest version for later checking could be used to filter out older documents --- views/bootstrap/class.RemoveUserFromProcesses.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/bootstrap/class.RemoveUserFromProcesses.php b/views/bootstrap/class.RemoveUserFromProcesses.php index f8cca27e3..0d1e7c5ca 100644 --- a/views/bootstrap/class.RemoveUserFromProcesses.php +++ b/views/bootstrap/class.RemoveUserFromProcesses.php @@ -54,6 +54,8 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style { $reviewStatus = $rmuser->getReviewStatus(); $tmpr = array(); foreach($reviewStatus['indstatus'] as $ri) { + $doc = $dms->getDocument($ri['documentID']); + $ri['latest'] = $doc->getLatestContent()->getVersion(); if(isset($tmpr[$ri['status']])) $tmpr[$ri['status']][] = $ri; else @@ -63,6 +65,8 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style { $approvalStatus = $rmuser->getApprovalStatus(); $tmpa = array(); foreach($approvalStatus['indstatus'] as $ai) { + $doc = $dms->getDocument($ri['documentID']); + $ai['latest'] = $doc->getLatestContent()->getVersion(); if(isset($tmpa[$ai['status']])) $tmpa[$ai['status']][] = $ai; else