diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 8444f078..f1e96e49 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -93,4 +93,8 @@

<%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %>

<% end %> -<%= wikitoolbar_for 'dmsf_folder_description' %> \ No newline at end of file +<%= wikitoolbar_for 'dmsf_folder_description' %> + + \ No newline at end of file diff --git a/app/views/dmsf_files_copy/new.html.erb b/app/views/dmsf_files_copy/new.html.erb index a6252801..dd1b3270 100644 --- a/app/views/dmsf_files_copy/new.html.erb +++ b/app/views/dmsf_files_copy/new.html.erb @@ -22,10 +22,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> - -<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %> -<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %> - <% html_title(l(:dmsf)) %> <%= render(:partial => '/dmsf/path', @@ -58,16 +54,15 @@ <% end %> \ No newline at end of file diff --git a/app/views/dmsf_folders_copy/new.html.erb b/app/views/dmsf_folders_copy/new.html.erb index d3c7beca..57e6f3f9 100644 --- a/app/views/dmsf_folders_copy/new.html.erb +++ b/app/views/dmsf_folders_copy/new.html.erb @@ -22,10 +22,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> - -<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %> -<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %> - <% html_title(l(:dmsf)) %> <%= render(:partial => '/dmsf/path', @@ -51,11 +47,10 @@ <% end %> \ No newline at end of file diff --git a/app/views/dmsf_links/_form.html.erb b/app/views/dmsf_links/_form.html.erb index cf661626..d59727ad 100644 --- a/app/views/dmsf_links/_form.html.erb +++ b/app/views/dmsf_links/_form.html.erb @@ -80,13 +80,12 @@

- <%= f.text_field :name, - :maxlength => 255, :required => true, :label => l(:label_link_name) %> + <%= f.text_field :name, :required => true, :label => l(:label_link_name) %>

<%= f.submit l(:button_create) %>

@@ -96,14 +95,21 @@ $('#dmsf_link_target_project_id').change(function () { $('#content').load("<%= url_for(:action => 'new', :project_id => @project.id, :reload => true) %>", $('#new_dmsf_link').serialize()); }); + $('#dmsf_link_target_folder_id').change(function () { $('#content').load("<%= url_for(:action => 'new', :project_id => @project.id) %>", $('#new_dmsf_link').serialize()); }); + $('#dmsf_link_target_file_id').change(function () { $('#content').load("<%= url_for(:action => 'new', :project_id => @project.id) %>", $('#new_dmsf_link').serialize()); }); + $("input[name=external_link]:radio").change(function(){ $("#link_internal").toggle(); $("#link_external").toggle(); }); - + + $('#dmsf_link_target_project_id').select2(); + $('#dmsf_link_target_folder_id').select2(); + $('#dmsf_link_target_file_id').select2(); + \ No newline at end of file diff --git a/app/views/dmsf_links/new.html.erb b/app/views/dmsf_links/new.html.erb index 011e1b52..82146124 100644 --- a/app/views/dmsf_links/new.html.erb +++ b/app/views/dmsf_links/new.html.erb @@ -1,6 +1,9 @@ -<%# Redmine plugin for Document Management System "Features" +<% +# encoding: utf-8 # -# Copyright (C) 2014 Karel Pičman +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,6 +17,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> <%= render 'form' %> \ No newline at end of file diff --git a/app/views/dmsf_workflows/new.html.erb b/app/views/dmsf_workflows/new.html.erb index 8e170668..2c7b1cf8 100644 --- a/app/views/dmsf_workflows/new.html.erb +++ b/app/views/dmsf_workflows/new.html.erb @@ -47,4 +47,6 @@ $('#dmsf_workflow_id').change(function () { $('#content').load("<%= url_for(:action => 'new', :project_id => @project) %>", $('#new_dmsf_workflow').serialize()); }); + + $('#dmsf_workflow_id').select2(); \ No newline at end of file diff --git a/lib/redmine_dmsf/hooks/base_view_hooks.rb b/lib/redmine_dmsf/hooks/base_view_hooks.rb index 130972c2..384375d3 100644 --- a/lib/redmine_dmsf/hooks/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/base_view_hooks.rb @@ -1,6 +1,8 @@ +# encoding: utf-8 +# # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2013 Karel Pičman +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -23,9 +25,11 @@ module RedmineDmsf class DmsfViewListener < Redmine::Hook::ViewListener def view_layouts_base_html_head(context={}) - "\n".html_safe + stylesheet_link_tag('dmsf', :plugin => :redmine_dmsf) + "\n".html_safe + stylesheet_link_tag('dmsf', :plugin => :redmine_dmsf) + + "\n".html_safe + stylesheet_link_tag('select2.min.css', :plugin => :redmine_dmsf) + + "\n".html_safe + javascript_include_tag('select2.min.js', :plugin => :redmine_dmsf) end end end -end +end \ No newline at end of file