diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 77e4804ea..4061f7533 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -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'); } /* }}} */ diff --git a/op/op.Ajax.php b/op/op.Ajax.php index fa055837a..8bd9bb46e 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -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()); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index aade004a8..64c2409a9 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -107,6 +107,8 @@ console.log(params); ?> 'userfile[]': { require_from_group: [1, ".fileupload-group"] + maxsize: + // alternatives: [$('#dropfolderfileadddocform'), $('#choosedocsearch')] }, dropfolderfileadddocform: { diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c4d6b1192..9104edb2a 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -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'])) diff --git a/views/bootstrap/class.OverrideContentStatus.php b/views/bootstrap/class.OverrideContentStatus.php index 13a336b68..399dd762b 100644 --- a/views/bootstrap/class.OverrideContentStatus.php +++ b/views/bootstrap/class.OverrideContentStatus.php @@ -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: "", overrideStatus: "", @@ -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(); diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index a96e71c5a..9ce6b2d73 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -96,7 +96,9 @@ $(document).ready( function() { } else { ?> userfile: { - require_from_group: [1, ".fileupload-group"] + require_from_group: [1, ".fileupload-group"], + maxsize: + // alternatives: $('#dropfolderfileform1') }, dropfolderfileform1: { diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index ca1aff99a..122557ad8 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -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')) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index f49b1d8f6..16d45ea9e 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -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']))