Make WordPress Core

Ticket #35833: 35833.2.diff

File 35833.2.diff, 6.1 KB (added by oglekler, 3 years ago)
  • src/js/_enqueues/admin/edit-comments.js

    diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js
    index e7a9282d4b..a4f90453ed 100644
    a b window.commentReply = { 
    11501150
    11511151                id = $(id);
    11521152                t.addEvents(id);
    1153                 bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('.widefat, .postbox').css('backgroundColor');
     1153                bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('table.wp-list-table, .postbox').css('backgroundColor');
    11541154
    11551155                id.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
    11561156                        .animate( { 'backgroundColor': bg }, 300, function() {
    $( function(){ 
    13111311                };
    13121312
    13131313                $.table_hotkeys(
    1314                         $('table.widefat'),
     1314                        $('table.wp-list-table'),
    13151315                        [
    13161316                                'a', 'u', 's', 'd', 'r', 'q', 'z',
    13171317                                ['e', edit_comment],
  • src/js/_enqueues/admin/inline-edit-post.js

    diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js
    index c26f2ddc79..75f027b8d6 100644
    a b window.wp = window.wp || {}; 
    4242        init : function(){
    4343                var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
    4444
    45                 t.type = $('table.widefat').hasClass('pages') ? 'page' : 'post';
     45                t.type = $('table.wp-list-table').hasClass('pages') ? 'page' : 'post';
    4646                // Post ID prefix.
    4747                t.what = '#post-';
    4848
    window.wp = window.wp || {}; 
    180180                var te = '', type = this.type, c = true;
    181181                this.revert();
    182182
    183                 $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
     183                $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', 'table.wp-list-table:first thead' ).length );
    184184
    185185                // Insert the editor at the top of the table with an empty row above to maintain zebra striping.
    186                 $('table.widefat tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>');
     186                $('table.wp-list-table tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>');
    187187                $('#bulk-edit').addClass('inline-editor').show();
    188188
    189189                /**
    window.wp = window.wp || {}; 
    228228                                $prev = $this.parent().prev().children( '.ntdelbutton' ),
    229229                                $next = $this.parent().next().children( '.ntdelbutton' );
    230230
    231                         $( 'table.widefat input[value="' + id + '"]' ).prop( 'checked', false );
     231                                $('table.wp-list-table input[value="' + id + '"]').prop('checked', false);
    232232                        $( '#_' + id ).parent().remove();
    233233                        wp.a11y.speak( wp.i18n.__( 'Item removed.' ), 'assertive' );
    234234
    window.wp = window.wp || {}; 
    292292
    293293                // Add the new edit row with an extra blank row underneath to maintain zebra striping.
    294294                editRow = $('#inline-edit').clone(true);
    295                 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
     295                $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', 'table.wp-list-table:first thead' ).length );
    296296
    297297                // Remove the ID from the copied row and let the `for` attribute reference the hidden ID.
    298298                $( 'td', editRow ).find('#quick-edit-legend').removeAttr('id');
    window.wp = window.wp || {}; 
    433433                        id = this.getId(id);
    434434                }
    435435
    436                 $( 'table.widefat .spinner' ).addClass( 'is-active' );
     436                $( 'table.wp-list-table .spinner' ).addClass( 'is-active' );
    437437
    438438                params = {
    439439                        action: 'inline-save',
    window.wp = window.wp || {}; 
    452452                                var $errorNotice = $( '#edit-' + id + ' .inline-edit-save .notice-error' ),
    453453                                        $error = $errorNotice.find( '.error' );
    454454
    455                                 $( 'table.widefat .spinner' ).removeClass( 'is-active' );
     455                                $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' );
    456456
    457457                                if (r) {
    458458                                        if ( -1 !== r.indexOf( '<tr' ) ) {
    window.wp = window.wp || {}; 
    493493         * @return {boolean} Always returns false.
    494494         */
    495495        revert : function(){
    496                 var $tableWideFat = $( '.widefat' ),
     496                var $tableWideFat = $( 'table.wp-list-table' ),
    497497                        id = $( '.inline-editor', $tableWideFat ).attr( 'id' );
    498498
    499499                if ( id ) {
  • src/js/_enqueues/admin/inline-edit-tax.js

    diff --git a/src/js/_enqueues/admin/inline-edit-tax.js b/src/js/_enqueues/admin/inline-edit-tax.js
    index 86e3498cd1..a46e993520 100644
    a b window.inlineEditTax = { 
    128128                }
    129129
    130130                editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
    131                 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length );
     131                $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table:first thead' ).length );
    132132
    133133                $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');
    134134
    window.inlineEditTax = { 
    172172                        id = this.getId(id);
    173173                }
    174174
    175                 $( 'table.widefat .spinner' ).addClass( 'is-active' );
     175                $( 'table.wp-list-table .spinner' ).addClass( 'is-active' );
    176176
    177177                params = {
    178178                        action: 'inline-save-tax',
    window.inlineEditTax = { 
    199199                                        $errorNotice = $( '#edit-' + id + ' .inline-edit-save .notice-error' ),
    200200                                        $error = $errorNotice.find( '.error' );
    201201
    202                                 $( 'table.widefat .spinner' ).removeClass( 'is-active' );
     202                                        $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' );
    203203
    204204                                if (r) {
    205205                                        if ( -1 !== r.indexOf( '<tr' ) ) {
    window.inlineEditTax = { 
    258258         * @return {void}
    259259         */
    260260        revert : function() {
    261                 var id = $('table.widefat tr.inline-editor').attr('id');
     261                var id = $('table.wp-list-table tr.inline-editor').attr('id');
    262262
    263263                if ( id ) {
    264                         $( 'table.widefat .spinner' ).removeClass( 'is-active' );
     264                        $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' );
    265265                        $('#'+id).siblings('tr.hidden').addBack().remove();
    266266                        id = id.substr( id.lastIndexOf('-') + 1 );
    267267
  • src/js/_enqueues/admin/post.js

    diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js
    index c9b002a65a..5775f8c903 100644
    a b window.wp = window.wp || {}; 
    6161                                data,
    6262                                function(r) {
    6363                                        r = wpAjax.parseAjaxResponse(r);
    64                                         $('#commentsdiv .widefat').show();
     64                                        $('#commentsdiv table.comments-box').show();
    6565                                        $( '#commentsdiv .spinner' ).removeClass( 'is-active' );
    6666
    6767                                        if ( 'object' == typeof r && r.responses[0] ) {