| 1 | Index: wp-admin/js/common.dev.js |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/js/common.dev.js (revision 20966) |
|---|
| 4 | +++ wp-admin/js/common.dev.js (working copy) |
|---|
| 5 | @@ -306,6 +306,26 @@ |
|---|
| 6 | }); |
|---|
| 7 | }); |
|---|
| 8 | |
|---|
| 9 | + // toggle "all" checkboxes when checking a checkbox in a table list |
|---|
| 10 | + $('tbody .check-column :checkbox').click( function() { |
|---|
| 11 | + |
|---|
| 12 | + var $current_checkbox = $(this); |
|---|
| 13 | + var $current_table = $current_checkbox.closest('table'); |
|---|
| 14 | + var $check_all_checkboxes = $current_table.find('thead .check-column :checkbox, tfoot .check-column :checkbox'); |
|---|
| 15 | + var $all_child_checkboxes = $current_table.find('tbody .check-column :checkbox'); |
|---|
| 16 | + |
|---|
| 17 | + $check_all_checkboxes.prop('checked', function() { |
|---|
| 18 | + |
|---|
| 19 | + if ( !$current_checkbox.prop('checked') || $all_child_checkboxes.not(':checked').length > 0 ) { |
|---|
| 20 | + return false; |
|---|
| 21 | + } else { |
|---|
| 22 | + return true; |
|---|
| 23 | + } |
|---|
| 24 | + |
|---|
| 25 | + }); |
|---|
| 26 | + |
|---|
| 27 | + }); |
|---|
| 28 | + |
|---|
| 29 | $('#default-password-nag-no').click( function() { |
|---|
| 30 | setUserSetting('default_password_nag', 'hide'); |
|---|
| 31 | $('div.default-password-nag').hide(); |
|---|