diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 28885e425..cdaf1d6ae 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1123,35 +1123,40 @@ $(function() { //echo "Documents\n"; foreach($clipboard['docs'] as $docid) { if($document = $dms->getDocument($docid)) { - $comment = $document->getComment(); - if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; - if($latestContent = $document->getLatestContent()) { - $previewer->createPreview($latestContent); - $version = $latestContent->getVersion(); - $status = $latestContent->getStatus(); - - print ""; + $txt = $this->callHook('documentClipboardItem', $document, $previewer); + if(is_string($txt)) + echo $txt; + else { + $comment = $document->getComment(); + if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + if($latestContent = $document->getLatestContent()) { + $previewer->createPreview($latestContent); + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + print ""; - if (file_exists($dms->contentDir . $latestContent->getPath())) { - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if (file_exists($dms->contentDir . $latestContent->getPath())) { + print ""; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print ""; + } else + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + + print "" . htmlspecialchars($document->getName()) . ""; + if($comment) { + print "
".htmlspecialchars($comment).""; } - print ""; - } else - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - - print "" . htmlspecialchars($document->getName()) . ""; - if($comment) { - print "
".htmlspecialchars($comment).""; + print "\n"; + print "\n"; + print "
params['folder']->getID()."&id=".$docid."&type=document\" title=\"".getMLText('rm_from_clipboard')."\">
"; + print "\n"; + print ""; } - print "\n"; - print "\n"; - print "
params['folder']->getID()."&id=".$docid."&type=document\" title=\"".getMLText('rm_from_clipboard')."\">
"; - print "\n"; - print ""; } } }