Handle error response in autosave_update_slug(), props nacin, fixes #16975

git-svn-id: http://svn.automattic.com/wordpress/trunk@17565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-03-27 20:09:09 +00:00
parent 66befd1f7e
commit b8d696b2a6
3 changed files with 6 additions and 4 deletions

View File

@ -161,8 +161,10 @@ function autosave_update_slug(post_id) {
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
},
function(data) {
jQuery('#edit-slug-box').html(data);
makeSlugeditClickable();
if ( data !== '-1' ) {
jQuery('#edit-slug-box').html(data);
makeSlugeditClickable();
}
}
);
}

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
) );
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20101004' );
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110327' );
$scripts->add_data( 'autosave', 'group', 1 );
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20101222' );