modern upload file type don't work #593
This commit is contained in:
parent
02c65e87aa
commit
44be3cf540
@ -33,6 +33,7 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
helper :all
|
||||
helper :dmsf_workflows
|
||||
helper :dmsf
|
||||
|
||||
def view
|
||||
begin
|
||||
|
||||
@ -69,7 +69,7 @@ module DmsfHelper
|
||||
|
||||
def json_url
|
||||
if I18n.locale
|
||||
ret = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json"
|
||||
ret = "jquery.dataTables/#{I18n.locale}.json"
|
||||
path = "#{File.dirname(__FILE__)}/../../assets/javascripts/#{ret}"
|
||||
return ret if File.exist?(path)
|
||||
Rails.logger.warn "#{path} not found"
|
||||
@ -77,6 +77,16 @@ module DmsfHelper
|
||||
'jquery.dataTables/en.json'
|
||||
end
|
||||
|
||||
def js_url
|
||||
if I18n.locale
|
||||
ret = "plupload/js/i18n/#{I18n.locale}.js"
|
||||
path = "#{File.dirname(__FILE__)}/../../assets/javascripts/#{ret}"
|
||||
return ret if File.exist?(path)
|
||||
Rails.logger.warn "#{path} not found"
|
||||
end
|
||||
'plupload/js/i18n/en.js'
|
||||
end
|
||||
|
||||
def self.all_children_sorted(parent, pos, ident)
|
||||
# Folders && files && links
|
||||
nodes = parent.dmsf_folders.visible + parent.dmsf_links.visible + parent.dmsf_files.visible
|
||||
|
||||
@ -170,11 +170,6 @@
|
||||
|
||||
<span class="pagination"><%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %></span>
|
||||
|
||||
<%
|
||||
url = 'jquery.dataTables/en.json'
|
||||
url = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && !I18n.locale.to_s.match(/^en.*/)
|
||||
%>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('a.delete-revision').click(function(event) {
|
||||
if(!window.confirm('<%= l(:text_are_you_sure) %>')) {
|
||||
@ -209,7 +204,7 @@
|
||||
$('.dmsf_list').dataTable({
|
||||
'bJQueryUI': true,
|
||||
'oLanguage': {
|
||||
'sUrl': '/plugin_assets/<%= :redmine_dmsf %>/javascripts/<%= url %>'
|
||||
'sUrl': "<%= plugin_asset_path(:redmine_dmsf, 'javascripts', json_url) %>"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
<%= stylesheet_link_tag 'plupload/jquery.ui.plupload.css', :plugin => 'redmine_dmsf' %>
|
||||
<%= javascript_include_tag 'plupload/js/plupload.full.min.js', :plugin => 'redmine_dmsf' %>
|
||||
<%= javascript_include_tag 'plupload/js/jquery.ui.plupload/jquery.ui.plupload.js', :plugin => 'redmine_dmsf' %>
|
||||
<%= javascript_include_tag("plupload/js/i18n/#{I18n.locale.to_s.downcase}.js", :plugin => 'redmine_dmsf') if I18n.locale && !I18n.locale.to_s.match(/^en.*/) %>
|
||||
<%= javascript_include_tag(js_url, :plugin => 'redmine_dmsf') %>
|
||||
|
||||
<script type="text/javascript">
|
||||
function initPlUploader(uploader) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user