From 34e623e2925b0c702b2955a00c780dbfb042959b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 May 2020 12:46:13 +0200 Subject: [PATCH 1/6] update changelog for 5.1.17 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 80c037d7e..d83b66e53 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ -------------------------------------------------------------------------------- - new version 5.16.2 of fine uploader - obey max_upload_size whenever a file is uploaded +- do not list documents in task list, if a previous version is still in workflow. + Take only the lastest version into account (Closes: #405) -------------------------------------------------------------------------------- Changes in version 5.1.16 From 2e25da57195dd0ccb22209965d9c970b0ecd5e4e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2020 12:02:03 +0200 Subject: [PATCH 2/6] add method hasParam() --- inc/inc.ClassViewCommon.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 9979e1383..1d8f1245b 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -69,6 +69,16 @@ class SeedDMS_View_Common { return null; } + /** + * Check if the view has a parameter with the given name + * + * @param string $name name of parameter + * @return boolean true if parameter exists otherwise false + */ + function hasParam($name) { + return isset($this->params[$name]) ? true : false; + } + public function unsetParam($name) { if(isset($this->params[$name])) unset($this->params[$name]); From b7d61aea43d7cece2bfb38be51be20b434ca4461 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2020 12:02:22 +0200 Subject: [PATCH 3/6] back button can be turned off --- views/bootstrap/class.ErrorDlg.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ErrorDlg.php b/views/bootstrap/class.ErrorDlg.php index 66bd63507..a58366fc5 100644 --- a/views/bootstrap/class.ErrorDlg.php +++ b/views/bootstrap/class.ErrorDlg.php @@ -37,6 +37,7 @@ class SeedDMS_View_ErrorDlg extends SeedDMS_Bootstrap_Style { $pagetitle = $this->params['pagetitle']; $errormsg = $this->params['errormsg']; $plain = $this->params['plain']; + $showbutton = $this->hasParam('nobackbutton') === false || $this->getParam('nobackbutton') === false; $settings = $this->params['settings']; if(!$plain) { @@ -49,7 +50,8 @@ class SeedDMS_View_ErrorDlg extends SeedDMS_Bootstrap_Style { print "

".getMLText('error')."!

"; print htmlspecialchars($errormsg); print ""; - print "
"; + if($showbutton) + print "
"; $this->contentEnd(); $this->htmlEndPage(); From 1e21a4114928b934618f12ad68410e49b224cf3e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2020 13:05:33 +0200 Subject: [PATCH 4/6] ensure document name in drag info is always a string even if the name of the document consists of numbers only --- styles/bootstrap/application.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 6aaba78e9..ca7452c13 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -758,7 +758,7 @@ $(document).ready(function() { /* {{{ */ attr_rel = $(e.currentTarget).data('droptarget'); target_type = attr_rel.split("_")[0]; target_id = attr_rel.split("_")[1]; - target_name = $(e.currentTarget).data('name') + target_name = $(e.currentTarget).data('name')+''; // Force this to be a string if(target_type == 'folder') { var files = e.originalEvent.dataTransfer.files; if(files.length > 0) { @@ -769,7 +769,7 @@ $(document).ready(function() { /* {{{ */ source_type = source_info.type; source_id = source_info.id; formtoken = source_info.formtoken; - console.log('Drop '+source_type+' '+source_id+' on '+target_type+' '+target_id); +// console.log('Drop '+source_type+' '+source_id+' on '+target_type+' '+target_id); if(source_type == 'document') { var bootbox_message = trans.confirm_move_document; if(source_info.name) @@ -956,7 +956,7 @@ $(document).ready(function() { /* {{{ */ id : attr_rel.split("_")[1], type : "folder", formtoken : $(e.target).attr('formtoken'), - name: $(e.target).data('name') + name: $(e.target).data('name')+'' }; /* Currently not used $.ajax({url: '../out/out.ViewFolder.php', @@ -982,7 +982,7 @@ $(document).ready(function() { /* {{{ */ id : attr_rel.split("_")[1], type : "document", formtoken : $(e.target).attr('formtoken'), - name: $(e.target).data('name') + name: $(e.target).data('name')+'' }; e.originalEvent.dataTransfer.setData("text", JSON.stringify(dragStartInfo)); }); From ead98471c6466cc3f03d9024d25d9e201676437f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2020 13:06:22 +0200 Subject: [PATCH 5/6] set drag and drop info for menu items --- views/bootstrap/class.Clipboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index 136431e21..d7bd55466 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -61,7 +61,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_Style { } foreach($clipboard['docs'] as $docid) { if($document = $this->params['dms']->getDocument($docid)) - $content .= "
  • getID()."\" class=\"table-row-document droptarget\" data-droptarget=\"document_".$document->getID()."\" rel=\"document_".$document->getID()."\"> ".htmlspecialchars($document->getName())."
  • \n"; + $content .= "
  • getID()."\" class=\"table-row-document droptarget\" data-droptarget=\"document_".$document->getID()."\" rel=\"document_".$document->getID()."\" data-name=\"".htmlspecialchars($document->getName(), ENT_QUOTES)."\" formtoken=\"".createFormKey('')."\"> ".htmlspecialchars($document->getName())."
  • \n"; } $content .= "
  • \n"; if(isset($this->params['folder']) && $this->params['folder']->getAccessMode($this->params['user']) >= M_READWRITE) { From f72e70d9a654d9d06dd3541aea448ff974e7541b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2020 13:11:57 +0200 Subject: [PATCH 6/6] add item for 5.1.17 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index d83b66e53..e1ce7721a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ - obey max_upload_size whenever a file is uploaded - do not list documents in task list, if a previous version is still in workflow. Take only the lastest version into account (Closes: #405) +- fix moving documents in clipboard into folder by drag&drop -------------------------------------------------------------------------------- Changes in version 5.1.16