Fixed: Check All / Uncheck All in Email Settings doesn't work (#1180).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1429 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
835cc7ed7c
commit
4c6b9d9ce5
|
@ -9,13 +9,13 @@
|
|||
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
|
||||
</div>
|
||||
|
||||
<fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
|
||||
<fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend>
|
||||
<% @notifiables.each do |notifiable| %>
|
||||
<label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
|
||||
<%= l_or_humanize(notifiable) %></label><br />
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'settings[notified_events][]', '' %>
|
||||
<p><%= check_all_links('mail-options-form') %></p>
|
||||
<p><%= check_all_links('notified_events') %></p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
Copyright (C) 2006-2008 Jean-Philippe Lang */
|
||||
|
||||
function checkAll (id, checked) {
|
||||
var el = document.getElementById(id);
|
||||
for (var i = 0; i < el.elements.length; i++) {
|
||||
if (el.elements[i].disabled==false) {
|
||||
el.elements[i].checked = checked;
|
||||
var els = Element.descendants(id);
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
if (els[i].disabled==false) {
|
||||
els[i].checked = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue