mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-27 02:41:15 +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)")
|
||||
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={})
|
||||
pcts = [pcts, pcts] unless pcts.is_a?(Array)
|
||||
pcts = pcts.collect(&:round)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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 class="projects-selection">
|
||||
<%= render_project_nested_lists(@projects) do |p| %>
|
||||
@ -12,11 +12,13 @@
|
||||
</fieldset>
|
||||
|
||||
<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| %>
|
||||
<label class="inline">
|
||||
<label>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %>
|
||||
<%=h role %>
|
||||
<%= role %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user