From bf6490f9040beb8c3621ebd5695d4f6760e93058 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 25 Nov 2019 09:38:41 +0100 Subject: [PATCH 1/3] fix output of group name --- views/bootstrap/class.ApprovalSummary.php | 2 +- views/bootstrap/class.ReviewSummary.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php index bff1f59dc..4bb77f2f7 100644 --- a/views/bootstrap/class.ApprovalSummary.php +++ b/views/bootstrap/class.ApprovalSummary.php @@ -137,7 +137,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style { $class = $st['status'] == 1 ? ' success' : ($st['status'] == -1 ? ' error' : ( $st['status'] == -2 ? ' info' : '')); echo $this->documentListRowStart($document, $class); echo $this->documentListRow($document, $previewer, true, $st['version']); - print "".getApprovalStatusText($st["status"])."
".$st["date"]."
". htmlspecialchars($moduser->getFullName()) ."
"; + print "".getApprovalStatusText($st["status"])."
".$st["date"]."
". htmlspecialchars($modgroup->getName()) ."
"; echo $this->documentListRowEnd($document); } } diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php index 19e23496b..b15fb03df 100644 --- a/views/bootstrap/class.ReviewSummary.php +++ b/views/bootstrap/class.ReviewSummary.php @@ -142,7 +142,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style { // print ""; echo $this->documentListRowStart($document, $class); echo $this->documentListRow($document, $previewer, true, $st['version']); - print "".getReviewStatusText($st['status'])."
".$st["date"]."
". htmlspecialchars($moduser->getFullName()) ."
"; + print "".getReviewStatusText($st['status'])."
".$st["date"]."
". htmlspecialchars($modgroup->getName()) ."
"; print "\n"; } } From 24f030f1c70f52197f40ae7f3c8104573ddf2e29 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 25 Nov 2019 09:50:52 +0100 Subject: [PATCH 2/3] add method printClickDocumentJs() adds js for catching the event when clicking on a document row and onepage mode is on --- views/bootstrap/class.Bootstrap.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 021f6f69d..ac090e338 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2238,6 +2238,19 @@ $(document).ready( function() { "; } /* }}} */ + function printClickDocumentJs() { /* {{{ */ + $onepage = $this->params['onepage']; + if($onepage) { +?> +/* catch click on a document row in the list folders and documents */ +$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) { + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + window.location = '../out/out.ViewDocument.php?documentid=' + attr_id; +}); + Date: Mon, 25 Nov 2019 09:51:39 +0100 Subject: [PATCH 3/3] use new method printClickDocumentJs() --- views/bootstrap/class.ApprovalSummary.php | 1 + views/bootstrap/class.ReviewSummary.php | 1 + views/bootstrap/class.ViewFolder.php | 8 +++----- views/bootstrap/class.WorkflowSummary.php | 8 ++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php index 4bb77f2f7..8050aa283 100644 --- a/views/bootstrap/class.ApprovalSummary.php +++ b/views/bootstrap/class.ApprovalSummary.php @@ -41,6 +41,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style { parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); $this->printDeleteDocumentButtonJs(); + $this->printClickDocumentJs(); } /* }}} */ function show() { /* {{{ */ diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php index b15fb03df..de95a0646 100644 --- a/views/bootstrap/class.ReviewSummary.php +++ b/views/bootstrap/class.ReviewSummary.php @@ -41,6 +41,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style { parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); $this->printDeleteDocumentButtonJs(); + $this->printClickDocumentJs(); } /* }}} */ function show() { /* {{{ */ diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 3feed0202..307520b73 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -189,11 +189,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) scrollTop: 200 }, 200); }); -/* catch click on a document row in the list folders and documents */ -$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) { - attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; - window.location = '../out/out.ViewDocument.php?documentid=' + attr_id; -}); +printClickDocumentJs(); +?> $('body').on('click', '.order-btn', function(ev) { ev.preventDefault(); var element = $(this); diff --git a/views/bootstrap/class.WorkflowSummary.php b/views/bootstrap/class.WorkflowSummary.php index d0711044a..f013a8c1b 100644 --- a/views/bootstrap/class.WorkflowSummary.php +++ b/views/bootstrap/class.WorkflowSummary.php @@ -36,6 +36,14 @@ require_once("SeedDMS/Preview.php"); */ class SeedDMS_View_WorkflowSummary extends SeedDMS_Bootstrap_Style { + function js() { /* {{{ */ + header('Content-Type: application/javascript; charset=UTF-8'); + parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); + + $this->printDeleteDocumentButtonJs(); + $this->printClickDocumentJs(); + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user'];