Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2024-05-03 08:38:22 +02:00
commit 3a5886b64a
8 changed files with 27 additions and 12 deletions

View File

@ -59,6 +59,7 @@ class SeedDMS_AccessOperation {
$this->settings = $settings; $this->settings = $settings;
$this->legacy_access['guest'] = array( $this->legacy_access['guest'] = array(
'Calendar', 'Calendar',
'Download',
'ErrorDlg', 'ErrorDlg',
'Help', 'Help',
'Login', 'Login',
@ -66,7 +67,6 @@ class SeedDMS_AccessOperation {
'ViewDocument', 'ViewDocument',
'ViewFolder', 'ViewFolder',
'ViewOnline', 'ViewOnline',
'Download',
); );
$this->legacy_access['user'] = array( $this->legacy_access['user'] = array(
'AddDocument', 'AddDocument',
@ -87,6 +87,7 @@ class SeedDMS_AccessOperation {
'DocumentChooser', 'DocumentChooser',
'DocumentNotify', 'DocumentNotify',
'DocumentVersionDetail', 'DocumentVersionDetail',
'Download',
'DropFolderChooser', 'DropFolderChooser',
'EditAttributes', 'EditAttributes',
'EditComment', 'EditComment',
@ -149,6 +150,7 @@ class SeedDMS_AccessOperation {
'ViewDocument', 'ViewDocument',
'ViewEvent', 'ViewEvent',
'ViewFolder', 'ViewFolder',
'ViewOnline',
'WorkflowGraph', 'WorkflowGraph',
'WorkflowSummary'); 'WorkflowSummary');
} /* }}} */ } /* }}} */

View File

@ -634,6 +634,13 @@ switch($command) {
if($notifier) { if($notifier) {
$notifier->sendChangedNameMail($document, $user, $oldname); $notifier->sendChangedNameMail($document, $user, $oldname);
} }
if($fulltextservice && ($index = $fulltextservice->Indexer())) {
$lucenesearch = $fulltextservice->Search();
if($hit = $lucenesearch->getDocument($document->getId())) {
$index->reindexDocument($hit->id);
$index->commit();
}
}
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json_encode(array('success'=>true, 'message'=>getMLText('splash_document_name_changed'), 'data'=>'')); echo json_encode(array('success'=>true, 'message'=>getMLText('splash_document_name_changed'), 'data'=>''));
add_log_line("set name '".$_REQUEST['name']."' of document ".$document->getId()); add_log_line("set name '".$_REQUEST['name']."' of document ".$document->getId());
@ -665,6 +672,13 @@ switch($command) {
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>'')); echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
} else { } else {
if($fulltextservice && ($index = $fulltextservice->Indexer())) {
$lucenesearch = $fulltextservice->Search();
if($hit = $lucenesearch->getDocument($document->getId())) {
$index->reindexDocument($hit->id);
$index->commit();
}
}
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json_encode(array('success'=>true, 'message'=>getMLText('splash_mimetype_changed'), 'data'=>'')); echo json_encode(array('success'=>true, 'message'=>getMLText('splash_mimetype_changed'), 'data'=>''));
add_log_line("set mimetype '".$realmimetype."' of document ".$document->getId().":".$content->getVersion()); add_log_line("set mimetype '".$realmimetype."' of document ".$document->getId().":".$content->getVersion());

View File

@ -107,6 +107,8 @@ console.log(params);
?> ?>
'userfile[]': { 'userfile[]': {
require_from_group: [1, ".fileupload-group"] require_from_group: [1, ".fileupload-group"]
maxsize: <?= $maxuploadsize ?>
// alternatives: [$('#dropfolderfileadddocform'), $('#choosedocsearch<?= md5('librarydoc'.'adddocform') ?>')] // alternatives: [$('#dropfolderfileadddocform'), $('#choosedocsearch<?= md5('librarydoc'.'adddocform') ?>')]
}, },
dropfolderfileadddocform: { dropfolderfileadddocform: {

View File

@ -1294,6 +1294,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
(!empty($value['name']) ? ' name="'.$value['name'].'"' : ''). (!empty($value['name']) ? ' name="'.$value['name'].'"' : '').
(!empty($value['class']) ? ' class="'.$value['class'].'"' : ''). (!empty($value['class']) ? ' class="'.$value['class'].'"' : '').
(!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : ''). (!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['required']) ? ' required="required"' : '').
($allowempty ? ' data-allow-clear="true"' : ''). ($allowempty ? ' data-allow-clear="true"' : '').
(!empty($value['multiple']) ? ' multiple' : ''); (!empty($value['multiple']) ? ' multiple' : '');
if(!empty($value['attributes']) && is_array($value['attributes'])) if(!empty($value['attributes']) && is_array($value['attributes']))

View File

@ -37,14 +37,6 @@ class SeedDMS_View_OverrideContentStatus extends SeedDMS_Theme_Style {
?> ?>
$(document).ready(function() { $(document).ready(function() {
$("#form1").validate({ $("#form1").validate({
rules: {
comment: {
required: true
},
overrideStatus: {
required: true
},
},
messages: { messages: {
comment: "<?php printMLText("js_no_comment");?>", comment: "<?php printMLText("js_no_comment");?>",
overrideStatus: "<?php printMLText("js_no_override_status");?>", overrideStatus: "<?php printMLText("js_no_override_status");?>",
@ -88,7 +80,7 @@ $(document).ready(function() {
array( array(
'element'=>'textarea', 'element'=>'textarea',
'name'=>'comment', 'name'=>'comment',
'required'=>true, 'required'=>false,
'rows'=>4, 'rows'=>4,
) )
); );
@ -108,6 +100,7 @@ $(document).ready(function() {
'element'=>'select', 'element'=>'select',
'name'=>'overrideStatus', 'name'=>'overrideStatus',
'options'=>$options, 'options'=>$options,
'required'=>true,
) )
); );
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -96,7 +96,9 @@ $(document).ready( function() {
} else { } else {
?> ?>
userfile: { userfile: {
require_from_group: [1, ".fileupload-group"] require_from_group: [1, ".fileupload-group"],
maxsize: <?= $maxuploadsize ?>
// alternatives: $('#dropfolderfileform1') // alternatives: $('#dropfolderfileform1')
}, },
dropfolderfileform1: { dropfolderfileform1: {

View File

@ -850,7 +850,7 @@ $(document).ready( function() {
if($accessobject->mayRemoveVersion($latestContent->getDocument())) { if($accessobject->mayRemoveVersion($latestContent->getDocument())) {
$items[] = array('link'=>$this->html_url('RemoveVersion', array('documentid'=>$latestContent->getDocument()->getId(),'version'=>$latestContent->getVersion())), 'icon'=>'remove', 'label'=>'rm_version'); $items[] = array('link'=>$this->html_url('RemoveVersion', array('documentid'=>$latestContent->getDocument()->getId(),'version'=>$latestContent->getVersion())), 'icon'=>'remove', 'label'=>'rm_version');
} }
if($islatest && $accessobject->mayOverrideStatus($latestContent->getDocument())) { if($accessobject->mayOverrideStatus($latestContent->getDocument())) {
$items[] = array('link'=>$this->html_url('OverrideContentStatus', array('documentid'=>$latestContent->getDocument()->getId(),'version'=>$latestContent->getVersion())), 'icon'=>'align-justify', 'label'=>'change_status'); $items[] = array('link'=>$this->html_url('OverrideContentStatus', array('documentid'=>$latestContent->getDocument()->getId(),'version'=>$latestContent->getVersion())), 'icon'=>'align-justify', 'label'=>'change_status');
} }
if($islatest && $enablereceiptworkflow && $accessobject->check_controller_access('SetRecipients')) if($islatest && $enablereceiptworkflow && $accessobject->check_controller_access('SetRecipients'))

View File

@ -1206,6 +1206,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
(!empty($value['name']) ? ' name="'.$value['name'].'"' : ''). (!empty($value['name']) ? ' name="'.$value['name'].'"' : '').
(empty($value['class']) ? ' class="form-control"' : ' class="form-control '.$value['class'].'"'). (empty($value['class']) ? ' class="form-control"' : ' class="form-control '.$value['class'].'"').
(!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : ''). (!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['required']) ? ' required="required"' : '').
($allowempty ? ' data-allow-clear="true"' : ''). ($allowempty ? ' data-allow-clear="true"' : '').
(!empty($value['multiple']) ? ' multiple' : ''); (!empty($value['multiple']) ? ' multiple' : '');
if(!empty($value['attributes']) && is_array($value['attributes'])) if(!empty($value['attributes']) && is_array($value['attributes']))