Fix for Rails 3.1+ (Redmine 2.x), which does not contain prototype.js library anymore
This commit is contained in:
parent
f0f61e859b
commit
41bf9af83c
@ -7,7 +7,7 @@
|
||||
<h2>
|
||||
<%= render(:partial => "/dmsf/path", :locals => {:path => path}) %>
|
||||
/
|
||||
<%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %>
|
||||
<%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %>
|
||||
<%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) if @file.notification %>
|
||||
</h2>
|
||||
|
||||
@ -17,21 +17,17 @@
|
||||
<p>
|
||||
<label for="target_project_id"><%=l(:label_target_project)%>:</label>
|
||||
<%= select_tag("target_project_id",
|
||||
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project),
|
||||
:onchange => remote_function(:url => { :action => 'new' },
|
||||
:method => :get,
|
||||
:update => 'content',
|
||||
:with => "Form.serialize('copyForm')")) %>
|
||||
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project)) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag("target_folder_id", l(:label_target_folder) + ":") %>
|
||||
<%= select_tag("target_folder_id",
|
||||
options_for_select(DmsfFolder.directory_tree(@target_project),
|
||||
<%= select_tag("target_folder_id",
|
||||
options_for_select(DmsfFolder.directory_tree(@target_project),
|
||||
:selected => (@target_folder.id unless @target_folder.nil?))) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%= submit_tag(l(:button_copy)) %>
|
||||
<% if User.current.allowed_to?(:file_manipulation, @project) %>
|
||||
<button type="button" id="move_button" title="<%=l(:button_move)%>"><%=l(:button_move)%></button>
|
||||
@ -44,6 +40,10 @@
|
||||
jQuery("#copyForm").attr("action", "<%= url_for(:action => 'move', :id => @file) %>");
|
||||
jQuery("#copyForm").submit();
|
||||
});
|
||||
|
||||
jQuery("#target_project_id").change(function () {
|
||||
jQuery("#content").load("<%= url_for(:action => 'new') %>", jQuery("#copyForm").serialize());
|
||||
});
|
||||
</script>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
|
||||
@ -11,24 +11,26 @@
|
||||
<p>
|
||||
<label for="target_project_id"><%=l(:label_target_project)%>:</label>
|
||||
<%= select_tag("target_project_id",
|
||||
project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project),
|
||||
:onchange => remote_function(:url => { :action => 'new' },
|
||||
:method => :get,
|
||||
:update => 'content',
|
||||
:with => "Form.serialize('copyForm')")) %>
|
||||
project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project)) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag("target_folder_id", l(:label_target_folder) + ":") %>
|
||||
<%= select_tag("target_folder_id",
|
||||
options_for_select(DmsfFolder.directory_tree(@target_project, @folder),
|
||||
<%= select_tag("target_folder_id",
|
||||
options_for_select(DmsfFolder.directory_tree(@target_project, @folder),
|
||||
:selected => (@target_folder.id unless @target_folder.nil?))) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<%= submit_tag(l(:button_copy)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery("#target_project_id").change(function () {
|
||||
jQuery("#content").load("<%= url_for(:action => 'new') %>", jQuery("#copyForm").serialize());
|
||||
});
|
||||
</script>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %>
|
||||
<%= javascript_include_tag "jquery-1.6.1.min.js", :plugin => "redmine_dmsf" %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user