From 74394454628860535d73a8d0a9a6e6f47f192ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Mon, 16 Sep 2013 21:11:09 +0000 Subject: [PATCH] Make sure quick edited non-alternate taxonomy list table rows don't become alternate. props c3mdigital. fixes #25059. Built from https://develop.svn.wordpress.org/trunk@25463 git-svn-id: http://core.svn.wordpress.org/trunk@25384 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/inline-edit-tax.js | 3 +++ wp-admin/js/inline-edit-tax.min.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/js/inline-edit-tax.js b/wp-admin/js/inline-edit-tax.js index 6d5293ac3c..609c0d7c9b 100644 --- a/wp-admin/js/inline-edit-tax.js +++ b/wp-admin/js/inline-edit-tax.js @@ -90,6 +90,9 @@ inlineEditTax = { $('#edit-'+id+' .inline-edit-save .error').html(r).show(); } else $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show(); + + if ($(row).prev('tr').hasClass('alternate')) + $(row).removeClass('alternate'); } ); return false; diff --git a/wp-admin/js/inline-edit-tax.min.js b/wp-admin/js/inline-edit-tax.min.js index bbcf30abc4..26cd550966 100644 --- a/wp-admin/js/inline-edit-tax.min.js +++ b/wp-admin/js/inline-edit-tax.min.js @@ -1 +1 @@ -!function(a){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27==a.which?inlineEditTax.revert():void 0}),a("a.cancel",c).click(function(){return inlineEditTax.revert()}),a("a.save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13==a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"==a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d=this;return d.revert(),"object"==typeof b&&(b=d.getId(b)),c=a("#inline-edit").clone(!0),rowData=a("#inline_"+b),a("td",c).attr("colspan",a(".widefat:first thead th:visible").length),a(d.what+b).hasClass("alternate")&&a(c).addClass("alternate"),a(d.what+b).hide().after(c),a(':input[name="name"]',c).val(a(".name",rowData).text()),a(':input[name="slug"]',c).val(a(".slug",rowData).text()),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(b){var c,d,e=a('input[name="taxonomy"]').val()||"";return"object"==typeof b&&(b=this.getId(b)),a("table.widefat .spinner").show(),c={action:"inline-save-tax",tax_type:this.type,tax_ID:b,taxonomy:e},d=a("#edit-"+b+" :input").serialize(),c=d+"&"+a.param(c),a.post(ajaxurl,c,function(c){var d,e;a("table.widefat .spinner").hide(),c?-1!=c.indexOf("