Ticket #19176: 19176v2.diff

File 19176v2.diff, 944 bytes (added by scottbasgaard, 18 months ago)

Sorry for the filename typo in my first patch. Here's round 2 with support for post_tags and all other non heirarchy taxs.

Line 
1Index: wp-admin/js/inline-edit-post.dev.js
2===================================================================
3--- wp-admin/js/inline-edit-post.dev.js (revision 19471)
4+++ wp-admin/js/inline-edit-post.dev.js (working copy)
5@@ -115,10 +115,12 @@
6 
7                // enable autocomplete for tags
8                if ( 'post' == type ) {
9-                       // support multi taxonomies?
10-                       tax = 'post_tag';
11-                       $('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
12+                       $('#bulk-edit textarea[name^="tax_input"]').each(function() {
13+                               var tax = $(this).attr('name').replace(/(^.*\[|\].*$)/g, '');
14+                               $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
15+                       });
16                }
17+               
18                $('html, body').animate( { scrollTop: 0 }, 'fast' );
19        },
20