mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-06 07:31:31 +00:00
Adds (un)check all buttons to select all projects (#11702).
git-svn-id: http://svn.redmine.org/redmine/trunk@13537 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
72115ec093
commit
ea2df369dc
@ -1119,6 +1119,12 @@ module ApplicationHelper
|
|||||||
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def toggle_checkboxes_link(selector)
|
||||||
|
link_to_function image_tag('toggle_check.png'),
|
||||||
|
"toggleCheckboxesBySelector('#{selector}')",
|
||||||
|
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}"
|
||||||
|
end
|
||||||
|
|
||||||
def progress_bar(pcts, options={})
|
def progress_bar(pcts, options={})
|
||||||
pcts = [pcts, pcts] unless pcts.is_a?(Array)
|
pcts = [pcts, pcts] unless pcts.is_a?(Array)
|
||||||
pcts = pcts.collect(&:round)
|
pcts = pcts.collect(&:round)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<fieldset class="box">
|
<fieldset class="box">
|
||||||
<legend><%= l(:label_project_plural) %></legend>
|
<legend><%= l(:label_project_plural) %> <%= toggle_checkboxes_link('.projects-selection input:enabled') %></legend>
|
||||||
<div style="max-height:300px; overflow:auto;">
|
<div style="max-height:300px; overflow:auto;">
|
||||||
<div class="projects-selection">
|
<div class="projects-selection">
|
||||||
<%= render_project_nested_lists(@projects) do |p| %>
|
<%= render_project_nested_lists(@projects) do |p| %>
|
||||||
@ -12,11 +12,13 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="box">
|
<fieldset class="box">
|
||||||
<legend><%= l(:label_role_plural) %></legend>
|
<legend><%= l(:label_role_plural) %> <%= toggle_checkboxes_link('.roles-selection input') %></legend>
|
||||||
|
<div class="roles-selection">
|
||||||
<% @roles.each do |role| %>
|
<% @roles.each do |role| %>
|
||||||
<label class="inline">
|
<label>
|
||||||
<%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %>
|
<%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %>
|
||||||
<%=h role %>
|
<%= role %>
|
||||||
</label>
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user