Permalink
Browse files

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
  • Loading branch information...
azaozz
azaozz committed Jun 25, 2009
1 parent d79a67e commit 6ee80c9ccef8016a294fad3922ce0a2e064cd181
Showing with 10 additions and 8 deletions.
  1. +8 −6 wp-admin/js/post.dev.js
  2. +1 −1 wp-admin/js/post.js
  3. +1 −1 wp-includes/script-loader.php
View
@@ -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 ) {
Oops, something went wrong.

0 comments on commit 6ee80c9

Please sign in to comment.