diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-admin/js/inline-edit-tax.js --- a/wp/wp-admin/js/inline-edit-tax.js Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-admin/js/inline-edit-tax.js Tue Jun 09 03:35:32 2015 +0200 @@ -1,4 +1,6 @@ +/* global inlineEditL10n, ajaxurl */ +var inlineEditTax; (function($) { inlineEditTax = { @@ -14,39 +16,57 @@ }); // prepare the edit row - row.keyup(function(e) { if(e.which == 27) return inlineEditTax.revert(); }); + row.keyup( function( e ) { + if ( e.which === 27 ) { + return inlineEditTax.revert(); + } + }); - $('a.cancel', row).click(function() { return inlineEditTax.revert(); }); - $('a.save', row).click(function() { return inlineEditTax.save(this); }); - $('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); }); + $( 'a.cancel', row ).click( function() { + return inlineEditTax.revert(); + }); + $( 'a.save', row ).click( function() { + return inlineEditTax.save(this); + }); + $( 'input, select', row ).keydown( function( e ) { + if ( e.which === 13 ) { + return inlineEditTax.save( this ); + } + }); - $('#posts-filter input[type="submit"]').mousedown(function(e){ + $( '#posts-filter input[type="submit"]' ).mousedown( function() { t.revert(); }); }, toggle : function(el) { var t = this; - $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el); + $(t.what+t.getId(el)).css('display') === 'none' ? t.revert() : t.edit(el); }, edit : function(id) { - var t = this, editRow; + var editRow, rowData, val, + t = this; t.revert(); - if ( typeof(id) == 'object' ) + if ( typeof(id) === 'object' ) { id = t.getId(id); + } editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); - if ( $(t.what+id).hasClass('alternate') ) - $(editRow).addClass('alternate'); + $(t.what+id).hide().after(editRow).after('