From c309350a9deb0dcc0f082125456598007cdf6fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 22 Oct 2024 12:38:42 +0200 Subject: [PATCH 1/5] Missing back_url --- lib/redmine_dmsf/hooks/views/issue_view_hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb index a01c1ea2..67cde1ff 100644 --- a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb @@ -275,7 +275,7 @@ module RedmineDmsf dmsf_file.project)) || (!link && User.current.allowed_to?(:file_delete, dmsf_file.project))) html << link_to('', - link ? dmsf_link_path(link, commit: 'yes') : dmsf_file_path(id: dmsf_file, commit: 'yes'), + link ? dmsf_link_path(link, commit: 'yes', back_url: issue_path(issue)) : dmsf_file_path(id: dmsf_file, commit: 'yes', back_url: issue_path(issue)), data: { confirm: l(:text_are_you_sure) }, method: :delete, title: l(:button_delete), From 0af328d211ae6c780d8d30c2583a2f104a5ffa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 22 Oct 2024 13:50:26 +0200 Subject: [PATCH 2/5] Approval workflow notifications --- lib/redmine_dmsf.rb | 2 +- lib/redmine_dmsf/patches/notifiable_ru_patch.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine_dmsf.rb b/lib/redmine_dmsf.rb index 33babe90..c6e6eb41 100644 --- a/lib/redmine_dmsf.rb +++ b/lib/redmine_dmsf.rb @@ -42,7 +42,7 @@ require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/search_patch" require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/custom_field_patch" # A workaround for obsolete 'alias_method' usage in RedmineUp's plugins -if RedmineDmsf::Plugin.an_obsolete_plugin_present? +if defined?(EasyExtensions) || RedmineDmsf::Plugin.an_obsolete_plugin_present? require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/notifiable_ru_patch" else require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/notifiable_patch" diff --git a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb index e5047569..9d3f011f 100644 --- a/lib/redmine_dmsf/patches/notifiable_ru_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb @@ -48,6 +48,6 @@ module RedmineDmsf end # Apply the patch -if !defined?(EasyExtensions) && RedmineDmsf::Plugin.an_obsolete_plugin_present? +if defined?(EasyExtensions) || RedmineDmsf::Plugin.an_obsolete_plugin_present? Redmine::Notifiable.include RedmineDmsf::Patches::NotifiableRuPatch end From c780e8e34929c211a698820d90ef9a183e857670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 22 Oct 2024 14:50:22 +0200 Subject: [PATCH 3/5] Multiple files upload #1559 --- assets/help/en/dmsf_help.html | 14 ++++---------- assets/javascripts/attachments_dmsf.js | 3 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/assets/help/en/dmsf_help.html b/assets/help/en/dmsf_help.html index 8937e92d..e5265fba 100644 --- a/assets/help/en/dmsf_help.html +++ b/assets/help/en/dmsf_help.html @@ -234,20 +234,14 @@

5 DMS module

The DMS module allows you to store all documentation relevant to a project at one place, sorted - into folders. You can switch on the Documents module by going to the project Settings → Modules tab. Check the - check box in front of the DMS item, which is the Document Management System Feature. -

-

- At the screen you find two major areas: folder and files tree in the upper part of the screen, and an area for - uploading files in the lower part of the screen. + into folders. You can switch on the Documents module by going to the project Settings → Modules tab. Check the check box in front of the DMS item, which is the Document Management System Feature.

5.1 Documents management

- The documents are stored in folders, which should have such a structure that provides an easy orientation within - the topic. + The documents are stored in folders, which should have such a structure that provides an easy orientation within the topic.

DMS Main @@ -411,14 +405,14 @@

5.11 Add documents

Click on the green plus icon New document in the top right of the main view. Then you can use the - Browse button or simple drag and drop files into the drop-able area. Multiple files can be selected. + Browse button or simple drag and drop files into the drop-able area. Multiple files (max 10) can be selected.

Recently uploaded files ar listed on the screen. You can delete them, if they were selected by mistake using the trash bin icon. When done, click the Uplad button.

- If you use [+] icon, you can specify document's details and then you can directly use Upload an commit button. + If you use [+] icon, you can specify document's details and then you can directly use Upload and commit button. In that case the following commit screeen will be skipped and uploaded documents will be directly stored.

', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' }); From c1b4192f3563756c9caafa6943c4625502488962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 22 Oct 2024 15:12:39 +0200 Subject: [PATCH 4/5] Multiple files upload #1559 --- assets/javascripts/attachments_dmsf.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/attachments_dmsf.js b/assets/javascripts/attachments_dmsf.js index cdb3dbbc..865da69f 100644 --- a/assets/javascripts/attachments_dmsf.js +++ b/assets/javascripts/attachments_dmsf.js @@ -151,9 +151,8 @@ function dmsfAddFile(inputEl, file, eagerUpload) { let attachments = $('#dmsf_attachments_fields'); let max = ($(inputEl).attr('multiple') == 'multiple') ? 10 : 1 - let n = attachments.children('.attachment').length; - - if (n < max) { + + if (attachments.children('.attachment').length < max) { let attachmentId = dmsfAddFile.nextAttachmentId++; let fileSpan = $('', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' }); From 601c993639910bced10959c2bf6874aa42fdfcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 24 Oct 2024 07:54:22 +0200 Subject: [PATCH 5/5] v3.2.4 release --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- init.rb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e519c9c8..150b86c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog for Redmine DMSF ========================== +3.2.4 *2024-10-24* +------------------ + + Multiple file upload fix + +* Bug: #1559 - Multiple files upload +* Bug: #1558 - Deleting of uploaded files + 3.2.3 *2024-10-18* ------------------ diff --git a/README.md b/README.md index b3367c22..1484debb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Redmine DMSF Plugin 3.2.3 +Redmine DMSF Plugin 3.2.4 ========================= [![GitHub CI](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml) diff --git a/init.rb b/init.rb index f100c1e8..06e15c2f 100644 --- a/init.rb +++ b/init.rb @@ -24,7 +24,7 @@ Redmine::Plugin.register :redmine_dmsf do author_url 'https://github.com/danmunn/redmine_dmsf/graphs/contributors' author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '3.2.3' + version '3.2.4' requires_redmine version_or_higher: '5.0.0'