Make WordPress Core

Changeset 19204


Ignore:
Timestamp:
11/07/2011 05:43:04 PM (15 years ago)
Author:
nacin
Message:

Allow tags autosuggest to work in quick edit when there are no tags. props solarissmoke, see #19176.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/inline-edit-post.dev.js

    r19011 r19204  
    180180                        }
    181181                });
     182
    182183                //flat taxonomies
    183184                $('.tags_input', rowData).each(function(){
    184                         var terms = $(this).text();
    185 
    186                         if ( terms ) {
    187                                 taxname = $(this).attr('id').replace('_'+id, '');
    188                                 $('textarea.tax_input_'+taxname, editRow).val(terms);
    189                                 $('textarea.tax_input_'+taxname, editRow).suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
    190                         }
    191                 });
    192 
     185                        var terms = $(this).text(),
     186                                taxname = $(this).attr('id').replace('_' + id, ''),
     187                                textarea = $('textarea.tax_input_' + taxname, editRow);
     188
     189                        if ( terms )
     190                                textarea.val(terms);
     191
     192                        textarea.suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
     193                });
    193194
    194195                // handle the post status
Note: See TracChangeset for help on using the changeset viewer.