}
function tag_update_quickclicks() {
+ if ( jQuery( '#tags-input' ).length == 0 )
+ return;
var current_tags = jQuery( '#tags-input' ).val().split(',');
jQuery( '#tagchecklist' ).empty();
shown = false;
jQuery('#title').blur( function() { if ( (jQuery("#post_ID").val() > 0) || (jQuery("#title").val().length == 0) ) return; autosave(); } );
// auto-suggest stuff
- jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2 } );
+ jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } );
jQuery('#newtag').keypress( tag_press_key );
// category tabs
jQuery('#in-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );
noSyncChecks = false;
};
+ var popularCats = jQuery('#categorychecklist-pop :checkbox').map( function() { return parseInt(jQuery(this).val(), 10); } ).get().join(',');
var catAddBefore = function( s ) {
- s.data += '&' + jQuery( '#categorychecklist :checked' ).serialize();
+ s.data += '&popular_ids=' + popularCats + '&' + jQuery( '#categorychecklist :checked' ).serialize();
return s;
};
var catAddAfter = function( r, s ) {
} );
jQuery('#category-add-toggle').click( function() {
jQuery(this).parents('div:first').toggleClass( 'wp-hidden-children' );
- categoryTabs.tabsClick( 1 );
+ // categoryTabs.tabs( 'select', '#categories-all' ); // this is broken (in the UI beta?)
+ categoryTabs.find( 'a[href="#categories-all"]' ).click();
jQuery('#newcat').focus();
return false;
} );
if ( jQuery.isFunction( autosave_update_post_ID ) ) {
autosave_update_post_ID(s.parsed.responses[0].supplemental.postid);
}
- } });
+ }, addBefore: function( s ) {
+ s.data += '&post_id=' + jQuery('#post_ID').val();
+ return s;
+ }
+ });
});