Ticket #35833: 35833.diff
File 35833.diff, 4.3 KB (added by , 8 years ago) |
---|
-
src/wp-admin/js/inline-edit-post.js
8 8 init : function(){ 9 9 var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit'); 10 10 11 t.type = $('table.w idefat').hasClass('pages') ? 'page' : 'post';11 t.type = $('table.wp-list-table').hasClass('pages') ? 'page' : 'post'; 12 12 t.what = '#post-'; 13 13 14 14 // prepare the edit rows … … 86 86 var te = '', type = this.type, tax, c = true; 87 87 this.revert(); 88 88 89 $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', ' .widefat:first thead' ).length );89 $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', 'table.wp-list-table:first thead' ).length ); 90 90 // Insert the editor at the top of the table with an empty row above to maintain zebra striping. 91 $('table.w idefattbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>');91 $('table.wp-list-table tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>'); 92 92 $('#bulk-edit').addClass('inline-editor').show(); 93 93 94 94 $( 'tbody th.check-column input[type="checkbox"]' ).each( function() { … … 108 108 $('#bulk-titles a').click(function(){ 109 109 var id = $(this).attr('id').substr(1); 110 110 111 $('table.w idefatinput[value="' + id + '"]').prop('checked', false);111 $('table.wp-list-table input[value="' + id + '"]').prop('checked', false); 112 112 $('#ttle'+id).remove(); 113 113 }); 114 114 … … 136 136 137 137 // add the new edit row with an extra blank row underneath to maintain zebra striping. 138 138 editRow = $('#inline-edit').clone(true); 139 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', ' .widefat:first thead' ).length );139 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', 'table.wp-list-table:first thead' ).length ); 140 140 141 141 $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>'); 142 142 … … 248 248 id = this.getId(id); 249 249 } 250 250 251 $( 'table.w idefat.spinner' ).addClass( 'is-active' );251 $( 'table.wp-list-table .spinner' ).addClass( 'is-active' ); 252 252 253 253 params = { 254 254 action: 'inline-save', … … 266 266 function(r) { 267 267 var $errorSpan = $( '#edit-' + id + ' .inline-edit-save .error' ); 268 268 269 $( 'table.w idefat.spinner' ).removeClass( 'is-active' );269 $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' ); 270 270 $( '.ac_results' ).hide(); 271 271 272 272 if (r) { … … 295 295 296 296 // Revert is for both Quick Edit and Bulk Edit. 297 297 revert : function(){ 298 var $tableWideFat = $( ' .widefat' ),298 var $tableWideFat = $( 'table.wp-list-table' ), 299 299 id = $( '.inline-editor', $tableWideFat ).attr( 'id' ); 300 300 301 301 if ( id ) { -
src/wp-admin/js/inline-edit-tax.js
55 55 } 56 56 57 57 editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); 58 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', ' .widefat:first thead' ).length );58 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', 'table.wp-list-table:first thead' ).length ); 59 59 60 60 $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>'); 61 61 … … 82 82 id = this.getId(id); 83 83 } 84 84 85 $( 'table.w idefat.spinner' ).addClass( 'is-active' );85 $( 'table.wp-list-table .spinner' ).addClass( 'is-active' ); 86 86 87 87 params = { 88 88 action: 'inline-save-tax', … … 100 100 var row, new_id, option_value, 101 101 $errorSpan = $( '#edit-' + id + ' .inline-edit-save .error' ); 102 102 103 $( 'table.w idefat.spinner' ).removeClass( 'is-active' );103 $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' ); 104 104 105 105 if (r) { 106 106 if ( -1 !== r.indexOf( '<tr' ) ) { … … 142 142 }, 143 143 144 144 revert : function() { 145 var id = $('table.w idefattr.inline-editor').attr('id');145 var id = $('table.wp-list-table tr.inline-editor').attr('id'); 146 146 147 147 if ( id ) { 148 $( 'table.w idefat.spinner' ).removeClass( 'is-active' );148 $( 'table.wp-list-table .spinner' ).removeClass( 'is-active' ); 149 149 $('#'+id).siblings('tr.hidden').addBack().remove(); 150 150 id = id.substr( id.lastIndexOf('-') + 1 ); 151 151 // Show the taxonomy row and move focus back to the Quick Edit link.