<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14057] trunk/wp-includes/js: Remember the post_parent during autosaves.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14057">14057</a></dd>
<dt>Author</dt> <dd>dd32</dd>
<dt>Date</dt> <dd>2010-04-10 12:39:01 +0000 (Sat, 10 Apr 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remember the post_parent during autosaves. Props duck_. Fixes <a href="http://trac.wordpress.org/ticket/12938">#12938</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjsautosavedevjs">trunk/wp-includes/js/autosave.dev.js</a></li>
<li><a href="#trunkwpincludesjsautosavejs">trunk/wp-includes/js/autosave.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjsautosavedevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/autosave.dev.js (14056 => 14057)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/autosave.dev.js        2010-04-10 12:17:19 UTC (rev 14056)
+++ trunk/wp-includes/js/autosave.dev.js        2010-04-10 12:39:01 UTC (rev 14057)
</span><span class="lines">@@ -264,12 +264,14 @@
</span><span class="cx">                 post_data[&quot;excerpt&quot;] = jQuery(&quot;#excerpt&quot;).val();
</span><span class="cx">         if ( jQuery(&quot;#post_author&quot;).size() )
</span><span class="cx">                 post_data[&quot;post_author&quot;] = jQuery(&quot;#post_author&quot;).val();
</span><ins>+        if ( jQuery(&quot;#parent_id&quot;).val() ) 
+                post_data[&quot;parent_id&quot;] = jQuery(&quot;#parent_id&quot;).val(); 
</ins><span class="cx">         post_data[&quot;user_ID&quot;] = jQuery(&quot;#user-id&quot;).val();
</span><span class="cx">         if ( jQuery('#auto_draft').val() == '1' )
</span><span class="cx">                 post_data[&quot;auto_draft&quot;] = '1';
</span><span class="cx"> 
</span><span class="cx">         if ( doAutoSave ) {
</span><del>-                autosaveLast = jQuery(&quot;#title&quot;).val()+jQuery(&quot;#content&quot;).val();
</del><ins>+                autosaveLast = jQuery(&quot;#title&quot;).val() + jQuery(&quot;#content&quot;).val();
</ins><span class="cx">         } else {
</span><span class="cx">                 post_data['autosave'] = 0;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpincludesjsautosavejs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/autosave.js (14056 => 14057)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/autosave.js        2010-04-10 12:17:19 UTC (rev 14056)
+++ trunk/wp-includes/js/autosave.js        2010-04-10 12:39:01 UTC (rev 14057)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var autosave,autosaveLast=&quot;&quot;,autosavePeriodical,autosaveOldMessage=&quot;&quot;,autosaveDelayPreview=false,notSaved=true,blockSave=false,interimLogin=false;jQuery(document).ready(function($){var dotabkey=true;autosaveLast=$(&quot;#post #title&quot;).val()+$(&quot;#post #content&quot;).val();autosavePeriodical=$.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});$(&quot;#post&quot;).submit(function(){$.cancel(autosavePeriodical)});$('input[type=&quot;submit&quot;], a.submitdelete',&quot;#submitpost&quot;).click(function(){blockSave=true;window.onbeforeunload=null;$(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).each(function(){var t=$(this);if(t.hasClass(&quot;button-primary&quot;)){t.addClass(&quot;button-primary-disabled&quot;)}else{t.addClass(&quot;button-disabled&quot;)}});$(&quot;#ajax-loading&quot;).css(&quot;visibility&quot;,&quot;visible&quot;)});window.onbeforeunload=function(){var mce=typeof(tinyMCE)!=&quot;undefined&quot;?tinyMCE.activeEditor:false,title,content;if(mce&amp;&amp;!mce.isHidden()){if(mce.isDirty()){return autosaveL10n.saveAlert}}else{title=$(&quot;#post #title&quot;).val(),content=$(&quot;#post #content&quot;).val();if((title||content)&amp;&amp;title+content!=autosaveLast){return autosaveL10n.saveAlert}}};$(&quot;#post-preview&quot;).click(function(){if($(&quot;#auto_draft&quot;).val()==&quot;1&quot;&amp;&amp;notSaved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){$(&quot;input#wp-preview&quot;).val(&quot;dopreview&quot;);$(&quot;form#post&quot;).attr(&quot;target&quot;,&quot;wp-preview&quot;).submit().attr(&quot;target&quot;,&quot;&quot;);$(&quot;input#wp-preview&quot;).val(&quot;&quot;)};if(typeof tinyMCE!=&quot;undefined&quot;){$(&quot;#title&quot;)[$.browser.opera?&quot;keypress&quot;:&quot;keydown&quot;](function(e){if(e.which==9&amp;&amp;!e.shiftKey&amp;&amp;!e.controlKey&amp;&amp;!e.altKey){if(($(&quot;#auto_draft&quot;).val()==&quot;1&quot;)&amp;&amp;($(&quot;#title&quot;).val().length&gt;0)){autosave()}if(tinyMCE.activeEditor&amp;&amp;!tinyMCE.activeEditor.isHidden()&amp;&amp;dotabkey){e.preventDefault();dotabkey=false;tinyMCE.activeEditor.focus();return false}}})}if(&quot;1&quot;==$(&quot;#auto_draft&quot;).val()){$(&quot;#title&quot;).blur(function(){if(!this.value||$(&quot;#auto_draft&quot;).val()!=&quot;1&quot;){return}delayed_autosave()})}});function autosave_parse_response(response){var res=wpAjax.parseAjaxResponse(response,&quot;autosave&quot;),message=&quot;&quot;,postID,sup,url;if(res&amp;&amp;res.responses&amp;&amp;res.responses.length){message=res.responses[0].data;if(res.responses[0].supplemental){sup=res.responses[0].supplemental;if(&quot;disable&quot;==sup.disable_autosave){autosave=function(){};res={errors:true}}if(sup.session_expired&amp;&amp;(url=sup.session_expired)){if(!interimLogin||interimLogin.closed){interimLogin=window.open(url,&quot;login&quot;,&quot;width=600,height=450,resizable=yes,scrollbars=yes,status=yes&quot;);interimLogin.focus()}delete sup.session_expired}jQuery.each(sup,function(selector,value){if(selector.match(/^replace-/)){jQuery(&quot;#&quot;+selector.replace(&quot;replace-&quot;,&quot;&quot;)).val(value)}})}if(!res.errors){postID=parseInt(res.responses[0].id,10);if(!isNaN(postID)&amp;&amp;postID&gt;0){autosave_update_slug(postID)}}}if(message){jQuery(&quot;#autosave&quot;).html(message)}else{if(autosaveOldMessage&amp;&amp;res){jQuery(&quot;#autosave&quot;).html(autosaveOldMessage)}}return res}function autosave_saved(response){blockSave=false;autosave_parse_response(response);autosave_enable_buttons()}function autosave_saved_new(response){blockSave=false;var res=autosave_parse_response(response),tempID,postID;if(res&amp;&amp;res.responses.length&amp;&amp;!res.errors){postID=parseInt(res.responses[0].id,10);autosave_update_post_ID(postID);if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_post_ID(postID){if(!isNaN(postID)&amp;&amp;postID&gt;0){if(postID==parseInt(jQuery(&quot;#post_ID&quot;).val(),10)){return}notSaved=false;autosave_enable_buttons();jQuery(&quot;#delete-action a.submitdelete&quot;).fadeIn();jQuery(&quot;#hiddenaction&quot;).val(&quot;editpost&quot;);jQuery(&quot;#auto_draft&quot;).val(&quot;0&quot;)}}function autosave_update_slug(post_id){if(&quot;undefined&quot;!=makeSlugeditClickable&amp;&amp;jQuery.isFunction(makeSlugeditClickable)&amp;&amp;!jQuery(&quot;#edit-slug-box &gt; *&quot;).size()){jQuery.post(ajaxurl,{action:&quot;sample-permalink&quot;,post_id:post_id,new_title:jQuery(&quot;#title&quot;).val(),samplepermalinknonce:jQuery(&quot;#samplepermalinknonce&quot;).val()},function(data){jQuery(&quot;#edit-slug-box&quot;).html(data);makeSlugeditClickable()})}}function autosave_loading(){jQuery(&quot;#autosave&quot;).html(autosaveL10n.savingText)}function autosave_enable_buttons(){setTimeout(function(){jQuery(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).removeAttr(&quot;disabled&quot;);jQuery(&quot;#ajax-loading&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)},500)}function autosave_disable_buttons(){jQuery(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).attr(&quot;disabled&quot;,&quot;disabled&quot;);setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){blockSave=true;var rich=(typeof tinyMCE!=&quot;undefined&quot;)&amp;&amp;tinyMCE.activeEditor&amp;&amp;!tinyMCE.activeEditor.isHidden(),post_data,doAutoSave,ed,origStatus,successCallback;autosave_disable_buttons();post_data={action:&quot;autosave&quot;,post_ID:jQuery(&quot;#post_ID&quot;).val()||0,post_title:jQuery(&quot;#title&quot;).val()||&quot;&quot;,autosavenonce:jQuery(&quot;#autosavenonce&quot;).val(),post_type:jQuery(&quot;#post_type&quot;).val()||&quot;&quot;,autosave:1};jQuery(&quot;.tags-input&quot;).each(function(){post_data[this.name]=this.value});doAutoSave=true;if(jQuery(&quot;#TB_window&quot;).css(&quot;display&quot;)==&quot;block&quot;){doAutoSave=false}if(rich&amp;&amp;doAutoSave){ed=tinyMCE.activeEditor;if(ed.plugins.spellchecker&amp;&amp;ed.plugins.spellchecker.active){doAutoSave=false}else{if(&quot;mce_fullscreen&quot;==ed.id){tinyMCE.get(&quot;content&quot;).setContent(ed.getContent({format:&quot;raw&quot;}),{format:&quot;raw&quot;})}tinyMCE.get(&quot;content&quot;).save()}}post_data.content=jQuery(&quot;#content&quot;).val();if(jQuery(&quot;#post_name&quot;).val()){post_data.post_name=jQuery(&quot;#post_name&quot;).val()}if((post_data.post_title.length==0&amp;&amp;post_data.content.length==0)||post_data.post_title+post_data.content==autosaveLast){doAutoSave=false}origStatus=jQuery(&quot;#original_post_status&quot;).val();goodcats=([]);jQuery(&quot;[name='post_category[]']:checked&quot;).each(function(i){goodcats.push(this.value)});post_data.catslist=goodcats.join(&quot;,&quot;);if(jQuery(&quot;#comment_status&quot;).attr(&quot;checked&quot;)){post_data.comment_status=&quot;open&quot;}if(jQuery(&quot;#ping_status&quot;).attr(&quot;checked&quot;)){post_data.ping_status=&quot;open&quot;}if(jQuery(&quot;#excerpt&quot;).size()){post_data.excerpt=jQuery(&quot;#excerpt&quot;).val()}if(jQuery(&quot;#post_author&quot;).size()){post_data.post_author=jQuery(&quot;#post_author&quot;).val()}post_data.user_ID=jQuery(&quot;#user-id&quot;).val();if(jQuery(&quot;#auto_draft&quot;).val()==&quot;1&quot;){post_data.auto_draft=&quot;1&quot;}if(doAutoSave){autosaveLast=jQuery(&quot;#title&quot;).val()+jQuery(&quot;#content&quot;).val()}else{post_data.autosave=0}if(post_data.auto_draft==&quot;1&quot;){successCallback=autosave_saved_new}else{successCallback=autosave_saved}autosaveOldMessage=jQuery(&quot;#autosave&quot;).html();jQuery.ajax({data:post_data,beforeSend:doAutoSave?autosave_loading:null,type:&quot;POST&quot;,url:autosaveL10n.requestFile,success:successCallback})};
</del><span class="cx">\ No newline at end of file
</span><ins>+var autosave,autosaveLast=&quot;&quot;,autosavePeriodical,autosaveOldMessage=&quot;&quot;,autosaveDelayPreview=false,notSaved=true,blockSave=false,interimLogin=false;jQuery(document).ready(function($){var dotabkey=true;autosaveLast=$(&quot;#post #title&quot;).val()+$(&quot;#post #content&quot;).val();autosavePeriodical=$.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});$(&quot;#post&quot;).submit(function(){$.cancel(autosavePeriodical)});$('input[type=&quot;submit&quot;], a.submitdelete',&quot;#submitpost&quot;).click(function(){blockSave=true;window.onbeforeunload=null;$(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).each(function(){var t=$(this);if(t.hasClass(&quot;button-primary&quot;)){t.addClass(&quot;button-primary-disabled&quot;)}else{t.addClass(&quot;button-disabled&quot;)}});$(&quot;#ajax-loading&quot;).css(&quot;visibility&quot;,&quot;visible&quot;)});window.onbeforeunload=function(){var mce=typeof(tinyMCE)!=&quot;undefined&quot;?tinyMCE.activeEditor:false,title,content;if(mce&amp;&amp;!mce.isHidden()){if(mce.isDirty()){return autosaveL10n.saveAlert}}else{title=$(&quot;#post #title&quot;).val(),content=$(&quot;#post #content&quot;).val();if((title||content)&amp;&amp;title+content!=autosaveLast){return autosaveL10n.saveAlert}}};$(&quot;#post-preview&quot;).click(function(){if($(&quot;#auto_draft&quot;).val()==&quot;1&quot;&amp;&amp;notSaved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){$(&quot;input#wp-preview&quot;).val(&quot;dopreview&quot;);$(&quot;form#post&quot;).attr(&quot;target&quot;,&quot;wp-preview&quot;).submit().attr(&quot;target&quot;,&quot;&quot;);$(&quot;input#wp-preview&quot;).val(&quot;&quot;)};if(typeof tinyMCE!=&quot;undefined&quot;){$(&quot;#title&quot;)[$.browser.opera?&quot;keypress&quot;:&quot;keydown&quot;](function(e){if(e.which==9&amp;&amp;!e.shiftKey&amp;&amp;!e.controlKey&amp;&amp;!e.altKey){if(($(&quot;#auto_draft&quot;).val()==&quot;1&quot;)&amp;&amp;($(&quot;#title&quot;).val().length&gt;0)){autosave()}if(tinyMCE.activeEditor&amp;&amp;!tinyMCE.activeEditor.isHidden()&amp;&amp;dotabkey){e.preventDefault();dotabkey=false;tinyMCE.activeEditor.focus();return false}}})}if(&quot;1&quot;==$(&quot;#auto_draft&quot;).val()){$(&quot;#title&quot;).blur(function(){if(!this.value||$(&quot;#auto_draft&quot;).val()!=&quot;1&quot;){return}delayed_autosave()})}});function autosave_parse_response(response){var res=wpAjax.parseAjaxResponse(response,&quot;autosave&quot;),message=&quot;&quot;,postID,sup,url;if(res&amp;&amp;res.responses&amp;&amp;res.responses.length){message=res.responses[0].data;if(res.responses[0].supplemental){sup=res.responses[0].supplemental;if(&quot;disable&quot;==sup.disable_autosave){autosave=function(){};res={errors:true}}if(sup.session_expired&amp;&amp;(url=sup.session_expired)){if(!interimLogin||interimLogin.closed){interimLogin=window.open(url,&quot;login&quot;,&quot;width=600,height=450,resizable=yes,scrollbars=yes,status=yes&quot;);interimLogin.focus()}delete sup.session_expired}jQuery.each(sup,function(selector,value){if(selector.match(/^replace-/)){jQuery(&quot;#&quot;+selector.replace(&quot;replace-&quot;,&quot;&quot;)).val(value)}})}if(!res.errors){postID=parseInt(res.responses[0].id,10);if(!isNaN(postID)&amp;&amp;postID&gt;0){autosave_update_slug(postID)}}}if(message){jQuery(&quot;#autosave&quot;).html(message)}else{if(autosaveOldMessage&amp;&amp;res){jQuery(&quot;#autosave&quot;).html(autosaveOldMessage)}}return res}function autosave_saved(response){blockSave=false;autosave_parse_response(response);autosave_enable_buttons()}function autosave_saved_new(response){blockSave=false;var res=autosave_parse_response(response),tempID,postID;if(res&amp;&amp;res.responses.length&amp;&amp;!res.errors){postID=parseInt(res.responses[0].id,10);autosave_update_post_ID(postID);if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_post_ID(postID){if(!isNaN(postID)&amp;&amp;postID&gt;0){if(postID==parseInt(jQuery(&quot;#post_ID&quot;).val(),10)){return}notSaved=false;autosave_enable_buttons();jQuery(&quot;#delete-action a.submitdelete&quot;).fadeIn();jQuery(&quot;#hiddenaction&quot;).val(&quot;editpost&quot;);jQuery(&quot;#auto_draft&quot;).val(&quot;0&quot;)}}function autosave_update_slug(post_id){if(&quot;undefined&quot;!=makeSlugeditClickable&amp;&amp;jQuery.isFunction(makeSlugeditClickable)&amp;&amp;!jQuery(&quot;#edit-slug-box &gt; *&quot;).size()){jQuery.post(ajaxurl,{action:&quot;sample-permalink&quot;,post_id:post_id,new_title:jQuery(&quot;#title&quot;).val(),samplepermalinknonce:jQuery(&quot;#samplepermalinknonce&quot;).val()},function(data){jQuery(&quot;#edit-slug-box&quot;).html(data);makeSlugeditClickable()})}}function autosave_loading(){jQuery(&quot;#autosave&quot;).html(autosaveL10n.savingText)}function autosave_enable_buttons(){setTimeout(function(){jQuery(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).removeAttr(&quot;disabled&quot;);jQuery(&quot;#ajax-loading&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)},500)}function autosave_disable_buttons(){jQuery(&quot;:button, :submit&quot;,&quot;#submitpost&quot;).attr(&quot;disabled&quot;,&quot;disabled&quot;);setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){blockSave=true;var rich=(typeof tinyMCE!=&quot;undefined&quot;)&amp;&amp;tinyMCE.activeEditor&amp;&amp;!tinyMCE.activeEditor.isHidden(),post_data,doAutoSave,ed,origStatus,successCallback;autosave_disable_buttons();post_data={action:&quot;autosave&quot;,post_ID:jQuery(&quot;#post_ID&quot;).val()||0,post_title:jQuery(&quot;#title&quot;).val()||&quot;&quot;,autosavenonce:jQuery(&quot;#autosavenonce&quot;).val(),post_type:jQuery(&quot;#post_type&quot;).val()||&quot;&quot;,autosave:1};jQuery(&quot;.tags-input&quot;).each(function(){post_data[this.name]=this.value});doAutoSave=true;if(jQuery(&quot;#TB_window&quot;).css(&quot;display&quot;)==&quot;block&quot;){doAutoSave=false}if(rich&amp;&amp;doAutoSave){ed=tinyMCE.activeEditor;if(ed.plugins.spellchecker&amp;&amp;ed.plugins.spellchecker.active){doAutoSave=false}else{if(&quot;mce_fullscreen&quot;==ed.id){tinyMCE.get(&quot;content&quot;).setContent(ed.getContent({format:&quot;raw&quot;}),{format:&quot;raw&quot;})}tinyMCE.get(&quot;content&quot;).save()}}post_data.content=jQuery(&quot;#content&quot;).val();if(jQuery(&quot;#post_name&quot;).val()){post_data.post_name=jQuery(&quot;#post_name&quot;).val()}if((post_data.post_title.length==0&amp;&amp;post_data.content.length==0)||post_data.post_title+post_data.content==autosaveLast){doAutoSave=false}origStatus=jQuery(&quot;#original_post_status&quot;).val();goodcats=([]);jQuery(&quot;[name='post_category[]']:checked&quot;).each(function(i){goodcats.push(this.value)});post_data.catslist=goodcats.join(&quot;,&quot;);if(jQuery(&quot;#comment_status&quot;).attr(&quot;checked&quot;)){post_data.comment_status=&quot;open&quot;}if(jQuery(&quot;#ping_status&quot;).attr(&quot;checked&quot;)){post_data.ping_status=&quot;open&quot;}if(jQuery(&quot;#excerpt&quot;).size()){post_data.excerpt=jQuery(&quot;#excerpt&quot;).val()}if(jQuery(&quot;#post_author&quot;).size()){post_data.post_author=jQuery(&quot;#post_author&quot;).val()}if(jQuery(&quot;#parent_id&quot;).val()){post_data.parent_id=jQuery(&quot;#parent_id&quot;).val()}post_data.user_ID=jQuery(&quot;#user-id&quot;).val();if(jQuery(&quot;#auto_draft&quot;).val()==&quot;1&quot;){post_data.auto_draft=&quot;1&quot;}if(doAutoSave){autosaveLast=jQuery(&quot;#title&quot;).val()+jQuery(&quot;#content&quot;).val()}else{post_data.autosave=0}if(post_data.auto_draft==&quot;1&quot;){successCallback=autosave_saved_new}else{successCallback=autosave_saved}autosaveOldMessage=jQuery(&quot;#autosave&quot;).html();jQuery.ajax({data:post_data,beforeSend:doAutoSave?autosave_loading:null,type:&quot;POST&quot;,url:autosaveL10n.requestFile,success:successCallback})};
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>