1( function( $ ) { 2 $( document ).ready( function() { 3 $('#main>.cstmsrch-submit-type').detach().prependTo('#content'); 4 $( '#cstmsrch_div_select_all' ).show( 0, function() { 5 var select_all = $( '.cstmsrch-form-table input#cstmsrch_select_all' ), 6 checkboxes = $( '.cstmsrch-form-table input[name="cstmsrch_fields_array[]"]:enabled' ), 7 checkboxes_total = checkboxes.size(), 8 checkboxes_selected = checkboxes.filter(':checked').size(); 9 if ( checkboxes_total == checkboxes_selected ) { 10 select_all.prop( 'checked', true ); 11 } 12 }); 13 $( '.cstmsrch-form-table input' ).bind( 'change click select', function() { 14 var select_all = $( '.cstmsrch-form-table input#cstmsrch_select_all' ), 15 checkboxes = $( '.cstmsrch-form-table input[name="cstmsrch_fields_array[]"]:enabled' ), 16 checkboxes_size = checkboxes.size(), 17 checkboxes_selected_size = checkboxes.filter( ':checked' ).size(); 18 if ( $( this ).attr( 'id' ) == select_all.attr( 'id' ) ) { 19 if ( select_all.is( ':checked' ) ) { 20 checkboxes.prop( 'checked', true ); 21 } else { 22 checkboxes.prop( 'checked', false ); 23 } 24 } else { 25 if ( checkboxes_size == checkboxes_selected_size ) { 26 select_all.prop( 'checked', true ); 27 } else { 28 select_all.prop( 'checked', false ); 29 } 30 } 31 } ); 32 } ); 33} )( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.