}
});
- $('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){
}
});
- $('a.cancel', bulkRow).click(function(){
+ $( '.cancel', bulkRow ).click( function() {
return inlineEditPost.revert();
});
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();
},
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' ) {
// 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);
$('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