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

View File

@ -634,6 +634,13 @@ switch($command) {
if($notifier) {
$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');
echo json_encode(array('success'=>true, 'message'=>getMLText('splash_document_name_changed'), 'data'=>''));
add_log_line("set name '".$_REQUEST['name']."' of document ".$document->getId());
@ -665,6 +672,13 @@ switch($command) {
header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
} 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');
echo json_encode(array('success'=>true, 'message'=>getMLText('splash_mimetype_changed'), 'data'=>''));
add_log_line("set mimetype '".$realmimetype."' of document ".$document->getId().":".$content->getVersion());

View File

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

View File

@ -1294,6 +1294,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
(!empty($value['name']) ? ' name="'.$value['name'].'"' : '').
(!empty($value['class']) ? ' class="'.$value['class'].'"' : '').
(!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['required']) ? ' required="required"' : '').
($allowempty ? ' data-allow-clear="true"' : '').
(!empty($value['multiple']) ? ' multiple' : '');
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() {
$("#form1").validate({
rules: {
comment: {
required: true
},
overrideStatus: {
required: true
},
},
messages: {
comment: "<?php printMLText("js_no_comment");?>",
overrideStatus: "<?php printMLText("js_no_override_status");?>",
@ -88,7 +80,7 @@ $(document).ready(function() {
array(
'element'=>'textarea',
'name'=>'comment',
'required'=>true,
'required'=>false,
'rows'=>4,
)
);
@ -108,6 +100,7 @@ $(document).ready(function() {
'element'=>'select',
'name'=>'overrideStatus',
'options'=>$options,
'required'=>true,
)
);
$this->contentContainerEnd();

View File

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

View File

@ -850,7 +850,7 @@ $(document).ready( function() {
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');
}
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');
}
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['class']) ? ' class="form-control"' : ' class="form-control '.$value['class'].'"').
(!empty($value['placeholder']) ? ' data-placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['required']) ? ' required="required"' : '').
($allowempty ? ' data-allow-clear="true"' : '').
(!empty($value['multiple']) ? ' multiple' : '');
if(!empty($value['attributes']) && is_array($value['attributes']))