]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/inline-edit-post.js
WordPress 4.3
[autoinstalls/wordpress.git] / wp-admin / js / inline-edit-post.js
index a1a9c028ab909aac137b4a84551ca430557dc9da..02f5c76ea2f8f4d1e1c8179f861c181e97d8ecbc 100644 (file)
@@ -22,10 +22,10 @@ inlineEditPost = {
                        }
                });
 
-               $('a.cancel', qeRow).click(function(){
+               $( '.cancel', qeRow ).click( function() {
                        return inlineEditPost.revert();
                });
-               $('a.save', qeRow).click(function(){
+               $( '.save', qeRow ).click( function() {
                        return inlineEditPost.save(this);
                });
                $('td', qeRow).keydown(function(e){
@@ -34,7 +34,7 @@ inlineEditPost = {
                        }
                });
 
-               $('a.cancel', bulkRow).click(function(){
+               $( '.cancel', bulkRow ).click( function() {
                        return inlineEditPost.revert();
                });
 
@@ -81,7 +81,7 @@ inlineEditPost = {
                var te = '', type = this.type, tax, c = true;
                this.revert();
 
-               $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
+               $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
                // Insert the editor at the top of the table with an empty row above to maintain zebra striping.
                $('table.widefat tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>');
                $('#bulk-edit').addClass('inline-editor').show();
@@ -117,7 +117,7 @@ inlineEditPost = {
        },
 
        edit : function(id) {
-               var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val;
+               var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val, pw;
                t.revert();
 
                if ( typeof(id) === 'object' ) {
@@ -131,9 +131,9 @@ inlineEditPost = {
 
                // add the new edit row with an extra blank row underneath to maintain zebra striping.
                editRow = $('#inline-edit').clone(true);
-               $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
+               $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
 
-               $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');
+               $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>');
 
                // populate the data
                rowData = $('#inline_'+id);
@@ -209,9 +209,10 @@ inlineEditPost = {
                        $('select[name="_status"] option[value="future"]', editRow).remove();
                }
 
+               pw = $( '.inline-edit-password-input' ).prop( 'disabled', false );
                if ( 'private' === status ) {
                        $('input[name="keep_private"]', editRow).prop('checked', true);
-                       $('input.inline-edit-password-input').val('').prop('disabled', true);
+                       pw.val( '' ).prop( 'disabled', true );
                }
 
                // remove the current page and children from the parent dropdown