Make WordPress Core


Ignore:
Timestamp:
11/23/2010 08:20:44 PM (15 years ago)
Author:
scribu
Message:

Make filter_count() a closure. See #14936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/theme.dev.js

    r16553 r16554  
    33(function($){
    44    ThemeViewer = function( args ) {
    5 
    6         function filter_count() {
    7             var count = $( '#filter-box :checked' ).length;
    8             var text  = $( '#filter-click' ).text();
    9 
    10             if ( text.indexOf( '(' ) != -1 )
    11                 text = text.substr( 0, text.indexOf( '(' ) );
    12 
    13             if ( count == 0 )
    14                 $( '#filter-click' ).text( text );
    15             else
    16                 $( '#filter-click' ).text( text + ' (' + count + ')' );
    17         }
    185
    196        function init() {
     
    2613
    2714            $( '#filter-box :checkbox' ).unbind( 'click' ).click( function() {
    28                 filter_count();
     15                var count = $( '#filter-box :checked' ).length,
     16                    text  = $( '#filter-click' ).text();
     17
     18                if ( text.indexOf( '(' ) != -1 )
     19                    text = text.substr( 0, text.indexOf( '(' ) );
     20
     21                if ( count == 0 )
     22                    $( '#filter-click' ).text( text );
     23                else
     24                    $( '#filter-click' ).text( text + ' (' + count + ')' );
    2925            });
    3026
Note: See TracChangeset for help on using the changeset viewer.