diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index d65cd360f..6a6ba9a9b 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -54,6 +54,8 @@ if($view) { $view->setParam('folder', $folder); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload); + $view->setParam('enableattachmentupload', $settings->_enableAttachmentUpload); + $view->setParam('enablemultiupload', $settings->_enableMultiUpload); $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 13ab0cd25..498e23b2d 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -36,16 +36,27 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { $partitionsize = $this->params['partitionsize']; $maxuploadsize = $this->params['maxuploadsize']; $enablelargefileupload = $this->params['enablelargefileupload']; + $enablemultiupload = $this->params['enablemultiupload']; + $enableattachmentupload = $this->params['enableattachmentupload']; header('Content-Type: application/javascript; charset=UTF-8'); - if($enablelargefileupload) - $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize); + if($enablelargefileupload) { + $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, $enablemultiupload); + if($enableattachmentupload) { + //$this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, , $enablemultiupload, 'attachment'); + } + } ?> $(document).ready(function() { $('#new-file').click(function(event) { - $("#upload-file").clone().appendTo("#upload-files").removeAttr("id").children('div').children('input').val(''); + $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id").children('div').children('input').val(''); }); - + + $('#new-attachment').click(function(event) { +console.log('Hallo'); + $("#attachment-upload-file").clone().appendTo("#attachment-upload-files").removeAttr("id").children('div').children('input').val(''); + }); + jQuery.validator.addMethod("alternatives", function(value, element, params) { if(value == '' && params.val() == '') return false; @@ -84,7 +95,10 @@ $(document).ready(function() { if($enablelargefileupload) { ?> submitHandler: function(form) { - manualuploader.uploadStoredFiles(); + userfileuploader.uploadStoredFiles(); + +// attachmentuploader.uploadStoredFiles(); + }, - fineuploaderuuids: { - fineuploader: [ manualuploader, $('#dropfolderfileform1') ] + 'userfile-fine-uploader-uuids': { + fineuploader: [ userfileuploader, $('#dropfolderfileform1') ] } params['user']; $folder = $this->params['folder']; $enablelargefileupload = $this->params['enablelargefileupload']; + $enablemultiupload = $this->params['enablemultiupload']; + $enableattachmentupload = $this->params['enableattachmentupload']; $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; @@ -164,9 +180,6 @@ $(document).ready(function() { $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); $msg = getMLText("max_upload_size").": ".ini_get( "upload_max_filesize"); - if(0 && $enablelargefileupload) { - $msg .= "
".sprintf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folderid."&showtree=".showtree())."
"; - } $this->warningMsg($msg); $this->contentHeading(getMLText("add_document")); $this->contentContainerStart(); @@ -306,20 +319,16 @@ $(document).ready(function() {