<!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>[17702] trunk: DFW: remove unneeded JS global, fix screen flash in WebKit,
props koopersmith, see #17136</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/17702">17702</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-04-26 01:19:26 +0000 (Tue, 26 Apr 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>DFW: remove unneeded JS global, fix screen flash in WebKit, props koopersmith, see <a href="http://trac.wordpress.org/ticket/17136">#17136</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjswpfullscreendevjs">trunk/wp-admin/js/wp-fullscreen.dev.js</a></li>
<li><a href="#trunkwpadminjswpfullscreenjs">trunk/wp-admin/js/wp-fullscreen.js</a></li>
<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>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjswpfullscreendevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/wp-fullscreen.dev.js (17701 => 17702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/wp-fullscreen.dev.js        2011-04-25 22:49:22 UTC (rev 17701)
+++ trunk/wp-admin/js/wp-fullscreen.dev.js        2011-04-26 01:19:26 UTC (rev 17702)
</span><span class="lines">@@ -1,7 +1,9 @@
</span><span class="cx"> /**
</span><span class="cx"> * PubSub -- A lightweight publish/subscribe implementation. Private use only!
</span><span class="cx"> */
</span><del>-var PubSub = function() {
</del><ins>+var PubSub, fullscreen, wptitlehint;
+
+PubSub = function() {
</ins><span class="cx">         this.topics = {};
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -50,8 +52,6 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // Distraction Free Writing (wp-fullscreen) access the API globally using the fullscreen variable.
</span><del>-var fullscreen, wp_fullscreen_enabled = false;
-
</del><span class="cx"> (function($){
</span><span class="cx">         var api, ps, bounder;
</span><span class="cx">
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">                         return;
</span><span class="cx">
</span><span class="cx">                 api.block = true;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 setTimeout( function() {
</span><span class="cx">                         api.block = false;
</span><span class="cx">                 }, 500 );
</span><span class="lines">@@ -137,12 +137,12 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         ps.subscribe( 'showToolbar', function() {
</span><del>-                api.fade.fadein( api.ui.topbar, 600 );
</del><ins>+                api.fade.In( api.ui.topbar, 600 );
</ins><span class="cx">                 $('#wp-fullscreen-body').addClass('wp-fullscreen-focus');
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         ps.subscribe( 'hideToolbar', function() {
</span><del>-                api.fade.fadeout( api.ui.topbar, 600 );
</del><ins>+                api.fade.Out( api.ui.topbar, 600 );
</ins><span class="cx">                 $('#wp-fullscreen-body').removeClass('wp-fullscreen-focus');
</span><span class="cx">         });
</span><span class="cx">
</span><span class="lines">@@ -173,11 +173,11 @@
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         ps.subscribe( 'shown', function() {
</span><del>-                api.visible = wp_fullscreen_enabled = true;
</del><ins>+                api.visible = true;
</ins><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         ps.subscribe( 'hidden', function() {
</span><del>-                api.visible = wp_fullscreen_enabled = false;
</del><ins>+                api.visible = false;
</ins><span class="cx">                 $('#wp_mce_fullscreen').removeAttr('style');
</span><span class="cx">                 tinyMCE.execCommand('wpFullScreenClose');
</span><span class="cx">         });
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">                         api.ui.element = $('#fullscreen-fader');
</span><span class="cx">                         api.ui.topbar = $('#fullscreen-topbar');
</span><span class="cx">
</span><del>-                        if ( 'undefined' != wptitlehint )
</del><ins>+                        if ( wptitlehint )
</ins><span class="cx">                                 wptitlehint('wp-fullscreen-title');
</span><span class="cx">                 },
</span><span class="cx">
</span><span class="lines">@@ -230,11 +230,11 @@
</span><span class="cx">                         if ( before )
</span><span class="cx">                                 ps.publish( before );
</span><span class="cx">
</span><del>-                        api.fade.fadein( api.ui.element, 600, function() {
</del><ins>+                        api.fade.In( api.ui.element, 600, function() {
</ins><span class="cx">                                 if ( during )
</span><span class="cx">                                         ps.publish( during );
</span><span class="cx">
</span><del>-                                api.fade.fadeout( api.ui.element, 600, function() {
</del><ins>+                                api.fade.Out( api.ui.element, 600, function() {
</ins><span class="cx">                                         if ( after )
</span><span class="cx">                                                 ps.publish( after );
</span><span class="cx">                                 })
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx">                 // Sensitivity to allow browsers to render the blank element before animating.
</span><span class="cx">                 sensitivity: 100,
</span><span class="cx">
</span><del>-                fadein: function( element, speed, callback ) {
</del><ins>+                In: function( element, speed, callback ) {
</ins><span class="cx">
</span><span class="cx">                         callback = callback || $.noop;
</span><span class="cx">                         speed = speed || 400;
</span><span class="lines">@@ -260,10 +260,10 @@
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 element.show();
</span><del>-                                setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity );
</del><span class="cx">                                 element.one( this.transitionend, function() {
</span><span class="cx">                                         callback();
</span><span class="cx">                                 });
</span><ins>+                                setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity );
</ins><span class="cx">                         } else {
</span><span class="cx">                                 element.css( 'opacity', 1 ).fadeIn( speed, callback );
</span><span class="cx">                         }
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx">                         return element;
</span><span class="cx">                 },
</span><span class="cx">
</span><del>-                fadeout: function( element, speed, callback ) {
</del><ins>+                Out: function( element, speed, callback ) {
</ins><span class="cx">
</span><span class="cx">                         callback = callback || $.noop;
</span><span class="cx">                         speed = speed || 400;
</span><span class="lines">@@ -280,7 +280,6 @@
</span><span class="cx">                                 return element;
</span><span class="cx">
</span><span class="cx">                         if ( api.fade.transitions ) {
</span><del>-                                element.removeClass( 'fade-trigger' );
</del><span class="cx">                                 element.one( api.fade.transitionend, function() {
</span><span class="cx">                                         if ( element.hasClass('fade-trigger') )
</span><span class="cx">                                                 return;
</span><span class="lines">@@ -288,6 +287,7 @@
</span><span class="cx">                                         element.hide();
</span><span class="cx">                                         callback();
</span><span class="cx">                                 });
</span><ins>+                                setTimeout( function() { element.removeClass( 'fade-trigger' ); }, this.sensitivity );
</ins><span class="cx">                         } else {
</span><span class="cx">                                 element.fadeOut( speed, callback );
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkwpadminjswpfullscreenjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/wp-fullscreen.js (17701 => 17702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/wp-fullscreen.js        2011-04-25 22:49:22 UTC (rev 17701)
+++ trunk/wp-admin/js/wp-fullscreen.js        2011-04-26 01:19:26 UTC (rev 17702)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var PubSub=function(){this.topics={}};PubSub.prototype.subscribe=function(a,b){if(!this.topics[a]){this.topics[a]=[]}this.topics[a].push(b);return b};PubSub.prototype.unsubscribe=function(b,e){var c,a,d=this.topics[b];if(!d){return e||[]}if(e){for(c=0,a=d.length;c<a;c++){if(e==d[c]){d.splice(c,1)}}return e}else{this.topics[b]=[];return d}};PubSub.prototype.publish=function(c,b){var d,a,e=this.topics[c];if(!e){return}b=b||[];for(d=0,a=e.length;d<a;d++){e[d].apply(null,b)}};var fullscreen,wp_fullscreen_enabled=false;(function(b){var a,d,c;fullscreen=a={};d=a.pubsub=new PubSub();a.timer=0;a.block=false;c=function(h,g,f){f=f||1250;if(a.block){return}a.block=true;setTimeout(function(){a.block=false},500);if(a.timer){clearTimeout(a.timer)}else{d.publish(h)}function e(){d.publish(g);a.timer=0}a.timer=setTimeout(e,f)};a.on=function(){if(!a.ui.element){a.ui.init()}if(!a.visible){a.ui.fade("show","showing","shown")}};a.off=function(){if(a.ui.element&&a.visible){a.ui.fade("hide","hiding","hidden")}};a.save=function(){b("#title").val(b("#wp-fullscreen-title").val());tinyMCE.execCommand("wpFullScreenSaveContent");b("#hiddenaction").val("wp-fullscreen-save-post");b.post(ajaxurl,b("form#post").serialize(),function(e){if(e.message){b("#wp-fullscreen-saved").html(e.message)}if(e.last_edited){b("#wp-fullscreen-last-edit").html(e.last_edited)}},"json")};set_title_hint=function(e){if(!e.val().length){e.siblings("label").css("visibility","")}else{e.siblings("label").css("visibility","hidden")}};d.subscribe("showToolbar",function(){a.fade.fadein(a.ui.topbar,600);b("#wp-fullscreen-body").addClass("wp-fullscreen-focus")});d.subscribe("hideToolbar",function(){a.fade.fadeout(a.ui.topbar,600);b("#wp-fullscreen-body").removeClass("wp-fullscreen-focus")});d.subscribe("show",function(){var e=b("#wp-fullscreen-title").val(b("#title").val());this.set_title_hint(e);b(document).bind("mousemove.fullscreen",function(f){c("showToolbar","hideToolbar",3000)})});d.subscribe("hide",function(){var e=b("#title").val(b("#wp-fullscreen-title").val());this.set_title_hint(e);tinyMCE.execCommand("wpFullScreenSave");b(document).unbind(".fullscreen")});d.subscribe("showing",function(){b("#wp-fullscreen-body").show();b(document.body).addClass("fullscreen-active");c("showToolbar","hideToolbar",3000);b("#wp-fullscreen-last-edit").html(b("#last-edit").html())});d.subscribe("hiding",function(){b("#wp-fullscreen-body").hide();b(document.body).removeClass("fullscreen-active");b("#last-edit").html(b("#wp-fullscreen-last-edit").html())});d.subscribe("shown",function(){a.visible=wp_fullscreen_enabled=true});d.subscribe("hidden",function(){a.visible=wp_fullscreen_enabled=false;b("#wp_mce_fullscreen").removeAttr("style");tinyMCE.execCommand("wpFullScreenClose")});a.b=function(){tinyMCE.execCommand("Bold")};a.i=function(){tinyMCE.execCommand("Italic")};a.ul=function(){tinyMCE.execCommand("InsertUnorderedList")};a.ol=function(){tinyMCE.execCommand("InsertOrderedList")};a.link=function(){tinyMCE.execCommand("WP_Link")};a.unlink=function(){tinyMCE.execCommand("unlink")};a.ui={init:function(){a.ui.element=b("#fullscreen-fader");a.ui.topbar=b("#fullscreen-topbar");if("undefined"!=wptitlehint){wptitlehint("wp-fullscreen-title")}},fade:function(f,e,g){if(f){d.publish(f)}a.fade.fadein(a.ui.element,600,function(){if(e){d.publish(e)}a.fade.fadeout(a.ui.element,600,function(){if(g){d.publish(g)}})})}};a.fade={transitionend:"transitionend webkitTransitionEnd oTransitionEnd",sensitivity:100,fadein:function(e,f,g){g=g||b.noop;f=f||400;if(a.fade.transitions){if(e.is(":visible")){e.addClass("fade-trigger");return e}e.show();setTimeout(function(){e.addClass("fade-trigger")},this.sensitivity);e.one(this.transitionend,function(){g()})}else{e.css("opacity",1).fadeIn(f,g)}return e},fadeout:function(e,f,g){g=g||b.noop;f=f||400;if(!e.is(":visible")){return e}if(a.fade.transitions){e.removeClass("fade-trigger");e.one(a.fade.transitionend,function(){if(e.hasClass("fade-trigger")){return}e.hide();g()})}else{e.fadeOut(f,g)}return e},transitions:(function(){var e=document.documentElement.style;return(typeof(e.WebkitTransition)=="string"||typeof(e.MozTransition)=="string"||typeof(e.OTransition)=="string"||typeof(e.transition)=="string")})()}})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var PubSub,fullscreen,wptitlehint;PubSub=function(){this.topics={}};PubSub.prototype.subscribe=function(a,b){if(!this.topics[a]){this.topics[a]=[]}this.topics[a].push(b);return b};PubSub.prototype.unsubscribe=function(b,e){var c,a,d=this.topics[b];if(!d){return e||[]}if(e){for(c=0,a=d.length;c<a;c++){if(e==d[c]){d.splice(c,1)}}return e}else{this.topics[b]=[];return d}};PubSub.prototype.publish=function(c,b){var d,a,e=this.topics[c];if(!e){return}b=b||[];for(d=0,a=e.length;d<a;d++){e[d].apply(null,b)}};(function(b){var a,d,c;fullscreen=a={};d=a.pubsub=new PubSub();a.timer=0;a.block=false;c=function(h,g,f){f=f||1250;if(a.block){return}a.block=true;setTimeout(function(){a.block=false},500);if(a.timer){clearTimeout(a.timer)}else{d.publish(h)}function e(){d.publish(g);a.timer=0}a.timer=setTimeout(e,f)};a.on=function(){if(!a.ui.element){a.ui.init()}if(!a.visible){a.ui.fade("show","showing","shown")}};a.off=function(){if(a.ui.element&&a.visible){a.ui.fade("hide","hiding","hidden")}};a.save=function(){b("#title").val(b("#wp-fullscreen-title").val());tinyMCE.execCommand("wpFullScreenSaveContent");b("#hiddenaction").val("wp-fullscreen-save-post");b.post(ajaxurl,b("form#post").serialize(),function(e){if(e.message){b("#wp-fullscreen-saved").html(e.message)}if(e.last_edited){b("#wp-fullscreen-last-edit").html(e.last_edited)}},"json")};set_title_hint=function(e){if(!e.val().length){e.siblings("label").css("visibility","")}else{e.siblings("label").css("visibility","hidden")}};d.subscribe("showToolbar",function(){a.fade.In(a.ui.topbar,600);b("#wp-fullscreen-body").addClass("wp-fullscreen-focus")});d.subscribe("hideToolbar",function(){a.fade.Out(a.ui.topbar,600);b("#wp-fullscreen-body").removeClass("wp-fullscreen-focus")});d.subscribe("show",function(){var e=b("#wp-fullscreen-title").val(b("#title").val());this.set_title_hint(e);b(document).bind("mousemove.fullscreen",function(f){c("showToolbar","hideToolbar",3000)})});d.subscribe("hide",function(){var e=b("#title").val(b("#wp-fullscreen-title").val());this.set_title_hint(e);tinyMCE.execCommand("wpFullScreenSave");b(document).unbind(".fullscreen")});d.subscribe("showing",function(){b("#wp-fullscreen-body").show();b(document.body).addClass("fullscreen-active");c("showToolbar","hideToolbar",3000);b("#wp-fullscreen-last-edit").html(b("#last-edit").html())});d.subscribe("hiding",function(){b("#wp-fullscreen-body").hide();b(document.body).removeClass("fullscreen-active");b("#last-edit").html(b("#wp-fullscreen-last-edit").html())});d.subscribe("shown",function(){a.visible=true});d.subscribe("hidden",function(){a.visible=false;b("#wp_mce_fullscreen").removeAttr("style");tinyMCE.execCommand("wpFullScreenClose")});a.b=function(){tinyMCE.execCommand("Bold")};a.i=function(){tinyMCE.execCommand("Italic")};a.ul=function(){tinyMCE.execCommand("InsertUnorderedList")};a.ol=function(){tinyMCE.execCommand("InsertOrderedList")};a.link=function(){tinyMCE.execCommand("WP_Link")};a.unlink=function(){tinyMCE.execCommand("unlink")};a.ui={init:function(){a.ui.element=b("#fullscreen-fader");a.ui.topbar=b("#fullscreen-topbar");if(wptitlehint){wptitlehint("wp-fullscreen-title")}},fade:function(f,e,g){if(f){d.publish(f)}a.fade.In(a.ui.element,600,function(){if(e){d.publish(e)}a.fade.Out(a.ui.element,600,function(){if(g){d.publish(g)}})})}};a.fade={transitionend:"transitionend webkitTransitionEnd oTransitionEnd",sensitivity:100,In:function(e,f,g){g=g||b.noop;f=f||400;if(a.fade.transitions){if(e.is(":visible")){e.addClass("fade-trigger");return e}e.show();e.one(this.transitionend,function(){g()});setTimeout(function(){e.addClass("fade-trigger")},this.sensitivity)}else{e.css("opacity",1).fadeIn(f,g)}return e},Out:function(e,f,g){g=g||b.noop;f=f||400;if(!e.is(":visible")){return e}if(a.fade.transitions){e.one(a.fade.transitionend,function(){if(e.hasClass("fade-trigger")){return}e.hide();g()});setTimeout(function(){e.removeClass("fade-trigger")},this.sensitivity)}else{e.fadeOut(f,g)}return e},transitions:(function(){var e=document.documentElement.style;return(typeof(e.WebkitTransition)=="string"||typeof(e.MozTransition)=="string"||typeof(e.OTransition)=="string"||typeof(e.transition)=="string")})()}})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsautosavedevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/autosave.dev.js (17701 => 17702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/autosave.dev.js        2011-04-25 22:49:22 UTC (rev 17701)
+++ trunk/wp-includes/js/autosave.dev.js        2011-04-26 01:19:26 UTC (rev 17702)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', autosaveDelayPreview = false, notSaved = true, blockSave = false, wp_fullscreen_enabled;
</del><ins>+var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', autosaveDelayPreview = false, notSaved = true, blockSave = false, fullscreen;
</ins><span class="cx">
</span><span class="cx"> jQuery(document).ready( function($) {
</span><span class="cx">         var dotabkey = true;
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                         if ( mce.isDirty() )
</span><span class="cx">                                 return autosaveL10n.saveAlert;
</span><span class="cx">                 } else {
</span><del>-                        if ( wp_fullscreen_enabled ) {
</del><ins>+                        if ( fullscreen && fullscreen.visible ) {
</ins><span class="cx">                                 title = $('#wp-fullscreen-title').val();
</span><span class="cx">                                 content = $("#wp_mce_fullscreen").val();
</span><span class="cx">                         } else {
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">                 jQuery.post( ajaxurl, {
</span><span class="cx">                                 action: 'sample-permalink',
</span><span class="cx">                                 post_id: post_id,
</span><del>-                                new_title: wp_fullscreen_enabled ? jQuery('#wp-fullscreen-title').val() : jQuery('#title').val(),
</del><ins>+                                new_title: fullscreen && fullscreen.visible ? jQuery('#wp-fullscreen-title').val() : jQuery('#title').val(),
</ins><span class="cx">                                 samplepermalinknonce: jQuery('#samplepermalinknonce').val()
</span><span class="cx">                         },
</span><span class="cx">                         function(data) {
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ( wp_fullscreen_enabled ) {
</del><ins>+        if ( fullscreen && fullscreen.visible ) {
</ins><span class="cx">                 post_data["post_title"] = jQuery('#wp-fullscreen-title').val();
</span><span class="cx">                 post_data["content"] = jQuery("#wp_mce_fullscreen").val();
</span><span class="cx">         } else {
</span></span></pre></div>
<a id="trunkwpincludesjsautosavejs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/autosave.js (17701 => 17702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/autosave.js        2011-04-25 22:49:22 UTC (rev 17701)
+++ trunk/wp-includes/js/autosave.js        2011-04-26 01:19:26 UTC (rev 17702)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var autosave,autosaveLast="",autosavePeriodical,autosaveOldMessage="",autosaveDelayPreview=false,notSaved=true,blockSave=false,wp_fullscreen_enabled;jQuery(document).ready(function(b){var a=true;autosaveLast=b("#post #title").val()+b("#post #content").val();autosavePeriodical=b.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});b("#post").submit(function(){b.cancel(autosavePeriodical)});b('input[type="submit"], a.submitdelete',"#submitpost").click(function(){blockSave=true;window.onbeforeunload=null;b(":button, :submit","#submitpost").each(function(){var c=b(this);if(c.hasClass("button-primary")){c.addClass("button-primary-disabled")}else{c.addClass("button-disabled")}});if(b(this).attr("id")=="publish"){b("#ajax-loading").css("visibility","visible")}else{b("#draft-ajax-loading").css("visibility","visible")}});window.onbeforeunload=function(){var c=typeof(tinyMCE)!="undefined"?tinyMCE.activeEditor:false,e,d;if(c&&!c.isHidden()){if(c.isDirty()){return autosaveL10n.saveAlert}}else{if(wp_fullscreen_enabled){e=b("#wp-fullscreen-title").val();d=b("#wp_mce_fullscreen").val()}else{e=b("#post #title").val();d=b("#post #content").val()}if((e||d)&&e+d!=autosaveLast){return autosaveL10n.saveAlert}}};b("#post-preview").click(function(){if(b("#auto_draft").val()=="1"&&notSaved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){b("input#wp-preview").val("dopreview");b("form#post").attr("target","wp-preview").submit().attr("target","");b("input#wp-preview").val("")};if(typeof tinyMCE!="undefined"){b("#title")[b.browser.opera?"keypress":"keydown"](function(c){if(c.which==9&&!c.shiftKey&&!c.controlKey&&!c.altKey){if((b("#auto_draft").val()=="1")&&(b("#title").val().length>0)){autosave()}if(tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&a){c.preventDefault();a=false;tinyMCE.activeEditor.focus();return false}}})}if("1"==b("#auto_draft").val()){b("#title").blur(function(){if(!this.value||b("#auto_draft").val()!="1"){return}delayed_autosave()})}});function autosave_parse_response(c){var d=wpAjax.parseAjaxResponse(c,"autosave"),e="",a,b;if(d&&d.responses&&d.responses.length){e=d.responses[0].data;if(d.responses[0].supplemental){b=d.responses[0].supplemental;if("disable"==b.disable_autosave){autosave=function(){};d={errors:true}}if(b.alert){jQuery("#autosave-alert").remove();jQuery("#titlediv").after('<div id="autosave-alert" class="error below-h2"><p>'+b.alert+"</p></div>");alert(jQuery("#autosave-alert").text())}jQuery.each(b,function(f,g){if(f.match(/^replace-/)){jQuery("#"+f.replace("replace-","")).val(g)}})}if(!d.errors){a=parseInt(d.responses[0].id,10);if(!isNaN(a)&&a>0){autosave_update_slug(a)}}}if(e){jQuery(".autosave-message").html(e)}else{if(autosaveOldMessage&&d){jQuery(".autosave-message").html(autosaveOldMessage)}}return d}function autosave_saved(a){blockSave=false;autosave_parse_response(a);autosave_enable_buttons()}function autosave_saved_new(b){blockSave=false;var c=autosave_parse_response(b),a;if(c&&c.responses.length&&!c.errors){a=parseInt(c.responses[0].id,10);if(!isNaN(a)&&a>0){notSaved=false;jQuery("#auto_draft").val("0")}autosave_enable_buttons();if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_slug(a){if("undefined"!=makeSlugeditClickable&&jQuery.isFunction(makeSlugeditClickable)&&!jQuery("#edit-slug-box > *").size()){jQuery.post(ajaxurl,{action:"sample-permalink",post_id:a,new_title:wp_fullscreen_enabled?jQuery("#wp-fullscreen-title").val():jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(b){if(b!=="-1"){jQuery("#edit-slug-box").html(b);makeSlugeditClickable()}})}}function autosave_loading(){jQuery(".autosave-message").html(autosaveL10n.savingText)}function autosave_enable_buttons(){setTimeout(function(){jQuery(":button, :submit","#submitpost").removeAttr("disabled");jQuery(".ajax-loading").css("visibility","hidden")},500)}function autosave_disable_buttons(){jQuery(":button, :submit","#submitpost").attr("disabled","disabled");setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){blockSave=true;var c=(typeof tinyMCE!="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden(),d,f,b,e,a;autosave_disable_buttons();d={action:"autosave",post_ID:jQuery("#post_ID").val()||0,autosavenonce:jQuery("#autosavenonce").val(),post_type:jQuery("#post_type").val()||"",autosave:1};jQuery(".tags-input").each(function(){d[this.name]=this.value});f=true;if(jQuery("#TB_window").css("display")=="block"){f=false}if(c&&f){b=tinyMCE.activeEditor;if(b.plugins.spellchecker&&b.plugins.spellchecker.active){f=false}else{if("mce_fullscreen"==b.id||"wp_mce_fullscreen"==b.id){tinyMCE.get("content").setContent(b.getContent({format:"raw"}),{format:"raw"})}tinyMCE.triggerSave()}}if(wp_fullscreen_enabled){d.post_title=jQuery("#wp-fullscreen-title").val();d.content=jQuery("#wp_mce_fullscreen").val()}else{d.post_title=jQuery("#title").val();d.content=jQuery("#content").val()}if(jQuery("#post_name").val()){d.post_name=jQuery("#post_name").val()}if((d.post_title.length==0&&d.content.length==0)||d.post_title+d.content==autosaveLast){f=false}e=jQuery("#original_post_status").val();goodcats=([]);jQuery("[name='post_category[]']:checked").each(function(g){goodcats.push(this.value)});d.catslist=goodcats.join(",");if(jQuery("#comment_status").attr("checked")){d.comment_status="open"}if(jQuery("#ping_status").attr("checked")){d.ping_status="open"}if(jQuery("#excerpt").size()){d.excerpt=jQuery("#excerpt").val()}if(jQuery("#post_author").size()){d.post_author=jQuery("#post_author").val()}if(jQuery("#parent_id").val()){d.parent_id=jQuery("#parent_id").val()}d.user_ID=jQuery("#user-id").val();if(jQuery("#auto_draft").val()=="1"){d.auto_draft="1"}if(f){autosaveLast=d.post_title+d.content}else{d.autosave=0}if(d.auto_draft=="1"){a=autosave_saved_new}else{a=autosave_saved}autosaveOldMessage=jQuery("#autosave").html();jQuery.ajax({data:d,beforeSend:f?autosave_loading:null,type:"POST",url:autosaveL10n.requestFile,success:a})};
</del><span class="cx">\ No newline at end of file
</span><ins>+var autosave,autosaveLast="",autosavePeriodical,autosaveOldMessage="",autosaveDelayPreview=false,notSaved=true,blockSave=false,fullscreen;jQuery(document).ready(function(b){var a=true;autosaveLast=b("#post #title").val()+b("#post #content").val();autosavePeriodical=b.schedule({time:autosaveL10n.autosaveInterval*1000,func:function(){autosave()},repeat:true,protect:true});b("#post").submit(function(){b.cancel(autosavePeriodical)});b('input[type="submit"], a.submitdelete',"#submitpost").click(function(){blockSave=true;window.onbeforeunload=null;b(":button, :submit","#submitpost").each(function(){var c=b(this);if(c.hasClass("button-primary")){c.addClass("button-primary-disabled")}else{c.addClass("button-disabled")}});if(b(this).attr("id")=="publish"){b("#ajax-loading").css("visibility","visible")}else{b("#draft-ajax-loading").css("visibility","visible")}});window.onbeforeunload=function(){var c=typeof(tinyMCE)!="undefined"?tinyMCE.activeEditor:false,e,d;if(c&&!c.isHidden()){if(c.isDirty()){return autosaveL10n.saveAlert}}else{if(fullscreen&&fullscreen.visible){e=b("#wp-fullscreen-title").val();d=b("#wp_mce_fullscreen").val()}else{e=b("#post #title").val();d=b("#post #content").val()}if((e||d)&&e+d!=autosaveLast){return autosaveL10n.saveAlert}}};b("#post-preview").click(function(){if(b("#auto_draft").val()=="1"&&notSaved){autosaveDelayPreview=true;autosave();return false}doPreview();return false});doPreview=function(){b("input#wp-preview").val("dopreview");b("form#post").attr("target","wp-preview").submit().attr("target","");b("input#wp-preview").val("")};if(typeof tinyMCE!="undefined"){b("#title")[b.browser.opera?"keypress":"keydown"](function(c){if(c.which==9&&!c.shiftKey&&!c.controlKey&&!c.altKey){if((b("#auto_draft").val()=="1")&&(b("#title").val().length>0)){autosave()}if(tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&a){c.preventDefault();a=false;tinyMCE.activeEditor.focus();return false}}})}if("1"==b("#auto_draft").val()){b("#title").blur(function(){if(!this.value||b("#auto_draft").val()!="1"){return}delayed_autosave()})}});function autosave_parse_response(c){var d=wpAjax.parseAjaxResponse(c,"autosave"),e="",a,b;if(d&&d.responses&&d.responses.length){e=d.responses[0].data;if(d.responses[0].supplemental){b=d.responses[0].supplemental;if("disable"==b.disable_autosave){autosave=function(){};d={errors:true}}if(b.alert){jQuery("#autosave-alert").remove();jQuery("#titlediv").after('<div id="autosave-alert" class="error below-h2"><p>'+b.alert+"</p></div>");alert(jQuery("#autosave-alert").text())}jQuery.each(b,function(f,g){if(f.match(/^replace-/)){jQuery("#"+f.replace("replace-","")).val(g)}})}if(!d.errors){a=parseInt(d.responses[0].id,10);if(!isNaN(a)&&a>0){autosave_update_slug(a)}}}if(e){jQuery(".autosave-message").html(e)}else{if(autosaveOldMessage&&d){jQuery(".autosave-message").html(autosaveOldMessage)}}return d}function autosave_saved(a){blockSave=false;autosave_parse_response(a);autosave_enable_buttons()}function autosave_saved_new(b){blockSave=false;var c=autosave_parse_response(b),a;if(c&&c.responses.length&&!c.errors){a=parseInt(c.responses[0].id,10);if(!isNaN(a)&&a>0){notSaved=false;jQuery("#auto_draft").val("0")}autosave_enable_buttons();if(autosaveDelayPreview){autosaveDelayPreview=false;doPreview()}}else{autosave_enable_buttons()}}function autosave_update_slug(a){if("undefined"!=makeSlugeditClickable&&jQuery.isFunction(makeSlugeditClickable)&&!jQuery("#edit-slug-box > *").size()){jQuery.post(ajaxurl,{action:"sample-permalink",post_id:a,new_title:fullscreen&&fullscreen.visible?jQuery("#wp-fullscreen-title").val():jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(b){if(b!=="-1"){jQuery("#edit-slug-box").html(b);makeSlugeditClickable()}})}}function autosave_loading(){jQuery(".autosave-message").html(autosaveL10n.savingText)}function autosave_enable_buttons(){setTimeout(function(){jQuery(":button, :submit","#submitpost").removeAttr("disabled");jQuery(".ajax-loading").css("visibility","hidden")},500)}function autosave_disable_buttons(){jQuery(":button, :submit","#submitpost").attr("disabled","disabled");setTimeout(autosave_enable_buttons,5000)}function delayed_autosave(){setTimeout(function(){if(blockSave){return}autosave()},200)}autosave=function(){blockSave=true;var c=(typeof tinyMCE!="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden(),d,f,b,e,a;autosave_disable_buttons();d={action:"autosave",post_ID:jQuery("#post_ID").val()||0,autosavenonce:jQuery("#autosavenonce").val(),post_type:jQuery("#post_type").val()||"",autosave:1};jQuery(".tags-input").each(function(){d[this.name]=this.value});f=true;if(jQuery("#TB_window").css("display")=="block"){f=false}if(c&&f){b=tinyMCE.activeEditor;if(b.plugins.spellchecker&&b.plugins.spellchecker.active){f=false}else{if("mce_fullscreen"==b.id||"wp_mce_fullscreen"==b.id){tinyMCE.get("content").setContent(b.getContent({format:"raw"}),{format:"raw"})}tinyMCE.triggerSave()}}if(fullscreen&&fullscreen.visible){d.post_title=jQuery("#wp-fullscreen-title").val();d.content=jQuery("#wp_mce_fullscreen").val()}else{d.post_title=jQuery("#title").val();d.content=jQuery("#content").val()}if(jQuery("#post_name").val()){d.post_name=jQuery("#post_name").val()}if((d.post_title.length==0&&d.content.length==0)||d.post_title+d.content==autosaveLast){f=false}e=jQuery("#original_post_status").val();goodcats=([]);jQuery("[name='post_category[]']:checked").each(function(g){goodcats.push(this.value)});d.catslist=goodcats.join(",");if(jQuery("#comment_status").attr("checked")){d.comment_status="open"}if(jQuery("#ping_status").attr("checked")){d.ping_status="open"}if(jQuery("#excerpt").size()){d.excerpt=jQuery("#excerpt").val()}if(jQuery("#post_author").size()){d.post_author=jQuery("#post_author").val()}if(jQuery("#parent_id").val()){d.parent_id=jQuery("#parent_id").val()}d.user_ID=jQuery("#user-id").val();if(jQuery("#auto_draft").val()=="1"){d.auto_draft="1"}if(f){autosaveLast=d.post_title+d.content}else{d.autosave=0}if(d.auto_draft=="1"){a=autosave_saved_new}else{a=autosave_saved}autosaveOldMessage=jQuery("#autosave").html();jQuery.ajax({data:d,beforeSend:f?autosave_loading:null,type:"POST",url:autosaveL10n.requestFile,success:a})};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (17701 => 17702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-04-25 22:49:22 UTC (rev 17701)
+++ trunk/wp-includes/script-loader.php        2011-04-26 01:19:26 UTC (rev 17702)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">         $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411' );
</span><span class="cx">         $scripts->add_data( 'editor', 'group', 1 );
</span><span class="cx">         
</span><del>-        $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110424' );
</del><ins>+        $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110425' );
</ins><span class="cx">         $scripts->add_data( 'wp-fullscreen', 'group', 1 );
</span><span class="cx">
</span><span class="cx">         $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">                 'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
</span><span class="cx">         ) );
</span><span class="cx">
</span><del>-        $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110424' );
</del><ins>+        $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110425' );
</ins><span class="cx">         $scripts->add_data( 'autosave', 'group', 1 );
</span><span class="cx">
</span><span class="cx">         $scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20101222' );
</span></span></pre>
</div>
</div>
</body>
</html>