From 0b5117da6a8070b50caf69f8d2ff6884ef7a0cda Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 7 Nov 2011 17:43:04 +0000 Subject: [PATCH] Allow tags autosuggest to work in quick edit when there are no tags. props solarissmoke, see #19176. git-svn-id: https://develop.svn.wordpress.org/trunk@19204 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/inline-edit-post.dev.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/wp-admin/js/inline-edit-post.dev.js b/wp-admin/js/inline-edit-post.dev.js index 20d1f3b756..19e98a0b10 100644 --- a/wp-admin/js/inline-edit-post.dev.js +++ b/wp-admin/js/inline-edit-post.dev.js @@ -179,18 +179,19 @@ inlineEditPost = { $('ul.'+taxname+'-checklist :checkbox', editRow).val(term_ids.split(',')); } }); + //flat taxonomies $('.tags_input', rowData).each(function(){ - var terms = $(this).text(); + var terms = $(this).text(), + taxname = $(this).attr('id').replace('_' + id, ''), + textarea = $('textarea.tax_input_' + taxname, editRow); - if ( terms ) { - taxname = $(this).attr('id').replace('_'+id, ''); - $('textarea.tax_input_'+taxname, editRow).val(terms); - $('textarea.tax_input_'+taxname, editRow).suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); - } + if ( terms ) + textarea.val(terms); + + textarea.suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); }); - // handle the post status status = $('._status', rowData).text(); if ( 'future' != status )