mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Fix tags suggest for post quick edit and bulk edit
git-svn-id: http://svn.automattic.com/wordpress/trunk@10402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6dd933b120
commit
f254dfbbf3
@ -84,7 +84,7 @@ inlineEditPost = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setBulk : function() {
|
setBulk : function() {
|
||||||
var te = '', type = this.type;
|
var te = '', type = this.type, tax;
|
||||||
this.revert();
|
this.revert();
|
||||||
|
|
||||||
$('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
|
$('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
|
||||||
@ -108,12 +108,15 @@ inlineEditPost = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// enable autocomplete for tags
|
// enable autocomplete for tags
|
||||||
if ( type == 'post' )
|
if ( type == 'post' ) {
|
||||||
$('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
|
// support multi taxonomies?
|
||||||
|
tax = 'post_tag';
|
||||||
|
$('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
edit : function(id) {
|
edit : function(id) {
|
||||||
var t = this, fields, editRow, rowData, cats, status, pageOpt, f, pageLevel, nextPage, pageLoop = true, nextLevel;
|
var t = this, fields, editRow, rowData, cats, status, pageOpt, f, pageLevel, nextPage, pageLoop = true, nextLevel, tax;
|
||||||
t.revert();
|
t.revert();
|
||||||
|
|
||||||
if ( typeof(id) == 'object' )
|
if ( typeof(id) == 'object' )
|
||||||
@ -179,8 +182,10 @@ inlineEditPost = {
|
|||||||
$('.ptitle', editRow).focus();
|
$('.ptitle', editRow).focus();
|
||||||
|
|
||||||
// enable autocomplete for tags
|
// enable autocomplete for tags
|
||||||
if ( t.type == 'post' )
|
if ( t.type == 'post' ) {
|
||||||
$('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
|
tax = 'post_tag';
|
||||||
|
$('tr.inline-editor textarea[name="tags_input"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
File diff suppressed because one or more lines are too long
@ -343,7 +343,7 @@ function wp_default_scripts( &$scripts ) {
|
|||||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090114' );
|
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090114' );
|
||||||
$scripts->add_data( 'theme-preview', 'group', 1 );
|
$scripts->add_data( 'theme-preview', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery-form', 'suggest' ), '20090102' );
|
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery-form', 'suggest' ), '20090122' );
|
||||||
$scripts->add_data( 'inline-edit-post', 'group', 1 );
|
$scripts->add_data( 'inline-edit-post', 'group', 1 );
|
||||||
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||||
'error' => __('Error while saving the changes.'),
|
'error' => __('Error while saving the changes.'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user