CCS revision
This commit is contained in:
parent
78f55e1596
commit
29b33edad4
@ -171,7 +171,7 @@ class DmsfLinksController < ApplicationController
|
||||
if @dmsf_link.delete(commit)
|
||||
flash[:notice] = l(:notice_successful_delete)
|
||||
else
|
||||
@dmsf_link.errors.each do |e, msg|
|
||||
@dmsf_link.errors.each do |_, msg|
|
||||
flash[:error] = msg
|
||||
end
|
||||
end
|
||||
|
||||
@ -114,7 +114,7 @@ class DmsfUploadController < ApplicationController
|
||||
if attachments
|
||||
@folder = DmsfFolder.visible.find_by(id: attachments[:folder_id]) if attachments[:folder_id].present?
|
||||
# standard file input uploads
|
||||
uploaded_files = attachments.select { |key, value| key == 'uploaded_file'}
|
||||
uploaded_files = attachments.select { |key, _| key == 'uploaded_file'}
|
||||
uploaded_files.each do |_, uploaded_file|
|
||||
upload = DmsfUpload.create_from_uploaded_attachment(@project, @folder, uploaded_file)
|
||||
if upload
|
||||
|
||||
@ -39,7 +39,7 @@ module DmsfWorkflowsHelper
|
||||
class: 'objects-selection')
|
||||
end
|
||||
|
||||
links = pagination_links_full(principal_pages, principal_count, per_page_links: false) do |text, parameters, options|
|
||||
links = pagination_links_full(principal_pages, principal_count, per_page_links: false) do |text, parameters, _|
|
||||
link_to text,
|
||||
autocomplete_for_user_dmsf_workflow_path(workflow, parameters.merge(q: params[:q], format: 'js')),
|
||||
remote: true
|
||||
|
||||
@ -92,7 +92,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
remove_extension(filename).gsub(/_+/, ' ');
|
||||
end
|
||||
|
||||
def self.easy_activity_custom_project_scope(scope, options, event_type)
|
||||
def self.easy_activity_custom_project_scope(scope, options, _)
|
||||
scope.where(dmsf_files: { project_id: options[:project_ids] })
|
||||
end
|
||||
|
||||
|
||||
@ -534,15 +534,15 @@ class DmsfFolder < ActiveRecord::Base
|
||||
classes = []
|
||||
if trash
|
||||
if title =~ /^\./
|
||||
classes << 'dmsf_system'
|
||||
classes << 'dmsf-system'
|
||||
else
|
||||
classes << 'hascontextmenu'
|
||||
if type =~ /link$/
|
||||
classes << 'dmsf_gray'
|
||||
classes << 'dmsf-gray'
|
||||
end
|
||||
end
|
||||
else
|
||||
classes << 'dmsf_tree'
|
||||
classes << 'dmsf-tree'
|
||||
if type == 'folder'
|
||||
classes << 'dmsf_collapsed'
|
||||
classes << 'dmsf-not-loaded'
|
||||
@ -550,7 +550,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
classes << 'dmsf_child'
|
||||
end
|
||||
if title =~ /^\./
|
||||
classes << 'dmsf_system'
|
||||
classes << 'dmsf-system'
|
||||
else
|
||||
classes << 'hascontextmenu'
|
||||
classes << 'dmsf-draggable'
|
||||
@ -558,7 +558,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
classes << 'dmsf-droppable'
|
||||
end
|
||||
if type =~ /link$/
|
||||
classes << 'dmsf_gray'
|
||||
classes << 'dmsf-gray'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
class DmsfTitleQueryColumn < QueryColumn
|
||||
|
||||
def css_classes
|
||||
'dmsf_title'
|
||||
'dmsf-title'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
|
||||
<%= context_menu %>
|
||||
|
||||
<% unless (@folder && @folder.system) %>
|
||||
<% unless @folder && @folder.system %>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'CSV', url: { action: :show, id: @project, dmsf_folder_id: @folder } %>
|
||||
<% end %>
|
||||
|
||||
@ -69,10 +69,10 @@
|
||||
<%= radio_button_tag('version', 3) %>
|
||||
<%= select_tag 'custom_version_major', options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(@file.last_revision.major_version, 2))),
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>.
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>.
|
||||
<%= select_tag 'custom_version_minor', options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(@file.last_revision.minor_version, 1))),
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
<% if link %>
|
||||
<p class="dmsf_gray">
|
||||
<p class="dmsf-gray">
|
||||
<% else %>
|
||||
<p>
|
||||
<% end %>
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
<% if links.present? %>
|
||||
<hr/>
|
||||
<strong><%= l(:menu_dmsf) %></strong>
|
||||
<div class="attachments dmsf_parent_container">
|
||||
<div class="attachments dmsf-parent-container">
|
||||
<% # DMS documents & links %>
|
||||
<% links.each do |dmsf_file, link, create_at| %>
|
||||
<% links.each do |dmsf_file, link, _| %>
|
||||
<%= render partial: 'dmsf_files/link', locals: { dmsf_file: dmsf_file, link: link } %>
|
||||
<% end %>
|
||||
<%= render partial: 'dmsf_files/thumbnails', locals: { links: links, thumbnails: thumbnails, link_to: true } %>
|
||||
|
||||
@ -71,16 +71,16 @@
|
||||
<%= render(partial: 'file_new_revision') %>
|
||||
<% end %>
|
||||
|
||||
<div class="dmsf_id_box">
|
||||
<div class="dmsf-id-box">
|
||||
<strong><%= label_tag('', l(:label_document)) %></strong>
|
||||
#<%= "#{@file.id}" %>
|
||||
</div>
|
||||
|
||||
<h3><%= l(:heading_revisions) %></h3>
|
||||
<% @file.dmsf_file_revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %>
|
||||
<div class="dmsf_revision_box">
|
||||
<div id="dmsf_widget_header" class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||
<div class="dmsf_controls contextual">
|
||||
<div class="dmsf-revision-box">
|
||||
<div class="dmsf-widget-header fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||
<div class="dmsf-controls contextual">
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_function l(:title_download_entries),
|
||||
"$('#revision_access-#{revision.id}').toggle()",
|
||||
@ -100,14 +100,14 @@
|
||||
class: 'icon icon-del' if @file_delete_allowed && (@file.dmsf_file_revisions.visible.count > 1) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="dmsf_widget_header_text">
|
||||
<div class="dmsf-widget-header-text">
|
||||
<i><%= l(:info_revision, rev: revision.id) %></i>
|
||||
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
|
||||
<%= l(:info_changed_by_user, changed: format_time(revision.updated_at)) %>
|
||||
<%= link_to(revision.user.name, user_path(revision.user)) if revision.user %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="attributes dmsf_revision_inner_box">
|
||||
<div class="attributes dmsf-revision-inner-box">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<div class="status attribute">
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<span id="public_url" <%= "class='hol'" unless Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'] %>">
|
||||
<% classes = 'hol' unless Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'] %>
|
||||
<span id="public_url" class="<%= classes %>">
|
||||
<%= check_box_tag 'email[public_urls]', 1, false %> <%= l(:label_public_urls) %>
|
||||
<%= date_field_tag('email[expired_at]', '', value: (DateTime.current + 3.days).to_date, size: 10) +
|
||||
calendar_for('email_expired_at') %>
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
} %>
|
||||
</span>
|
||||
<% if defined?(container) && container %>
|
||||
<span class="dmsf_add_link">
|
||||
<span class="dmsf-add-link">
|
||||
<%= link_to l(:label_link_from),
|
||||
new_dmsf_link_path(project_id: container.project.id, type: 'link_from', container: container.class.name),
|
||||
title: l(:title_create_link), class: 'icon icon-add file_selector', remote: true %>
|
||||
|
||||
@ -69,12 +69,12 @@
|
||||
options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(upload.major_version, 2))),
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf_select_version'%>.
|
||||
class: 'dmsf-select-version'%>.
|
||||
<%= select_tag "commited_files[#{i}][custom_version_minor]",
|
||||
options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(upload.minor_version, 1))),
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf_select_version' %>
|
||||
class: 'dmsf-select-version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<%= form_tag({ controller: 'dmsf_upload', action: 'upload_files', id: @project, folder_id: @folder },
|
||||
id: 'uploadform', method: :post, multipart: true) do %>
|
||||
<div>
|
||||
<span class="dmsf_uploader">
|
||||
<span class="dmsf-uploader">
|
||||
<%= render partial: 'dmsf_upload/form',
|
||||
locals: { multiple: true, container: nil, description: true, awf: false } %>
|
||||
</span>
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
<h3 class="title"><%= l(:title_dmsf_workflow_log) %></h3>
|
||||
<p>
|
||||
<% if revision %>
|
||||
<div class="dmsf_log_header_box">
|
||||
<div class="dmsf_log_header_left">
|
||||
<div class="dmsf-log-header-box">
|
||||
<div class="dmsf-log-header-left">
|
||||
<%= label_tag 'workflow_name', "#{l(:link_workflow)} #{l(:field_name).downcase} " %>
|
||||
<% if User.current.allowed_to?(:manage_workflows, @dmsf_workflow.project) %>
|
||||
<%= link_to @dmsf_workflow.name, dmsf_workflow_path(@dmsf_workflow) %>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% @workflows.each do |workflow| %>
|
||||
<tr id="workflow-<%= workflow.id %>" class="dmsf_workflows <%= workflow.active? ? 'active' : 'locked' %>">
|
||||
<tr id="workflow-<%= workflow.id %>" class="dmsf-workflows <%= workflow.active? ? 'active' : 'locked' %>">
|
||||
<td class="name"><%= link_to(h(workflow.name), dmsf_workflow_path(workflow)) %></td>
|
||||
<td class="buttons">
|
||||
<%= change_status_link(workflow) unless @project %>
|
||||
|
||||
@ -83,9 +83,9 @@
|
||||
<div id="<%= "step-index-#{index}-approvers-form" %>" class="hol">
|
||||
<%= form_for(@dmsf_workflow, url: update_step_dmsf_workflow_path(step: index), method: :put,
|
||||
html: { id: "step-index-operator-#{index}-form"}) do |_| %>
|
||||
<div class="dmsf_parent_container">
|
||||
<div class="dmsf-parent-container">
|
||||
<% stps.each do |step| %>
|
||||
<div class="dmsf_child_container">
|
||||
<div class="dmsf-child-container">
|
||||
<label>
|
||||
<%= radio_button_tag "operator_step[#{step.id}]", DmsfWorkflowStep::OPERATOR_AND,
|
||||
step.operator == DmsfWorkflowStep::OPERATOR_AND %>
|
||||
@ -100,7 +100,7 @@
|
||||
<br/>
|
||||
<%= delete_link delete_step_dmsf_workflow_path(step: step.id) %>
|
||||
</div>
|
||||
<div class="dmsf_child_container">
|
||||
<div class="dmsf-child-container">
|
||||
<%= select_tag "assignee[#{step.id}]",
|
||||
principals_options_for_select(@approving_candidates | [step.user], step.user),
|
||||
include_blank: false %>
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="dmsf_buttons">
|
||||
<td class="dmsf-buttons">
|
||||
<%= render partial: 'dmsf_workflows/approval_workflow_button',
|
||||
locals: { file: assignment.dmsf_file_revision.dmsf_file,
|
||||
file_approval_allowed: User.current.allowed_to?(:file_approval,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 393 B |
@ -23,11 +23,11 @@ function dmsfAddLink(linksSpan, linkId, linkName, title, project, awf) {
|
||||
|
||||
if (linksSpan.children().length < 10) {
|
||||
|
||||
var nextLinkId = dmsfAddLink.nextLinkId++;
|
||||
var linkSpan = $('<span>', { id: 'dmsf_links_attachments_' + nextLinkId, 'class': 'attachment' });
|
||||
var iconDel = $('<a>').attr({href: '#', 'class': 'remove-upload icon-only icon-del'});
|
||||
var inputId = $('<input>', {type: 'hidden', name: 'dmsf_links[' + nextLinkId + ']'}).val(linkId);
|
||||
var inputName = $('<input>', {type: 'text', class: 'filename readonly'}).val(linkName);
|
||||
let nextLinkId = dmsfAddLink.nextLinkId++;
|
||||
let linkSpan = $('<span>', { id: 'dmsf_links_attachments_' + nextLinkId, 'class': 'attachment' });
|
||||
let iconDel = $('<a>').attr({href: '#', 'class': 'remove-upload icon-only icon-del'});
|
||||
let inputId = $('<input>', {type: 'hidden', name: 'dmsf_links[' + nextLinkId + ']'}).val(linkId);
|
||||
let inputName = $('<input>', {type: 'text', class: 'filename readonly'}).val(linkName);
|
||||
|
||||
linkSpan.append(inputId);
|
||||
linkSpan.append(inputName);
|
||||
@ -35,7 +35,7 @@ function dmsfAddLink(linksSpan, linkId, linkName, title, project, awf) {
|
||||
|
||||
if(awf) {
|
||||
|
||||
var iconWf = $('<a>').attr({href: "/dmsf_workflows/" + project + "/assign?dmsf_link_id=" + linkId,
|
||||
let iconWf = $('<a>').attr({href: "/dmsf-workflows/" + project + "/assign?dmsf_link_id=" + linkId,
|
||||
'class': 'modify-upload icon-only icon-ok', 'data-remote': 'true', 'title': title});
|
||||
|
||||
linkSpan.append(iconWf);
|
||||
@ -49,14 +49,14 @@ dmsfAddLink.nextLinkId = 1000;
|
||||
|
||||
function dmsfAddFile(inputEl, file, eagerUpload) {
|
||||
|
||||
var attachments = $('#dmsf_attachments_fields');
|
||||
let attachments = $('#dmsf_attachments_fields');
|
||||
|
||||
if (attachments.children().length < 10) {
|
||||
|
||||
var attachmentId = dmsfAddFile.nextAttachmentId++;
|
||||
var fileSpan = $('<span>', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' });
|
||||
var iconDel = $('<a>').attr({href: '#', 'class': 'remove-upload icon-only icon-del'}).toggle(!eagerUpload);
|
||||
var fileName = $('<input>', {type: 'text', 'class': 'filename readonly',
|
||||
let attachmentId = dmsfAddFile.nextAttachmentId++;
|
||||
let fileSpan = $('<span>', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' });
|
||||
let iconDel = $('<a>').attr({href: '#', 'class': 'remove-upload icon-only icon-del'}).toggle(!eagerUpload);
|
||||
let fileName = $('<input>', {type: 'text', 'class': 'filename readonly',
|
||||
name: 'dmsf_attachments[' + attachmentId + '][filename]', readonly: 'readonly'}).val(file.name);
|
||||
|
||||
if($(inputEl).attr('multiple') == 'multiple') {
|
||||
@ -65,7 +65,7 @@ function dmsfAddFile(inputEl, file, eagerUpload) {
|
||||
|
||||
if($(inputEl).data('description')) {
|
||||
|
||||
var description = $('<input>', {type: 'text', 'class': 'description',
|
||||
let description = $('<input>', {type: 'text', 'class': 'description',
|
||||
name: 'dmsf_attachments[' + attachmentId + '][description]', maxlength: 255,
|
||||
placeholder: $(inputEl).data('description-placeholder')
|
||||
}).toggle(!eagerUpload);
|
||||
@ -77,7 +77,7 @@ function dmsfAddFile(inputEl, file, eagerUpload) {
|
||||
|
||||
if($(inputEl).data('awf')) {
|
||||
|
||||
var iconWf = $('<a>').attr({href: '/dmsf_workflows/' + $(inputEl).attr(
|
||||
let iconWf = $('<a>').attr({href: '/dmsf-workflows/' + $(inputEl).attr(
|
||||
'data-project') + "/assign?attachment_id=" + attachmentId, 'class': 'modify-upload icon-only icon-ok',
|
||||
'data-remote': 'true'});
|
||||
|
||||
@ -134,7 +134,7 @@ function dmsfAjaxUpload(file, attachmentId, fileSpan, inputEl) {
|
||||
}).always(function() {
|
||||
dmsfAjaxUpload.uploading--;
|
||||
fileSpan.removeClass('ajax-loading');
|
||||
var form = fileSpan.parents('form');
|
||||
let form = fileSpan.parents('form');
|
||||
if ((form.queue('upload').length == 0) && (dmsfAjaxUpload.uploading == 0)) {
|
||||
$('input:submit', form).removeAttr('disabled');
|
||||
}
|
||||
@ -142,11 +142,11 @@ function dmsfAjaxUpload(file, attachmentId, fileSpan, inputEl) {
|
||||
});
|
||||
}
|
||||
|
||||
var progressSpan = $('<div>').insertAfter(fileSpan.find('input.filename'));
|
||||
let progressSpan = $('<div>').insertAfter(fileSpan.find('input.filename'));
|
||||
progressSpan.progressbar();
|
||||
fileSpan.addClass('ajax-waiting');
|
||||
|
||||
var maxSyncUpload = $(inputEl).data('max-concurrent-uploads');
|
||||
let maxSyncUpload = $(inputEl).data('max-concurrent-uploads');
|
||||
|
||||
if(maxSyncUpload == null || maxSyncUpload <= 0 || dmsfAjaxUpload.uploading < maxSyncUpload)
|
||||
actualUpload(file, attachmentId, fileSpan, inputEl);
|
||||
@ -163,16 +163,16 @@ function dmsfRemoveFileLbl() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function dmsfRemoveFile() {
|
||||
/*function dmsfRemoveFile() {
|
||||
|
||||
$(this).parent('span').parent('span').remove();
|
||||
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
function dmsfUploadBlob(blob, uploadUrl, attachmentId, options) {
|
||||
|
||||
var actualOptions = $.extend({
|
||||
let actualOptions = $.extend({
|
||||
loadstartEventHandler: $.noop,
|
||||
progressEventHandler: $.noop
|
||||
}, options);
|
||||
@ -192,7 +192,7 @@ function dmsfUploadBlob(blob, uploadUrl, attachmentId, options) {
|
||||
settings.data = blob;
|
||||
},
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
let xhr = $.ajaxSettings.xhr();
|
||||
xhr.upload.onloadstart = actualOptions.loadstartEventHandler;
|
||||
xhr.upload.onprogress = actualOptions.progressEventHandler;
|
||||
return xhr;
|
||||
@ -205,8 +205,8 @@ function dmsfUploadBlob(blob, uploadUrl, attachmentId, options) {
|
||||
|
||||
function dmsfAddInputFiles(inputEl) {
|
||||
|
||||
var clearedFileInput = $(inputEl).clone().val('');
|
||||
var addFileSpan = $('.dmsf_add_attachment');
|
||||
let clearedFileInput = $(inputEl).clone().val('');
|
||||
let addFileSpan = $('.dmsf_add_attachment');
|
||||
|
||||
if ($.ajaxSettings.xhr().upload && inputEl.files) {
|
||||
// upload files using ajax
|
||||
@ -214,8 +214,8 @@ function dmsfAddInputFiles(inputEl) {
|
||||
$(inputEl).remove();
|
||||
} else {
|
||||
// browser not supporting the file API, upload on form submission
|
||||
var attachmentId;
|
||||
var aFilename = inputEl.value.split(/\/|\\/);
|
||||
let attachmentId;
|
||||
let aFilename = inputEl.value.split(/\/|\\/);
|
||||
attachmentId = dmsfAddFile(inputEl, {name: aFilename[aFilename.length - 1]}, false);
|
||||
if (attachmentId) {
|
||||
$(inputEl).attr({name: 'dmsf_attachments[' + attachmentId + '][file]', style: 'display:none;'}).appendTo(
|
||||
@ -236,10 +236,10 @@ function dmsfAddInputFiles(inputEl) {
|
||||
|
||||
function dmsfUploadAndAttachFiles(files, inputEl) {
|
||||
|
||||
var maxFileSize = $(inputEl).data('max-file-size');
|
||||
var maxFileSizeExceeded = $(inputEl).data('max-file-size-message');
|
||||
let maxFileSize = $(inputEl).data('max-file-size');
|
||||
let maxFileSizeExceeded = $(inputEl).data('max-file-size-message');
|
||||
let sizeExceeded = false;
|
||||
|
||||
var sizeExceeded = false;
|
||||
$.each(files, function() {
|
||||
if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;}
|
||||
});
|
||||
@ -277,7 +277,7 @@ function dmsfSetupFileDrop() {
|
||||
|
||||
$.event.fixHooks.drop = { props: [ 'dataTransfer' ] };
|
||||
|
||||
$('form span.dmsf_uploader').has('input:file').each(function() {
|
||||
$('form span.dmsf-uploader').has('input:file').each(function() {
|
||||
$(this).on({
|
||||
dragover: dmsfDragOverHandler,
|
||||
dragleave: dmsfDragOutHandler,
|
||||
@ -292,4 +292,4 @@ $( document ).ready(function() {
|
||||
dmsfSetupFileDrop();
|
||||
$(document).on("erui_new_dom", dmsfSetupFileDrop);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -22,35 +22,35 @@
|
||||
/* Function to allow the projects to show up as a tree */
|
||||
function dmsfToggle(EL, PM, url)
|
||||
{
|
||||
var els = document.querySelectorAll('tr.dmsf_tree');
|
||||
var elsLen = els.length;
|
||||
var pattern = new RegExp("(^|\\s)" + EL + "(\\s|$)");
|
||||
var cpattern = new RegExp('span');
|
||||
var expand = new RegExp('dmsf_expanded');
|
||||
var collapse = new RegExp('dmsf_collapsed');
|
||||
var hide = new RegExp('dmsf_hidden');
|
||||
var spanid = PM;
|
||||
var classid = new RegExp('junk');
|
||||
var oddeventoggle = 0;
|
||||
let els = document.querySelectorAll('tr.dmsf-tree');
|
||||
let elsLen = els.length;
|
||||
let pattern = new RegExp("(^|\\s)" + EL + "(\\s|$)");
|
||||
let cpattern = new RegExp('span');
|
||||
let expand = new RegExp('dmsf_expanded');
|
||||
let collapse = new RegExp('dmsf_collapsed');
|
||||
let hide = new RegExp('dmsf-hidden');
|
||||
let spanid = PM;
|
||||
let classid = new RegExp('junk');
|
||||
let oddeventoggle = 0;
|
||||
|
||||
// Expand not yet loaded selected row
|
||||
var selectedRow = document.getElementById(PM);
|
||||
let selectedRow = document.getElementById(PM);
|
||||
|
||||
if(selectedRow.className.indexOf('dmsf-not-loaded') >= 0){
|
||||
|
||||
dmsfExpandRows(EL, selectedRow, url);
|
||||
}
|
||||
|
||||
for(var i = 0; i < elsLen; i++)
|
||||
for(let i = 0; i < elsLen; i++)
|
||||
{
|
||||
if(cpattern.test(els[i].id))
|
||||
{
|
||||
var tmpspanid = spanid;
|
||||
var tmpclassid = classid;
|
||||
let tmpspanid = spanid;
|
||||
let tmpclassid = classid;
|
||||
|
||||
spanid = els[i].id;
|
||||
classid = spanid;
|
||||
m = classid.match(/(\w+)span/);
|
||||
let m = classid.match(/(\w+)span/);
|
||||
if(m) {
|
||||
classid = m[1];
|
||||
}
|
||||
@ -70,11 +70,11 @@ function dmsfToggle(EL, PM, url)
|
||||
{
|
||||
let cnames = els[i].className;
|
||||
|
||||
cnames = cnames.replace(/dmsf_hidden/g,'');
|
||||
cnames = cnames.replace(/dmsf-hidden/g,'');
|
||||
|
||||
if(expand.test(selectedRow.className))
|
||||
{
|
||||
cnames += ' dmsf_hidden';
|
||||
cnames += ' dmsf-hidden';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -82,7 +82,7 @@ function dmsfToggle(EL, PM, url)
|
||||
{
|
||||
if(collapse.test(document.getElementById(spanid).className))
|
||||
{
|
||||
cnames += ' dmsf_hidden';
|
||||
cnames += ' dmsf-hidden';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -132,10 +132,10 @@ function dmsfExpandRows(EL, parentRow, url) {
|
||||
|
||||
parentRow.className = parentRow.className.replace(/dmsf-not-loaded/, '');
|
||||
|
||||
var idnt = 0;
|
||||
var pos = $(parentRow).find('.dmsf_position').text();
|
||||
var classes = '';
|
||||
var m = parentRow.className.match(/idnt-(\d+)/);
|
||||
let idnt = 0;
|
||||
let pos = $(parentRow).find('.dmsf_position').text();
|
||||
let classes = '';
|
||||
let m = parentRow.className.match(/idnt-(\d+)/);
|
||||
|
||||
if(m){
|
||||
idnt = m[1];
|
||||
|
||||
@ -19,41 +19,26 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
.list .dmsf_title {
|
||||
.list .dmsf-title {
|
||||
width: 40%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.list .dmsf_buttons {
|
||||
.list .dmsf-buttons {
|
||||
min-width: 18px;
|
||||
}
|
||||
|
||||
.list .dmsf_checkbox {
|
||||
width: 15px;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
|
||||
.list .dmsf_checkbox input {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dmsf_entries {
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Revision's downloads box */
|
||||
|
||||
#dmsf_buttons.dmsf_controls {
|
||||
#dmsf_buttons.dmsf-controls {
|
||||
float: left
|
||||
}
|
||||
|
||||
.dmsf_uploader span[id*="dmsf_"] .filename {
|
||||
.dmsf-uploader span[id*="dmsf_"] .filename {
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.dmsf_filename {
|
||||
.dmsf-filename {
|
||||
padding: 0 10px 0 10px;
|
||||
float: right;
|
||||
font-size: 0.8em;
|
||||
@ -63,36 +48,36 @@
|
||||
/* Approval workflow */
|
||||
#dmsf_users_for_delegate { height: 200px; overflow:auto; }
|
||||
#dmsf_users_for_delegate label { display: block; }
|
||||
.dmsf_workflows.locked a { color: #aaa; }
|
||||
.dmsf-workflows.locked a { color: #aaa; }
|
||||
|
||||
/* DMSF revision box */
|
||||
#new_revision_form_content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dmsf_revision_box {
|
||||
.dmsf-revision-box {
|
||||
background-color:#f6f6f6;
|
||||
}
|
||||
|
||||
.dmsf_revision_inner_box {
|
||||
.dmsf-revision-inner-box {
|
||||
border: 1px solid #e4e4e4;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
div.dmsf_revision_inner_box .attribute {
|
||||
div.dmsf-revision-inner-box .attribute {
|
||||
padding-left: 180px;
|
||||
clear: left;
|
||||
min-height: 1.8em;
|
||||
}
|
||||
|
||||
div.dmsf_revision_inner_box .attribute .label {
|
||||
div.dmsf-revision-inner-box .attribute .label {
|
||||
width: 170px;
|
||||
margin-left: -180px;
|
||||
font-weight: bold;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dmsf_id_box {
|
||||
.dmsf-id-box {
|
||||
float: right;
|
||||
white-space: nowrap;
|
||||
line-height: 24px;
|
||||
@ -101,28 +86,28 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.dmsf_log_header_box{
|
||||
.dmsf-log-header-box{
|
||||
padding:6px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.dmsf_log_header_left {
|
||||
.dmsf-log-header-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dmsf_log_header_box label {
|
||||
.dmsf-log-header-box label {
|
||||
font-weight: bold;
|
||||
margin-left: 0;
|
||||
margin-right: 3px;
|
||||
padding: 3px 0 3px 0;
|
||||
}
|
||||
|
||||
#dmsf_widget_header {
|
||||
.dmsf-widget-header {
|
||||
font-weight: normal;
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
#dmsf_widget_header_text {
|
||||
.dmsf-widget-header-text {
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
|
||||
@ -136,9 +121,8 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); }
|
||||
.dmsf_system .icon-folder { background-image: url(../images/folder_system.png); }
|
||||
.dmsf_system_closed .icon-folder { background-image: url(../images/folder_system_closed.png); }
|
||||
.dmsf-gray .icon-folder { background-image: url(../images/folder_gray.png); }
|
||||
.dmsf-system .icon-folder { background-image: url(../images/folder_system.png); }
|
||||
|
||||
.icon-file.filetype-doc, .icon-file.filetype-docx { background-image: url(../images/filetypes/doc.png); }
|
||||
.icon-file.filetype-xls, .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls.png); }
|
||||
@ -151,55 +135,55 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
.icon-file.filetype-odp { background-image: url(../images/filetypes/odp.png); }
|
||||
.icon-file.filetype-odg { background-image: url(../images/filetypes/odg.png); }
|
||||
|
||||
.dmsf_gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-ott { background-image: url(../images/filetypes/ott_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); }
|
||||
.dmsf_gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-ott { background-image: url(../images/filetypes/ott_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); }
|
||||
.dmsf-gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); }
|
||||
|
||||
.dmsf_gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-java { background-image: url(../images/filetypes/java_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); }
|
||||
.dmsf_gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); }
|
||||
.dmsf_gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); }
|
||||
.dmsf_gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); }
|
||||
.dmsf_gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf_gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf_gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf_gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf_gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); }
|
||||
.dmsf_gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); }
|
||||
.dmsf_gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-java { background-image: url(../images/filetypes/java_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); }
|
||||
.dmsf-gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); }
|
||||
.dmsf-gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); }
|
||||
.dmsf-gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); }
|
||||
.dmsf-gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); }
|
||||
.dmsf-gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf-gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf-gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf-gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); }
|
||||
.dmsf-gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); }
|
||||
.dmsf-gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); }
|
||||
.dmsf-gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); }
|
||||
|
||||
/* Activities */
|
||||
.icon-dmsf-file-revision { background-image: url(../../../images/document.png); }
|
||||
|
||||
/* Links */
|
||||
.dmsf_gray { color: #AAA }
|
||||
.dmsf-gray { color: #AAA }
|
||||
|
||||
.dmsf_gray a, .dmsf_gray a:link, .dmsf_gray a:visited {
|
||||
.dmsf-gray a, .dmsf-gray a:link, .dmsf-gray a:visited {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* System folders */
|
||||
.dmsf_system {
|
||||
.dmsf-system {
|
||||
color: #5C82AD
|
||||
}
|
||||
|
||||
.dmsf_system a, .dmsf_gray a:link, .dmsf_gray a:visited {
|
||||
.dmsf-system a, .dmsf-gray a:link, .dmsf-gray a:visited {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
}
|
||||
@ -208,55 +192,42 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
.icon-dmsf-file { background-image: url(../../../images/document.png); }
|
||||
|
||||
/* DMSF tree view */
|
||||
.dmsf_hidden { display:none; }
|
||||
.dmsf_tree span.dmsf_expander { cursor: pointer; }
|
||||
.dmsf_tree.dmsf_expanded td.dmsf_title span {
|
||||
.dmsf-hidden { display:none; }
|
||||
.dmsf-tree span.dmsf_expander { cursor: pointer; }
|
||||
.dmsf-tree.dmsf_expanded td.dmsf-title span {
|
||||
background: url(../../../images/arrow_down.png) no-repeat 0 50%;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.dmsf_tree.dmsf_child .dmsf_title span { padding-left: 16px; }
|
||||
.dmsf_tree.dmsf_collapsed .dmsf_title span {
|
||||
.dmsf-tree.dmsf_child .dmsf-title span { padding-left: 16px; }
|
||||
.dmsf-tree.dmsf_collapsed .dmsf-title span {
|
||||
background: url(../../../images/arrow_right.png) no-repeat 0 50%;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.dmsf_tree.idnt-1 .dmsf_title { padding-left: 1.5em; }
|
||||
.dmsf_tree.idnt-2 .dmsf_title { padding-left: 2em; }
|
||||
.dmsf_tree.idnt-3 .dmsf_title { padding-left: 2.5em; }
|
||||
.dmsf_tree.idnt-4 .dmsf_title { padding-left: 3em; }
|
||||
.dmsf_tree.idnt-5 .dmsf_title { padding-left: 3.5em; }
|
||||
.dmsf_tree.idnt-6 .dmsf_title { padding-left: 4em; }
|
||||
.dmsf_tree.idnt-7 .dmsf_title { padding-left: 4.5em; }
|
||||
.dmsf_tree.idnt-8 .dmsf_title { padding-left: 5em; }
|
||||
.dmsf_tree.idnt-9 .dmsf_title { padding-left: 5.5em; }
|
||||
.dmsf-tree.idnt-1 .dmsf-title { padding-left: 1.5em; }
|
||||
.dmsf-tree.idnt-2 .dmsf-title { padding-left: 2em; }
|
||||
.dmsf-tree.idnt-3 .dmsf-title { padding-left: 2.5em; }
|
||||
.dmsf-tree.idnt-4 .dmsf-title { padding-left: 3em; }
|
||||
.dmsf-tree.idnt-5 .dmsf-title { padding-left: 3.5em; }
|
||||
.dmsf-tree.idnt-6 .dmsf-title { padding-left: 4em; }
|
||||
.dmsf-tree.idnt-7 .dmsf-title { padding-left: 4.5em; }
|
||||
.dmsf-tree.idnt-8 .dmsf-title { padding-left: 5em; }
|
||||
.dmsf-tree.idnt-9 .dmsf-title { padding-left: 5.5em; }
|
||||
|
||||
.dmsf_select_version {
|
||||
.dmsf-select-version {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
.dmsf_parent_container {
|
||||
.dmsf-parent-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dmsf_child_container {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dmsf_select_version {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
.dmsf_parent_container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dmsf_child_container {
|
||||
.dmsf-child-container {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* DMSF file upload */
|
||||
.dmsf_uploader {
|
||||
.dmsf-uploader {
|
||||
padding:10px;
|
||||
margin-bottom: 20px;
|
||||
background-color:#f6f6f6;
|
||||
@ -270,20 +241,13 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dmsf_add_link {
|
||||
.dmsf-add-link {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dmsf_add_file {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#dmsf_attachments_fields input.description {
|
||||
margin-left:4px;
|
||||
width:340px;
|
||||
|
||||
@ -142,7 +142,7 @@ $stem_langs.each do | lang |
|
||||
cmd << ' -v' if $verbose > 0
|
||||
cmd << ' --retry-failed' if $retryfailed
|
||||
log cmd
|
||||
system_or_raise (cmd)
|
||||
system_or_raise cmd
|
||||
end
|
||||
log 'Redmine DMS documents indexed'
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ module RedmineDmsf
|
||||
html << "<label class=\"#{classes}\">"
|
||||
html << radio_button_tag('dmsf_attachments_upload_choice', 'Attachments',
|
||||
User.current.pref.dmsf_attachments_upload_choice == 'Attachments',
|
||||
onchange: "$('.attachments-container:not(.dmsf_uploader)').show(); $('.dmsf_uploader').parent().hide(); return false;")
|
||||
onchange: "$('.attachments-container:not(.dmsf-uploader)').show(); $('.dmsf-uploader').parent().hide(); return false;")
|
||||
html << l(:label_basic_attachments)
|
||||
html << '</label>'
|
||||
unless context[:container] && context[:container].new_record?
|
||||
@ -48,12 +48,12 @@ module RedmineDmsf
|
||||
html << "<label class=\"#{classes}\">"
|
||||
html << radio_button_tag('dmsf_attachments_upload_choice', 'DMSF',
|
||||
User.current.pref.dmsf_attachments_upload_choice == 'DMSF',
|
||||
onchange: "$('.attachments-container:not(.dmsf_uploader)').hide(); $('.dmsf_uploader').parent().show(); return false;")
|
||||
onchange: "$('.attachments-container:not(.dmsf-uploader)').hide(); $('.dmsf-uploader').parent().show(); return false;")
|
||||
html << l(:label_dmsf_attachments)
|
||||
html << '</label>'
|
||||
html << '</p>'
|
||||
if User.current.pref.dmsf_attachments_upload_choice == 'DMSF'
|
||||
html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf_uploader)').hide();")
|
||||
html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf-uploader)').hide();")
|
||||
end
|
||||
end
|
||||
# Upload form
|
||||
@ -151,9 +151,9 @@ module RedmineDmsf
|
||||
html << " style=\"#{(User.current.pref.dmsf_attachments_upload_choice == 'Attachments') ? 'display: none;' : ''}\">"
|
||||
if label
|
||||
html << "<label>#{l(:label_document_plural)}</label>"
|
||||
html << "<span class=\"attachments-container dmsf_uploader\">"
|
||||
html << "<span class=\"attachments-container dmsf-uploader\">"
|
||||
else
|
||||
html << "<span class=\"attachments-container dmsf_uploader\" style=\"border: 2px dashed #dfccaf; background: none;\">"
|
||||
html << "<span class=\"attachments-container dmsf-uploader\" style=\"border: 2px dashed #dfccaf; background: none;\">"
|
||||
end
|
||||
html << context[:controller].send(:render_to_string,
|
||||
{ partial: 'dmsf_upload/form',
|
||||
@ -191,7 +191,7 @@ module RedmineDmsf
|
||||
|
||||
def attachment_row(dmsf_file, link, issue, controller)
|
||||
if link
|
||||
html = +'<tr class="dmsf_gray">'
|
||||
html = +'<tr class="dmsf-gray">'
|
||||
else
|
||||
html = +'<tr>'
|
||||
end
|
||||
|
||||
@ -161,7 +161,6 @@ module RedmineDmsf
|
||||
# Adds a journal detail for an attachment that was added or removed
|
||||
def journalize_dmsf_file(dmsf_file, added_or_removed)
|
||||
init_journal(User.current)
|
||||
key = (added_or_removed == :removed ? :old_value : :value)
|
||||
current_journal.details << JournalDetail.new(
|
||||
property: 'dmsf_file',
|
||||
prop_key: dmsf_file.id,
|
||||
|
||||
@ -164,7 +164,6 @@ module RedmineDmsf
|
||||
# Adds a journal detail for an attachment that was added or removed
|
||||
def journalize_dmsf_file(dmsf_file, added_or_removed)
|
||||
init_journal(User.current)
|
||||
key = (added_or_removed == :removed ? :old_value : :value)
|
||||
current_journal.details << JournalDetail.new(
|
||||
property: 'dmsf_file',
|
||||
prop_key: dmsf_file.id,
|
||||
|
||||
@ -42,7 +42,7 @@ module RedmineDmsf
|
||||
link_to h(value), dmsf_file_path(id: item.id)
|
||||
end
|
||||
when 'folder', 'folder-link'
|
||||
if(item.id)
|
||||
if item.id
|
||||
if item.deleted && (item.deleted > 0)
|
||||
super column, item, value
|
||||
else
|
||||
@ -76,7 +76,7 @@ module RedmineDmsf
|
||||
class: 'icon icon-folder',
|
||||
title: h(value))
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf_filename', title: l(:title_filename_for_download))
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download))
|
||||
when 'folder-link'
|
||||
if item.deleted && (item.deleted > 0)
|
||||
tag = content_tag('span', value, class: 'icon icon-folder')
|
||||
@ -87,7 +87,7 @@ module RedmineDmsf
|
||||
class: 'icon icon-folder',
|
||||
title: h(value))
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf_filename', title: l(:label_target_folder))
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:label_target_folder))
|
||||
when 'file', 'file-link'
|
||||
if item.deleted && (item.deleted > 0)
|
||||
tag = content_tag('span', value, class: "icon icon-file #{DmsfHelper.filetype_css(item.filename)}")
|
||||
@ -103,7 +103,7 @@ module RedmineDmsf
|
||||
title: h(value),
|
||||
'data-downloadurl': "#{content_type}:#{h(value)}:#{file_view_url}")
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf_filename', title: l(:title_filename_for_download))
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download))
|
||||
when 'url-link'
|
||||
if item.deleted && (item.deleted > 0)
|
||||
tag = content_tag('span', value, class: 'icon icon-link')
|
||||
@ -111,7 +111,7 @@ module RedmineDmsf
|
||||
tag = "<span class=\"dmsf_expander\"></span>".html_safe +
|
||||
link_to(h(value), item.filename, target: '_blank', class: 'icon icon-link')
|
||||
end
|
||||
tag + content_tag('div', item.filename, class: 'dmsf_filename', title: l(:field_url))
|
||||
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:field_url))
|
||||
else
|
||||
h(value)
|
||||
end
|
||||
|
||||
@ -32,8 +32,8 @@ clone()
|
||||
# Exit if the cloning fails
|
||||
set -e
|
||||
|
||||
rm -rf $PATH_TO_REDMINE
|
||||
git clone -b $REDMINE_GIT_TAG --depth=100 --quiet $REDMINE_GIT_REPO $PATH_TO_REDMINE
|
||||
rm -rf ${PATH_TO_REDMINE}
|
||||
git clone -b ${REDMINE_GIT_TAG} --depth=100 --quiet ${REDMINE_GIT_REPO} ${PATH_TO_REDMINE}
|
||||
}
|
||||
|
||||
test()
|
||||
@ -41,7 +41,7 @@ test()
|
||||
# Exit if a test fails
|
||||
set -e
|
||||
|
||||
cd $PATH_TO_REDMINE
|
||||
cd ${PATH_TO_REDMINE}
|
||||
|
||||
# Run tests within application
|
||||
bundle exec rake redmine:plugins:test:units NAME=redmine_dmsf RAILS_ENV=test
|
||||
@ -54,7 +54,7 @@ uninstall()
|
||||
# Exit if the migration fails
|
||||
set -e
|
||||
|
||||
cd $PATH_TO_REDMINE
|
||||
cd ${PATH_TO_REDMINE}
|
||||
|
||||
# clean up database
|
||||
bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf VERSION=0 RAILS_ENV=test
|
||||
@ -66,14 +66,14 @@ install()
|
||||
set -e
|
||||
|
||||
# cd to redmine folder
|
||||
cd $PATH_TO_REDMINE
|
||||
cd ${PATH_TO_REDMINE}
|
||||
echo current directory is `pwd`
|
||||
|
||||
# Create a link to the dmsf plugin
|
||||
ln -sf $PATH_TO_DMSF plugins/redmine_dmsf
|
||||
ln -sf ${PATH_TO_DMSF} plugins/redmine_dmsf
|
||||
|
||||
# Copy database.yml
|
||||
cp $WORKSPACE/database.yml config/
|
||||
cp ${WORKSPACE}/database.yml config/
|
||||
|
||||
# Install gems
|
||||
# Not ideal, but at present Travis-CI will not install with xapian enabled:
|
||||
|
||||
@ -130,7 +130,7 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase
|
||||
assert_response :forbidden
|
||||
end
|
||||
|
||||
def test_delete_not_empty
|
||||
def test_delete_with_parmission_but_not_empty
|
||||
# Permissions OK but the folder is not empty
|
||||
@role.add_permission! :folder_manipulation
|
||||
get :delete, params: { id: @project, folder_id: @folder1.id, commit: false}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user