Fix the test for autosave in post.js, fixes #10135 for 2.8
git-svn-id: http://svn.automattic.com/wordpress/branches/2.8@11636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d79a67e354
commit
6ee80c9cce
|
@ -212,10 +212,6 @@ var commentsBox, tagCloud;
|
|||
jQuery(document).ready( function($) {
|
||||
var noSyncChecks = false, syncChecks, catAddAfter, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = '';
|
||||
|
||||
// for Press This
|
||||
if ( typeof autosave != 'function' )
|
||||
autosave = function(){};
|
||||
|
||||
// postboxes
|
||||
postboxes.add_postbox_toggles('post');
|
||||
|
||||
|
@ -225,7 +221,13 @@ jQuery(document).ready( function($) {
|
|||
// prepare the tag UI
|
||||
tag_init();
|
||||
|
||||
$('#title').blur( function() { if ( ($("#post_ID").val() > 0) || ($("#title").val().length == 0) ) return; autosave(); } );
|
||||
$('#title').blur( function() {
|
||||
if ( ($("#post_ID").val() > 0) || ($("#title").val().length == 0) )
|
||||
return;
|
||||
|
||||
if ( typeof(autosave) != 'undefined' )
|
||||
autosave();
|
||||
});
|
||||
|
||||
// auto-suggest stuff
|
||||
$('.newtag').each(function(){
|
||||
|
@ -477,7 +479,7 @@ jQuery(document).ready( function($) {
|
|||
// Custom Fields
|
||||
$('#the-list').wpList( { addAfter: function( xml, s ) {
|
||||
$('table#list-table').show();
|
||||
if ( $.isFunction( autosave_update_post_ID ) ) {
|
||||
if ( typeof( autosave_update_post_ID ) != 'undefined' ) {
|
||||
autosave_update_post_ID(s.parsed.responses[0].supplemental.postid);
|
||||
}
|
||||
}, addBefore: function( s ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -264,7 +264,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(slugL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'slug'), '20090526' );
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'slug'), '20090624' );
|
||||
$scripts->add_data( 'post', 'group', 1 );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
|
|
Loading…
Reference in New Issue