Project

General

Profile

Patch #642 ยป patch_add_select_all_to_issues_list.diff

Dov Murik, 2008-02-12 18:47

View differences:

app/views/issues/index.rhtml (working copy)
41 41
<p class="nodata"><%= l(:label_no_data) %></p>
42 42
<% else %>
43 43
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
44
<p><%= link_to_function 'Select all', 'select_all_checkboxes()', :class => 'check_all' -%>
45
<%= link_to_function 'Clear all', 'clear_all_checkboxes()', :class => 'check_all' -%></p>
44 46
<div class="contextual">
45 47
<%= l(:label_export_to) %>
46 48
<%= link_to 'CSV', {:format => 'csv'}, :class => 'icon icon-csv' %>,
......
63 65

  
64 66
<div id="context-menu" style="display: none;"></div>
65 67
<%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>
68
<script>
69
function select_all_checkboxes() {
70
  $$('tr.issue input[type=checkbox]').each(function(e) { e.checked = true; })
71
}
72

  
73
function clear_all_checkboxes() {
74
  $$('tr.issue input[type=checkbox]').each(function(e) { e.checked = false; })
75
}
76
</script>
    (1-1/1)