Index: branches/5.2.x/core/admin_templates/js/grid_filters.js =================================================================== --- branches/5.2.x/core/admin_templates/js/grid_filters.js (revision 16551) +++ branches/5.2.x/core/admin_templates/js/grid_filters.js (revision 16552) @@ -1,153 +1,165 @@ /* Class used to convert element $select.hide(); // create div with checkboxes and buttons var $cur_index = MultiOptions.Selectors.length; var $div = $('
'); MultiOptions.Selectors.push($id); // set defaults for missing phrases if (!phrases['la_btn_SelectAll']) phrases['la_SelectAll'] = 'Select All'; if (!phrases['la_btn_OpenMultiFilter']) phrases['la_OpenMultiFilter'] = 'Open Filter'; if (!phrases['la_btn_Search']) phrases['la_ToolTip_Search'] = 'Search'; if (!phrases['la_btn_Close']) phrases['la_tooltip_close'] = 'Close'; // create div with checkboxes var $options_div = $('
'); // add "Select All" checkbox $options_div.append( '\
' ); var $options = $('option', $select); // add each \
' ); } ); // add buttons to search or close filter $div .append($options_div) .append( '
\  \ \
' ); $('#' + jq($form_name)).append($div); // set click handlers - $('#_mutlioptions_cb_' + $cur_index + '_all') - .click( - function ($e) { - MultiOptions.SelectAll($cur_index); - } - ) - .prop('checked', $options.length == $options.filter(':selected').length); + var $select_all = $('#_mutlioptions_cb_' + $cur_index + '_all'), + $new_checked = $options.length === $options.filter(':selected').length; + + $select_all.click(function ($e) { + MultiOptions.SelectAll($cur_index); + }); + + if ( $select_all.prop('checked') !== $new_checked ) { + $select_all.prop('checked', $new_checked).change(); + } $('input._mutlioptions_cb_' + $cur_index).click( function ($e) { MultiOptions.ItemChecked($cur_index); } ); // add filter placeholder, used for filter opening filter var $filter = $('
' + phrases['la_OpenMultiFilter'] + '
'); if ($select.hasClass('filter-active')) { $filter.addClass('filter-active'); } $filter .click( function($e) { var $offset = $(this).offset(); var $box_left = $offset.left; $('#' + jq($id) + '_div').css( {left: 0, top: $offset.top} ).show(); var $box_width = $('#' + jq($id) + '_div').outerWidth(); if ($box_left + $box_width > document.body.offsetWidth) { // move left $box_left -= $box_width; } $('#' + jq($id) + '_div').css('left', $box_left); } ) .insertAfter($select); } MultiOptions.CloseSelector = function(selector_index) { $('#' + jq(MultiOptions.Selectors[selector_index]) + '_div').hide(); } MultiOptions.ItemChecked = function(selector_index) { // sync hidden field var $reg_exp = new RegExp('^_mutlioptions_cb_' + selector_index + '_(?!all)([0-9A-Za-z-]+)'); update_checkbox_options($reg_exp, MultiOptions.Selectors[selector_index]); // update "Select All" checkbox var $select_all = $('#_mutlioptions_cb_' + selector_index + '_all'); var $options = $("input[type='checkbox']", '#' + jq(MultiOptions.Selectors[selector_index]) + '_div').not($select_all); + var $new_checked = $options.length === $options.filter(':checked').length; - $select_all.prop('checked', $options.length == $options.filter(':checked').length); + if ( $select_all.prop('checked') !== $new_checked ) { + $select_all.prop('checked', $new_checked).change(); + } } MultiOptions.SelectAll = function(selector_index) { // set all checkbox to match "Select All" checkbox var $select_all = $('#_mutlioptions_cb_' + selector_index + '_all'); var $checked = $select_all.prop('checked'); - $("input[type='checkbox']", '#' + jq(MultiOptions.Selectors[selector_index]) + '_div').not($select_all).prop('checked', $checked); + $("input[type='checkbox']", '#' + jq(MultiOptions.Selectors[selector_index]) + '_div').not($select_all).each(function () { + var $checkbox = $(this); + + if ( $checkbox.prop('checked') !== $checked ) { + $checkbox.prop('checked', $checked).change(); + } + }); // sync hidden field var $reg_exp = new RegExp('^_mutlioptions_cb_' + selector_index + '_(?!all)([0-9A-Za-z-]+)'); update_checkbox_options($reg_exp, MultiOptions.Selectors[selector_index]); } Index: branches/5.2.x/core/admin_templates/groups/groups_edit_permissions.tpl =================================================================== --- branches/5.2.x/core/admin_templates/groups/groups_edit_permissions.tpl (revision 16551) +++ branches/5.2.x/core/admin_templates/groups/groups_edit_permissions.tpl (revision 16552) @@ -1,140 +1,141 @@
[][]" name="[][]" value=""> [][]" name="_cb_[][]" checked onchange="update_checkbox(this, document.getElementById('[][]'));" onclick="">   "> " alt="" border="0"/> img/icons/icon24_.png" border="0" alt="" title="" align="absmiddle"/>
" alt="" border="0"/> [, ]
 
- \ No newline at end of file +