Make WordPress Core

Changeset 9726


Ignore:
Timestamp:
11/15/2008 09:58:51 PM (18 years ago)
Author:
azaozz
Message:

Show a space as thousands separator for comments count when setting from js, hide ajax throbber when QE returns an error, see#8227 fixes #8225

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/edit-comments.js

    r9724 r9726  
    1818                        n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
    1919                        if ( n < 0 ) { n = 0; }
    20                         a.html( n.toString() );
    2120                        $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
     21                        n = n.toString();
     22                        if ( n.length > 3 )
     23                                n = n.substr(0, n.length-3)+' '+n.substr(-3);
     24                        a.html(n);
    2225                });
    2326        };
    … …  
    3538                        }
    3639                        if ( n < 0 ) { n = 0; }
    37                         a.html( n.toString() );
    3840                        $('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
     41                        n = n.toString();
     42                        if ( n.length > 3 )
     43                                n = n.substr(0, n.length-3)+' '+n.substr(-3);
     44                        a.html(n);
    3945                });
    4046
    … …  
    5056                        }
    5157                        if ( n < 0 ) { n = 0; }
    52                         a.html( n.toString() );
     58                        n = n.toString();
     59                        if ( n.length > 3 )
     60                                n = n.substr(0, n.length-3)+' '+n.substr(-3);
     61                        a.html(n);
    5362                });
    5463
  • trunk/wp-admin/js/inline-edit-post.js

    r9712 r9726  
    1212                t.rows = $('tr.iedit');
    1313
    14                 // prepare the edit row
    15 //              .dblclick(function() { inlineEditPost.toggle(this); })
     14                // prepare the edit rows
    1615                qeRow.keyup(function(e) { if(e.which == 27) return inlineEditPost.revert(); });
    17 
    18 //              .dblclick(function() { inlineEditPost.revert(); })
    1916                bulkRow.keyup(function(e) { if (e.which == 27) return inlineEditPost.revert(); });
    2017
    … …  
    2623
    2724                // add events
    28 //              t.rows.dblclick(function() { inlineEditPost.toggle(this); });
    2925                t.addEvents(t.rows);
    3026
    … …  
    5248                $('select[name="_status"] option[value="future"]', bulkRow).remove();
    5349
    54                 $('#doaction').click(function(e){
    55                         if ( $('select[name="action"]').val() == 'edit' ) {
    56                                 e.preventDefault();
    57                                 t.setBulk();
    58                         } else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
    59                                 t.revert();
    60                         }
    61                 });
    62 
    63                 $('#doaction2').click(function(e){
    64                         if ( $('select[name="action2"]').val() == 'edit' ) {
     50                $('#doaction, #doaction2').click(function(e){
     51                        var n = $(this).attr('id').substr(2);
     52                        if ( $('select[name="'+n+'"]').val() == 'edit' ) {
    6553                                e.preventDefault();
    6654                                t.setBulk();
    … …  
    206194                        function(r) {
    207195                                var row = $(inlineEditPost.what+id);
     196                                $('table.widefat .inline-edit-save .waiting').hide();
    208197
    209198                                if (r) {
  • trunk/wp-admin/js/inline-edit-tax.js

    r9712 r9726  
    106106                        function(r) {
    107107                                var row = $(inlineEditTax.what+id);
     108                                $('table.widefat .inline-edit-save .waiting').hide();
    108109
    109110                                if (r) {
  • trunk/wp-includes/script-loader.php

    r9722 r9726  
    128128                        'dismiss' => __('Dismiss'),
    129129                        'crunching' => __('Crunching&hellip;'),
    130                         'deleted' => __('Deleted'),
     130                        'deleted' => __('Deleted')
    131131        ) );
    132132
    … …  
    157157                        'strong' => __('Strong')
    158158                ) );
    159                 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081115' );
     159                $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081115b' );
    160160                $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
    161                         'pending' => __('%i% pending'), // must look like: "# blah blah"
    162161                        'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
    163                         'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),
     162                        'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last'])
    164163                ) );
    165164                $scripts->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20080925' );
    … …  
    167166                $scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20081109' );
    168167                $scripts->localize( 'postbox', 'postboxL10n', array(
    169                         'requestFile' => admin_url('admin-ajax.php'),
     168                        'requestFile' => admin_url('admin-ajax.php')
    170169                ) );
    171170                $scripts->add( 'slug', '/wp-admin/js/slug.js', array('jquery'), '20080208' );
    … …  
    173172                        'requestFile' => admin_url('admin-ajax.php'),
    174173                        'save' => __('Save'),
    175                         'cancel' => __('Cancel'),
     174                        'cancel' => __('Cancel')
    176175                ) );
    177176                $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20081112b' );
    … …  
    252251                $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
    253252
    254                 $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081115' );
     253                $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081115b' );
    255254                $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
    256255                        'error' => __('Error while saving the changes.')
    257256                ) );
    258257
    259                 $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081110' );
     258                $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081115' );
    260259                $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
    261260                        'error' => __('Error while saving the changes.')
Note: See TracChangeset for help on using the changeset viewer.