<!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" />
<title>[26402] trunk/src: Clean up the sticky menu and responsive tweaks JS:</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/26402">26402</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2013-11-26 08:56:11 +0000 (Tue, 26 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up the sticky menu and responsive tweaks JS:
- More descriptive names.
- Share cached jQuery elements.
- Fix re-enabling of touch events on the admin menu.
- Fix disabling/enabling of UI Sortable.
Props tollmanz, props sanchothefat, see <a href="http://core.trac.wordpress.org/ticket/26086">#26086</a>, fixes <a href="http://core.trac.wordpress.org/ticket/26088">#26088</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscolorschemes_adminscss">trunk/src/wp-admin/css/color-schemes/_admin.scss</a></li>
<li><a href="#trunksrcwpadmincsswpadmincss">trunk/src/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunksrcwpadminjscommonjs">trunk/src/wp-admin/js/common.js</a></li>
<li><a href="#trunksrcwpincludesadminbarphp">trunk/src/wp-includes/admin-bar.php</a></li>
<li><a href="#trunksrcwpincludescssadminbarcss">trunk/src/wp-includes/css/admin-bar.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscolorschemes_adminscss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/color-schemes/_admin.scss (26401 => 26402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/color-schemes/_admin.scss 2013-11-26 08:11:33 UTC (rev 26401)
+++ trunk/src/wp-admin/css/color-schemes/_admin.scss    2013-11-26 08:56:11 UTC (rev 26402)
</span><span class="lines">@@ -384,11 +384,11 @@
</span><span class="cx"> 
</span><span class="cx"> /* Responsive Component */
</span><span class="cx"> 
</span><del>-div#moby6-toggle a:before {
</del><ins>+div#wp-responsive-toggle a:before {
</ins><span class="cx">   color: $menu-icon;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.moby6-open div#moby6-toggle a {
</del><ins>+.wp-responsive-open div#wp-responsive-toggle a {
</ins><span class="cx">   // ToDo: make inset border
</span><span class="cx">  border-color: transparent;
</span><span class="cx">  background: $menu-highlight-background;
</span></span></pre></div>
<a id="trunksrcwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/wp-admin.css (26401 => 26402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/wp-admin.css      2013-11-26 08:11:33 UTC (rev 26401)
+++ trunk/src/wp-admin/css/wp-admin.css 2013-11-26 08:56:11 UTC (rev 26402)
</span><span class="lines">@@ -10600,7 +10600,7 @@
</span><span class="cx">  margin: 16px 0 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-li#wp-admin-bar-toggle-button {
</del><ins>+li#wp-admin-bar-menu-toggle {
</ins><span class="cx">   display: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -11098,7 +11098,7 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  /*  Sidebar Toggle */
</span><del>-       #moby6-toggle {
</del><ins>+        #wp-responsive-toggle {
</ins><span class="cx">           position: fixed;
</span><span class="cx">          top: 5px;
</span><span class="cx">          left: 4px;
</span><span class="lines">@@ -11113,16 +11113,16 @@
</span><span class="cx">          margin-top: -2px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .moby6-open #wpadminbar #wp-admin-bar-toggle-button a {
</del><ins>+        .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a {
</ins><span class="cx">           background: #000;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .moby6-open #wpbody {
</del><ins>+        .wp-responsive-open #wpbody {
</ins><span class="cx">           right: -190px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .auto-fold .moby6-open #adminmenuback,
-       .auto-fold .moby6-open #adminmenuwrap {
</del><ins>+        .auto-fold .wp-responsive-open #adminmenuback,
+       .auto-fold .wp-responsive-open #adminmenuwrap {
</ins><span class="cx">           left: 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="lines">@@ -12138,7 +12138,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @media screen and ( max-width: 782px ) {
</span><del>-       #wpadminbar #wp-admin-bar-toggle-button a {
</del><ins>+        #wpadminbar #wp-admin-bar-menu-toggle a {
</ins><span class="cx">           display: block;
</span><span class="cx">          padding: 0;
</span><span class="cx">          overflow: hidden;
</span><span class="lines">@@ -12150,15 +12150,15 @@
</span><span class="cx">          margin-left: -1px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       li#wp-admin-bar-toggle-button {
</del><ins>+        li#wp-admin-bar-menu-toggle {
</ins><span class="cx">           display: block;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       #wpadminbar #wp-admin-bar-toggle-button a:hover {
</del><ins>+        #wpadminbar #wp-admin-bar-menu-toggle a:hover {
</ins><span class="cx">           border: 1px solid transparent;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       #wpadminbar #wp-admin-bar-toggle-button .ab-icon:before {
</del><ins>+        #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before {
</ins><span class="cx">           content: '\f228';
</span><span class="cx">          display: inline-block;
</span><span class="cx">          float: left;
</span><span class="lines">@@ -12193,7 +12193,7 @@
</span><span class="cx">          top: 46px;
</span><span class="cx">  }
</span><span class="cx">  
</span><del>-       #moby6-overlay {
</del><ins>+        #wp-responsive-overlay {
</ins><span class="cx">           position: fixed;
</span><span class="cx">          top: 0;
</span><span class="cx">          left: 0;
</span></span></pre></div>
<a id="trunksrcwpadminjscommonjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/common.js (26401 => 26402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/common.js  2013-11-26 08:11:33 UTC (rev 26401)
+++ trunk/src/wp-admin/js/common.js     2013-11-26 08:56:11 UTC (rev 26402)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, toggleWithKeyboard, pagenow */
</span><del>-var showNotice, adminMenu, columns, validateForm, screenMeta, stickyMenu;
-(function($){
</del><ins>+var showNotice, adminMenu, columns, validateForm, screenMeta;
+( function( $, window, undefined ) {
</ins><span class="cx"> // Removed in 3.3.
</span><span class="cx"> // (perhaps) needed for back-compat
</span><span class="cx"> adminMenu = {
</span><span class="lines">@@ -217,13 +217,22 @@
</span><span class="cx"> 
</span><span class="cx">          // close any open submenus when touch/click is not on the menu
</span><span class="cx">          $(document.body).on( mobileEvent+'.wp-mobile-hover', function(e) {
</span><del>-                       if ( !$(e.target).closest('#adminmenu').length )
</del><ins>+                        if ( menu.data('wp-responsive') ) {
+                               return;
+                       }
+
+                       if ( ! $(e.target).closest('#adminmenu').length ) {
</ins><span class="cx">                           menu.find('li.wp-has-submenu.opensub').removeClass('opensub');
</span><ins>+                       }
</ins><span class="cx">           });
</span><span class="cx"> 
</span><span class="cx">          menu.find('a.wp-has-submenu').on( mobileEvent+'.wp-mobile-hover', function(e) {
</span><span class="cx">                  var el = $(this), parent = el.parent();
</span><span class="cx"> 
</span><ins>+                       if ( menu.data('wp-responsive') ) {
+                               return;
+                       }
+
</ins><span class="cx">                   // Show the sub instead of following the link if:
</span><span class="cx">                  //      - the submenu is not open
</span><span class="cx">                  //      - the submenu is not shown inline or the menu is not folded
</span><span class="lines">@@ -447,249 +456,212 @@
</span><span class="cx">  })();
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-stickyMenu = {
-       active: false,
</del><ins>+// Fire a custom jQuery event at the end of window resize
+( function() {
+       var timeout;
</ins><span class="cx"> 
</span><del>-       init: function () {
-               this.$window = $( window );
-               this.$body = $( document.body );
-               this.$adminMenuWrap = $( '#adminmenuwrap' );
-               this.$collapseMenu = $( '#collapse-menu' );
-               this.bodyMinWidth = parseInt( this.$body.css( 'min-width' ), 10 );
-               this.enable();
-       },
</del><ins>+        function triggerEvent() {
+               $(document).trigger( 'wp-window-resized' );
+       }
</ins><span class="cx"> 
</span><del>-       enable: function () {
-               if ( ! this.active ) {
-                       this.$window.on( 'resize.stickyMenu scroll.stickyMenu', this.debounce(
-                               $.proxy( this.update, this ), 200
-                       ) );
-                       this.$collapseMenu.on( 'click.stickyMenu', $.proxy( this.update, this ) );
-                       this.update();
-                       this.active = true;
-               }
-       },
</del><ins>+        function fireOnce() {
+               window.clearTimeout( timeout );
+               timeout = window.setTimeout( triggerEvent, 200 );
+       }
</ins><span class="cx"> 
</span><del>-       disable: function () {
-               if ( this.active ) {
-                       this.$window.off( 'resize.stickyMenu scroll.stickyMenu' );
-                       this.$collapseMenu.off( 'click.stickyMenu' );
-                       this.$body.removeClass( 'sticky-menu' );
-                       this.active = false;
-               }
-       },
</del><ins>+        $(window).on( 'resize.wp-fire-once', fireOnce );
+}());
</ins><span class="cx"> 
</span><del>-       update: function () {
-               // Make the admin menu sticky if both of the following:
-               // 1. The viewport is taller than the admin menu
-               // 2. The viewport is wider than the min-width of the <body>
-               if ( this.$window.height() > this.$adminMenuWrap.height() + 32 && this.$window.width() > this.bodyMinWidth) {
-                       if ( ! this.$body.hasClass( 'sticky-menu' ) ) {
-                               this.$body.addClass( 'sticky-menu' );
</del><ins>+$(document).ready( function() {
+       var $document = $( document ),
+               $window = $( window ),
+               $body = $( document.body ),
+               $adminMenuWrap = $( '#adminmenuwrap' ),
+               $collapseMenu = $( '#collapse-menu' ),
+               $wpwrap = $( '#wpwrap' ),
+               $adminmenu = $( '#adminmenu' ),
+               $overlay = $( '#wp-responsive-overlay' ),
+               $toolbar = $( '#wp-toolbar' ),
+               $toolbarPopups = $toolbar.find( 'a[aria-haspopup="true"]' ),
+               $sortables = $('.meta-box-sortables'),
+               stickyMenuActive = false,
+               wpResponsiveActive = false;
+
+       window.stickyMenu = {
+               enable: function() {
+                       if ( ! stickyMenuActive ) {
+                               $document.on( 'wp-window-resized.sticky-menu', $.proxy( this.update, this ) );
+                               $collapseMenu.on( 'click.sticky-menu', $.proxy( this.update, this ) );
+                               this.update();
+                               stickyMenuActive = true;
</ins><span class="cx">                   }
</span><del>-               } else {
-                       if ( this.$body.hasClass( 'sticky-menu' ) ) {
-                               this.$body.removeClass( 'sticky-menu' );
</del><ins>+                },
+
+               disable: function() {
+                       if ( stickyMenuActive ) {
+                               $window.off( 'resize.sticky-menu' );
+                               $collapseMenu.off( 'click.sticky-menu' );
+                               $body.removeClass( 'sticky-menu' );
+                               stickyMenuActive = false;
</ins><span class="cx">                   }
</span><del>-               }
-       },
</del><ins>+                },
</ins><span class="cx"> 
</span><del>-       // Borrowed from Underscore.js
-       debounce: function( func, wait, immediate ) {
-               var timeout, args, context, timestamp, result;
-               return function() {
-                       var later, callNow;
-                       context = this;
-                       args = arguments;
-                       timestamp = new Date().getTime();
-                       later = function() {
-                               var last = new Date().getTime() - timestamp;
-                               if ( last < wait ) {
-                                       timeout = setTimeout( later, wait - last );
-                               } else {
-                                       timeout = null;
-                                       if ( ! immediate ) {
-                                               result = func.apply( context, args );
-                                               context = args = null;
-                                       }
</del><ins>+                update: function() {
+                       // Make the admin menu sticky if the viewport is taller than it
+                       if ( $window.height() > $adminMenuWrap.height() + 32 ) {
+                               if ( ! $body.hasClass( 'sticky-menu' ) ) {
+                                       $body.addClass( 'sticky-menu' );
</ins><span class="cx">                           }
</span><del>-                       };
-                       callNow = immediate && !timeout;
-                       if ( ! timeout ) {
-                               timeout = setTimeout( later, wait );
</del><ins>+                        } else {
+                               if ( $body.hasClass( 'sticky-menu' ) ) {
+                                       $body.removeClass( 'sticky-menu' );
+                               }
</ins><span class="cx">                   }
</span><del>-                       if ( callNow ) {
-                               result = func.apply( context, args );
-                               context = args = null;
-                       }
</del><ins>+                }
+       };
</ins><span class="cx"> 
</span><del>-                       return result;
-               };
-       }
-};
</del><ins>+        window.wpResponsive = {
+               init: function() {
+                       var self = this,
+                               scrollStart = 0;
</ins><span class="cx"> 
</span><del>-stickyMenu.init();
</del><ins>+                        // Modify functionality based on custom activate/deactivate event
+                       $document.on( 'wp-responsive-activate.wp-responsive', function() {
+                               self.activate();
+                       }).on( 'wp-responsive-deactivate.wp-responsive', function() {
+                               self.deactivate();
+                       });
</ins><span class="cx"> 
</span><del>-var moby6 = {
</del><ins>+                        // Toggle sidebar when toggle is clicked
+                       $( '#wp-admin-bar-menu-toggle' ).on( 'click.wp-responsive', function( event ) {
+                               event.preventDefault();
+                               $wpwrap.toggleClass( 'wp-responsive-open' );
+                       } );
</ins><span class="cx"> 
</span><del>-       init: function() {
-               // cached selectors
-               this.$html = $( document.documentElement );
-               this.$body = $( document.body );
-               this.$wpwrap = $( '#wpwrap' );
-               this.$wpbody = $( '#wpbody' );
-               this.$adminmenu = $( '#adminmenu' );
-               this.$overlay = $( '#moby6-overlay' );
-               this.$toolbar = $( '#wp-toolbar' );
-               this.$toolbarPopups = this.$toolbar.find( 'a[aria-haspopup="true"]' );
</del><ins>+                        // Add menu events
+                       $adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() {
+                               scrollStart = $window.scrollTop();
+                       }).on( 'touchend.wp-responsive', 'li.wp-has-submenu > a', function( event ) {
+                               if ( ! $adminmenu.data('wp-responsive') || $window.scrollTop() !== scrollStart ) {
+                                       return;
+                               }
</ins><span class="cx"> 
</span><del>-               // Modify functionality based on custom activate/deactivate event
-               this.$html
-                       .on( 'activate.moby6', function() { moby6.activate(); } )
-                       .on( 'deactivate.moby6', function() { moby6.deactivate(); } );
</del><ins>+                                $( this ).find( 'li.wp-has-submenu' ).removeClass( 'selected' );
+                               $( this ).parent( 'li' ).addClass( 'selected' );
+                               event.preventDefault();
+                       });
</ins><span class="cx"> 
</span><del>-               // Toggle sidebar when toggle is clicked
-               $( '#wp-admin-bar-toggle-button' ).on( 'click', function(evt) {
-                       evt.preventDefault();
-                       moby6.$wpwrap.toggleClass( 'moby6-open' );
-               } );
</del><ins>+                        self.trigger();
+                       $document.on( 'wp-window-resized.wp-responsive', $.proxy( this.trigger, this ) );
+               },
</ins><span class="cx"> 
</span><del>-               // Trigger custom events based on active media query.
-               this.matchMedia();
-               $( window ).on( 'resize', $.proxy( this.matchMedia, this ) );
-       },
</del><ins>+                activate: function() {
+                       window.stickyMenu.disable();
</ins><span class="cx"> 
</span><del>-       activate: function() {
</del><ins>+                        if ( ! $body.hasClass( 'auto-fold' ) ) {
+                               $body.addClass( 'auto-fold' );
+                       }
</ins><span class="cx"> 
</span><del>-               window.stickymenu && window.stickymenu.disable();
</del><ins>+                        $adminmenu.data( 'wp-responsive', 1 );
+                       this.disableSortables();
+                       this.movePostSearch();
+               },
</ins><span class="cx"> 
</span><del>-               if ( ! moby6.$body.hasClass( 'auto-fold' ) )
-                       moby6.$body.addClass( 'auto-fold' );
</del><ins>+                deactivate: function() {
+                       window.stickyMenu.enable();
+                       $adminmenu.removeData('wp-responsive');
+                       this.enableSortables();
+                       this.restorePostSearch();
+               },
</ins><span class="cx"> 
</span><del>-               this.modifySidebarEvents();
-               this.disableDraggables();
-               this.movePostSearch();
</del><ins>+                trigger: function() {
+                       var width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $window.width() : window.innerWidth;
</ins><span class="cx"> 
</span><del>-       },
-
-       deactivate: function() {
-
-               window.stickymenu && window.stickymenu.enable();
-
-               this.enableDraggables();
-               this.removeHamburgerButton();
-               this.restorePostSearch();
-
-       },
-
-       matchMedia: function() {
-               clearTimeout( this.resizeTimeout );
-               this.resizeTimeout = setTimeout( function() {
-
-                       if ( ! window.matchMedia )
-                               return;
-
-                       if ( window.matchMedia( '(max-width: 782px)' ).matches ) {
-                               if ( moby6.$html.hasClass( 'touch' ) )
-                                       return;
-                               moby6.$html.addClass( 'touch' ).trigger( 'activate.moby6' );
</del><ins>+                        if ( width <= 782 ) {
+                               if ( ! wpResponsiveActive ) {
+                                       $document.trigger( 'wp-responsive-activate' );
+                                       wpResponsiveActive = true;
+                               }
</ins><span class="cx">                   } else {
</span><del>-                               if ( ! moby6.$html.hasClass( 'touch' ) )
-                                       return;
-                               moby6.$html.removeClass( 'touch' ).trigger( 'deactivate.moby6' );
</del><ins>+                                if ( wpResponsiveActive ) {
+                                       $document.trigger( 'wp-responsive-deactivate' );
+                                       wpResponsiveActive = false;
+                               }
</ins><span class="cx">                   }
</span><span class="cx"> 
</span><del>-                       if ( window.matchMedia( '(max-width: 480px)' ).matches ) {
-                               moby6.enableOverlay();
</del><ins>+                        if ( width <= 480 ) {
+                               this.enableOverlay();
</ins><span class="cx">                   } else {
</span><del>-                               moby6.disableOverlay();
</del><ins>+                                this.disableOverlay();
</ins><span class="cx">                   }
</span><ins>+               },
</ins><span class="cx"> 
</span><del>-               }, 150 );
-       },
</del><ins>+                enableOverlay: function() {
+                       if ( $overlay.length === 0 ) {
+                               $overlay = $( '<div id="wp-responsive-overlay"></div>' )
+                                       .insertAfter( '#wpcontent' )
+                                       .hide()
+                                       .on( 'click.wp-responsive', function() {
+                                               $toolbar.find( '.menupop.hover' ).removeClass( 'hover' );
+                                               $( this ).hide();
+                                       });
+                       }
</ins><span class="cx"> 
</span><del>-       enableOverlay: function() {
-               if ( this.$overlay.length === 0 ) {
-                       this.$overlay = $( '<div id="moby6-overlay"></div>' )
-                               .insertAfter( '#wpcontent' )
-                               .hide()
-                               .on( 'click.moby6', function() {
-                                       moby6.$toolbar.find( '.menupop.hover' ).removeClass( 'hover' );
-                                       $( this ).hide();
-                               });
-               }
-               this.$toolbarPopups.on( 'click.moby6', function() {
-                       moby6.$overlay.show();
-               });
-       },
</del><ins>+                        $toolbarPopups.on( 'click.wp-responsive', function() {
+                               $overlay.show();
+                       });
+               },
</ins><span class="cx"> 
</span><del>-       disableOverlay: function() {
-               this.$toolbarPopups.off( 'click.moby6' );
-               this.$overlay.hide();
-       },
</del><ins>+                disableOverlay: function() {
+                       $toolbarPopups.off( 'click.wp-responsive' );
+                       $overlay.hide();
+               },
</ins><span class="cx"> 
</span><del>-       modifySidebarEvents: function() {
-               this.$body.off( '.wp-mobile-hover' );
-               this.$adminmenu.find( 'a.wp-has-submenu' ).off( '.wp-mobile-hover' );
</del><ins>+                disableSortables: function() {
+                       if ( $sortables.length ) {
+                               try {
+                                       $sortables.sortable('disable');
+                               } catch(e) {}
+                       }
+               },
</ins><span class="cx"> 
</span><del>-               var scrollStart = 0;
-               this.$adminmenu.on( 'touchstart.moby6', 'li.wp-has-submenu > a', function() {
-                       scrollStart = $( window ).scrollTop();
-               });
</del><ins>+                enableSortables: function() {
+                       if ( $sortables.length ) {
+                               try {
+                                       $sortables.sortable('enable');
+                               } catch(e) {}
+                       }
+               },
</ins><span class="cx"> 
</span><del>-               this.$adminmenu.on( 'touchend.moby6', 'li.wp-has-submenu > a', function( e ) {
-                       e.preventDefault();
</del><ins>+                movePostSearch: function() {
+                       this.searchBox = $( 'p.search-box' );
</ins><span class="cx"> 
</span><del>-                       if ( $( window ).scrollTop() !== scrollStart )
-                               return false;
</del><ins>+                        if ( this.searchBox.length ) {
+                               this.searchBox.hide();
</ins><span class="cx"> 
</span><del>-                       $( this ).find( 'li.wp-has-submenu' ).removeClass( 'selected' );
-                       $( this ).parent( 'li' ).addClass( 'selected' );
-               });
-       },
</del><ins>+                                if ( this.searchBoxClone === undefined ) {
+                                       this.searchBoxClone = this.searchBox.first().clone().insertAfter( 'div.tablenav.bottom' );
+                               }
</ins><span class="cx"> 
</span><del>-       disableDraggables: function() {
-               this.$wpbody
-                       .find( '.hndle' )
-                       .removeClass( 'hndle' )
-                       .addClass( 'hndle-disabled' );
-       },
</del><ins>+                                this.searchBoxClone.show();
+                       }
+               },
</ins><span class="cx"> 
</span><del>-       enableDraggables: function() {
-               this.$wpbody
-                       .find( '.hndle-disabled' )
-                       .removeClass( 'hndle-disabled' )
-                       .addClass( 'hndle' );
-       },
</del><ins>+                restorePostSearch: function() {
+                       if ( this.searchBox !== undefined ) {
+                               this.searchBox.show();
</ins><span class="cx"> 
</span><del>-       removeHamburgerButton: function() {
-               if ( this.hamburgerButtonView !== undefined )
-                       this.hamburgerButtonView.destroy();
-       },
-
-       movePostSearch: function() {
-               this.searchBox = this.$wpbody.find( 'p.search-box' );
-               if ( this.searchBox.length ) {
-                       this.searchBox.hide();
-                       if ( this.searchBoxClone === undefined ) {
-                               this.searchBoxClone = this.searchBox.first().clone().insertAfter( 'div.tablenav.bottom' );
</del><ins>+                                if ( this.searchBoxClone !== undefined ) {
+                                       this.searchBoxClone.hide();
+                               }
</ins><span class="cx">                   }
</span><del>-                       this.searchBoxClone.show();
</del><span class="cx">           }
</span><del>-       },
</del><ins>+        };
</ins><span class="cx"> 
</span><del>-       restorePostSearch: function() {
-               if ( this.searchBox !== undefined ) {
-                       this.searchBox.show();
-                       if ( this.searchBoxClone !== undefined )
-                               this.searchBoxClone.hide();
-               }
-       }
-};
</del><ins>+        window.stickyMenu.enable();
+       window.wpResponsive.init();
+});
</ins><span class="cx"> 
</span><del>-// Fire moby6.init when document is ready
-$( document ).ready( $.proxy( moby6.init, moby6 ) );
-
</del><span class="cx"> // make Windows 8 devices playing along nicely
</span><span class="cx"> (function(){
</span><span class="cx">  if ( '-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/) ) {
</span><span class="lines">@@ -712,4 +684,4 @@
</span><span class="cx">  return true;
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-})(jQuery);
</del><ins>+}( jQuery, window ));
</ins></span></pre></div>
<a id="trunksrcwpincludesadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/admin-bar.php (26401 => 26402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/admin-bar.php      2013-11-26 08:11:33 UTC (rev 26401)
+++ trunk/src/wp-includes/admin-bar.php 2013-11-26 08:56:11 UTC (rev 26402)
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx"> function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {
</span><span class="cx">  if ( is_admin() ) {
</span><span class="cx">          $wp_admin_bar->add_menu( array(
</span><del>-                       'id'    => 'toggle-button',
</del><ins>+                        'id'    => 'menu-toggle',
</ins><span class="cx">                   'title' => '<span class="ab-icon"></span>',
</span><span class="cx">                  'href'  => '#',
</span><span class="cx">                  'meta'  => array(
</span></span></pre></div>
<a id="trunksrcwpincludescssadminbarcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/css/admin-bar.css (26401 => 26402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/css/admin-bar.css  2013-11-26 08:11:33 UTC (rev 26401)
+++ trunk/src/wp-includes/css/admin-bar.css     2013-11-26 08:56:11 UTC (rev 26402)
</span><span class="lines">@@ -945,7 +945,7 @@
</span><span class="cx">          position: absolute;
</span><span class="cx">  }
</span><span class="cx">  
</span><del>-       #moby6-overlay {
</del><ins>+        #wp-responsive-overlay {
</ins><span class="cx">           position: fixed;
</span><span class="cx">          top: 0;
</span><span class="cx">          left: 0;
</span><span class="lines">@@ -979,4 +979,4 @@
</span><span class="cx">  #wpadminbar #wp-admin-bar-wp-logo {
</span><span class="cx">          display: none;
</span><span class="cx">  }
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
</ins></span></pre>
</div>
</div>

</body>
</html>