mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
8884b1b54d
|
@ -152,6 +152,8 @@
|
|||
- 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
|
||||
- clipboard can be pinned to fixed position
|
||||
- use standard output for document rows on MyDocuments page
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.16
|
||||
|
|
|
@ -666,6 +666,13 @@ switch($command) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$maxuploadsize = SeedDMS_Core_File::parse_filesize($settings->_maxUploadSize);
|
||||
if ($maxuploadsize && $_FILES["userfile"]["size"] > $maxuploadsize) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>getMLText("uploading_maxsize")));
|
||||
exit;
|
||||
}
|
||||
|
||||
$userfiletmp = $_FILES["userfile"]["tmp_name"];
|
||||
$userfiletype = $_FILES["userfile"]["type"];
|
||||
$userfilename = $_FILES["userfile"]["name"];
|
||||
|
|
|
@ -60,6 +60,10 @@ ul.jqtree-tree li.jqtree-selected > .jqtree-element:hover {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
legend > span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
td.today {
|
||||
background-color: rgb(255, 200, 0);
|
||||
}
|
||||
|
@ -158,6 +162,21 @@ div.splash {
|
|||
display: none;
|
||||
}
|
||||
|
||||
div.clipboard-container {
|
||||
position: fixed;
|
||||
left: 10px;
|
||||
top: 40px;
|
||||
width: 29.8%;
|
||||
background: white;
|
||||
border: 1px solid #d4d4d4;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
height: 500px;
|
||||
margin: 10px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
div.statusbar-container {
|
||||
display: none;
|
||||
position: fixed;
|
||||
|
|
|
@ -166,6 +166,12 @@ $(document).ready( function() {
|
|||
}
|
||||
}); /* }}} */
|
||||
|
||||
$('body').on('click', '#clipboard-float', function(ev) { /* {{{ */
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
$('#clipboard-container').toggleClass('clipboard-container');
|
||||
}); /* }}} */
|
||||
|
||||
$('body').on('click', 'a.addtoclipboard', function(ev) { /* {{{ */
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
@ -762,7 +768,7 @@ $(document).ready(function() { /* {{{ */
|
|||
if(target_type == 'folder') {
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
if(files.length > 0) {
|
||||
console.log('Drop '+files.length+' files on '+target_type+' '+target_id);
|
||||
// console.log('Drop '+files.length+' files on '+target_type+' '+target_id);
|
||||
SeedDMSUpload.handleFileUpload(files,$(e.currentTarget),$('div.statusbar-container h1')/*$(e.currentTarget).find("span")*/);
|
||||
} else {
|
||||
var source_info = JSON.parse(e.originalEvent.dataTransfer.getData("text"));
|
||||
|
@ -863,14 +869,14 @@ $(document).ready(function() { /* {{{ */
|
|||
} else if(target_type == 'document') {
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
if(files.length > 0) {
|
||||
console.log('Drop '+files.length+' files on '+target_type+' '+target_id);
|
||||
// console.log('Drop '+files.length+' files on '+target_type+' '+target_id);
|
||||
SeedDMSUpload.handleFileUpload(files,$(e.currentTarget),$('div.statusbar-container h1')/*$(e.currentTarget).find("span")*/);
|
||||
} else {
|
||||
var source_info = JSON.parse(e.originalEvent.dataTransfer.getData("text"));
|
||||
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') {
|
||||
if(source_id != target_id) {
|
||||
bootbox.dialog(trans.confirm_transfer_link_document, [{
|
||||
|
|
|
@ -464,7 +464,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
if($this->params['enableclipboard']) {
|
||||
echo " <div id=\"menu-clipboard\">";
|
||||
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Clipboard\" data-action=\"menuClipboard\" data-query=\"folderid=23\"></div>";
|
||||
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Clipboard\" data-action=\"menuClipboard\" data-query=\"folderid=1\"></div>";
|
||||
echo " </div>";
|
||||
}
|
||||
|
||||
|
@ -2086,12 +2086,14 @@ $(function() {
|
|||
* @param array clipboard
|
||||
*/
|
||||
function printClipboard($clipboard, $previewer){ /* {{{ */
|
||||
$this->contentHeading(getMLText("clipboard"), true);
|
||||
echo "<div id=\"clipboard-container\" class=\"_clipboard-container\">\n";
|
||||
$this->contentHeading(getMLText("clipboard").'<span id="clipboard-float"><i class="icon-sort"></i></span>', true);
|
||||
echo "<div id=\"main-clipboard\">\n";
|
||||
?>
|
||||
<div class="ajax" data-view="Clipboard" data-action="mainClipboard"></div>
|
||||
<?php
|
||||
echo "</div>\n";
|
||||
echo "</div>\n";
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,7 +57,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_Style {
|
|||
$content .= " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
foreach($clipboard['folders'] as $folderid) {
|
||||
if($folder = $this->params['dms']->getFolder($folderid))
|
||||
$content .= " <li><a href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\" class=\"table-row-folder droptarget\" data-droptarget=\"folder_".$folder->getID()."\" rel=\"folder_".$folder->getID()."\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\"><i class=\"icon-folder-close-alt\"></i> ".htmlspecialchars($folder->getName())."</a></li>\n";
|
||||
$content .= " <li><a href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\" class=\"table-row-folder droptarget\" data-droptarget=\"folder_".$folder->getID()."\" rel=\"folder_".$folder->getID()."\" data-name=\"".htmlspecialchars($folder->getName(), ENT_QUOTES)."\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\"><i class=\"icon-folder-close-alt\"></i> ".htmlspecialchars($folder->getName())."</a></li>\n";
|
||||
}
|
||||
foreach($clipboard['docs'] as $docid) {
|
||||
if($document = $this->params['dms']->getDocument($docid))
|
||||
|
@ -181,6 +181,9 @@ class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||
$content = '';
|
||||
$txt = $this->callHook('preClipboard', $clipboard);
|
||||
if(is_string($txt))
|
||||
$content .= $txt;
|
||||
$foldercount = $doccount = 0;
|
||||
if($clipboard['folders']) {
|
||||
foreach($clipboard['folders'] as $folderid) {
|
||||
|
@ -223,6 +226,9 @@ class SeedDMS_View_Clipboard extends SeedDMS_Bootstrap_Style {
|
|||
} else {
|
||||
}
|
||||
$content .= "<div class=\"alert add-clipboard-area\">".getMLText("drag_icon_here")."</div>";
|
||||
$txt = $this->callHook('postClipboard', $clipboard);
|
||||
if(is_string($txt))
|
||||
$content .= $txt;
|
||||
echo $content;
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
@ -116,6 +116,9 @@ $(document).ready( function() {
|
|||
$timeout = $this->params['timeout'];
|
||||
$xsendfile = $this->params['xsendfile'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$db = $dms->getDB();
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||
$previewer->setConverters($previewconverters);
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
|
||||
header('Content-Type: application/javascript');
|
||||
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'));
|
||||
?>
|
||||
$(document).ready(function () {
|
||||
$('#update').click(function(ev){
|
||||
|
|
|
@ -167,6 +167,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$document = $this->params['document'];
|
||||
|
||||
header('Content-Type: application/javascript');
|
||||
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'));
|
||||
if($user->isAdmin()) {
|
||||
$latestContent = $this->callHook('documentLatestContent', $document);
|
||||
if($latestContent === null)
|
||||
|
@ -1680,7 +1681,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$responsibleUser = $link->getUser();
|
||||
$targetDoc = $link->getTarget();
|
||||
|
||||
echo "<tr id=\"table-row-document-".$targetDoc->getId()."\" class=\"table-row-document\" rel=\"document_".$targetDoc->getId()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRowStart($targetDoc);
|
||||
$targetDoc->verifyLastestContentExpriry();
|
||||
$txt = $this->callHook('documentListItem', $targetDoc, $previewer, false, 'reverselinks');
|
||||
if(is_string($txt))
|
||||
|
@ -1695,7 +1696,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||
print "<form action=\"../op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button></form>";
|
||||
print "</span></td>";
|
||||
print "</tr>";
|
||||
echo $this->documentListRowEnd($targetDoc);
|
||||
}
|
||||
print "</tbody>\n</table>\n";
|
||||
}
|
||||
|
@ -1745,7 +1746,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$responsibleUser = $link->getUser();
|
||||
$sourceDoc = $link->getDocument();
|
||||
|
||||
echo "<tr id=\"table-row-document-".$sourceDoc->getId()."\" class=\"table-row-document\" rel=\"document_".$sourceDoc->getId()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
|
||||
echo $this->documentListRowStart($sourceDoc);
|
||||
$sourceDoc->verifyLastestContentExpriry();
|
||||
$txt = $this->callHook('documentListItem', $sourceDoc, $previewer, false, 'reverselinks');
|
||||
if(is_string($txt))
|
||||
|
@ -1760,7 +1761,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<br />".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
|
||||
print "<form action=\"../op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$sourceDoc->getId()."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button></form>";
|
||||
print "</span></td>";
|
||||
print "</tr>";
|
||||
echo $this->documentListRowEnd($sourceDoc);
|
||||
}
|
||||
print "</tbody>\n</table>\n";
|
||||
// $this->contentContainerEnd();
|
||||
|
|
Loading…
Reference in New Issue
Block a user