diff --git a/CHANGELOG b/CHANGELOG index 94ca1621c..6087efc00 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -149,6 +149,9 @@ -------------------------------------------------------------------------------- - 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) +- fix moving documents in clipboard into folder by drag&drop -------------------------------------------------------------------------------- Changes in version 5.1.16 diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index a63c9d770..cee14544c 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]); diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 776c91b1e..8761a46e9 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)); }); 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) { 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();