Code cleanup

This commit is contained in:
Karel Pičman 2023-03-14 13:11:47 +01:00
parent e40966955f
commit 9f8a24bdc9
6 changed files with 19 additions and 20 deletions

View File

@ -215,26 +215,25 @@ instance is stopped.
`cd redmine`
3. Install dependencies:
4. Install dependencies:
`bundle install`
4. Initialize/Update database:
5. Initialize/Update database:
`RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf`
5. The access rights must be set for web server, e.g.:
6. The access rights must be set for web server, e.g.:
`chown -R www-data:www-data plugins/redmine_dmsf`.
6. Restart the web server, e.g.:
7. Restart the web server, e.g.:
`systemctl restart apache2`
7. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure. (You should check and then save the plugin's configuration after each upgrade.)
8. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions
9. Assign DMSF permissions to appropriate roles.
10. There are a few rake tasks:
8. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure. (You should check and then save the plugin's configuration after each upgrade.)
9. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions
10. Assign DMSF permissions to appropriate roles.
11. There are a few rake tasks:
I) To convert documents from the standard Redmine document module

View File

@ -26,12 +26,12 @@
<%= select_tag select_tag_name_major, options_for_select(DmsfUploadHelper::major_version_select_options,
DmsfUploadHelper::gui_version(revision_or_upload.major_version)),
class: 'dmsf-select-version' %>
<bold>.</bold>
<b>.</b>
<% if revision_or_upload.patch_version.present? && (DmsfUploadHelper::gui_version(revision_or_upload.patch_version) != ' ') %>
<%= select_tag select_tag_name_minor, options_for_select(DmsfUploadHelper::minor_version_select_options,
DmsfUploadHelper::gui_version(revision_or_upload.minor_version)),
class: 'dmsf-select-version' %>
<bold>.</bold>
<b>.</b>
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options,
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(revision_or_upload.patch_version))),
class: 'dmsf-select-version' %>
@ -44,7 +44,7 @@
<%= select_tag select_tag_name_minor,
options_for_select(DmsfUploadHelper::minor_version_select_options, minor_version),
class: 'dmsf-select-version' %>
<bold>.</bold>
<b>.</b>
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options,
[h('&nbsp;'), '']), class: 'dmsf-select-version' %>
<% end %>

View File

@ -52,7 +52,7 @@ function dmsfAddFile(inputEl, file, eagerUpload) {
let attachments = $('#dmsf_attachments_fields');
let max = ($(inputEl).attr('multiple') == 'multiple') ? 10 : 1
if (attachments.children().length < max) {
if (attachments.children.length < max) {
let attachmentId = dmsfAddFile.nextAttachmentId++;
let fileSpan = $('<span>', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' });

View File

@ -57,7 +57,7 @@ function dmsfToggle(el, project_id, folder_id, url)
if (expand) {
// Display only children with expanded parent
m = $(tr).attr('class').match(/(\d+(p|f)) idnt/);
let m = $(tr).attr('class').match(/(\d+(p|f)) idnt/);
if(m){

View File

@ -54,16 +54,16 @@ table.dmsf a.sort.asc.icon.icon-sorted-desc {
.dmsf-tree.dmsf-expanded span.dmsf-expander {
background: none !important;
padding-left: 0px !important;
padding-left: 0 !important;
}
.dmsf-tree.dmsf-collapsed span.dmsf-expander {
background: none !important;
padding-left: 0px !important;
padding-left: 0 !important;
}
table.dmsf td.dmsf-title {
padding-left: 0px;
padding-left: 0;
}
td.dmsf-title a.icon::before {
@ -130,9 +130,9 @@ td.dmsf-title a.icon-folder::before {
}
#sidebar ul > li > a.icon-only.icon-clear-query {
font-size: 0px;
font-size: 0;
display: inline-block;
overflow: hidden;
width: 0px;
width: 0;
height: 16px;
}

View File

@ -126,7 +126,7 @@ class DmsfFilesControllerTest < RedmineDmsf::Test::TestCase
params: {
id: @file1.id,
version_major: @file1.last_revision.major_version,
version_major: @file1.last_revision.minor_version + 1,
version_minor: @file1.last_revision.minor_version + 1,
dmsf_file_revision: {
title: @file1.last_revision.title,
name: @file1.last_revision.name,