<!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>[18488] trunk/wp-includes: Admin bar: use jQuery if loaded to improve UX, fixes #18299</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, #logmsg > ol { margin-left: 0; 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/18488">18488</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-07-29 22:57:30 +0000 (Fri, 29 Jul 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Admin bar: use jQuery if loaded to improve UX, fixes <a href="http://core.trac.wordpress.org/ticket/18299">#18299</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpadminbarphp">trunk/wp-includes/class-wp-admin-bar.php</a></li>
<li><a href="#trunkwpincludescssadminbarcss">trunk/wp-includes/css/admin-bar.css</a></li>
<li><a href="#trunkwpincludescssadminbardevcss">trunk/wp-includes/css/admin-bar.dev.css</a></li>
<li><a href="#trunkwpincludesjsadminbardevjs">trunk/wp-includes/js/admin-bar.dev.js</a></li>
<li><a href="#trunkwpincludesjsadminbarjs">trunk/wp-includes/js/admin-bar.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-admin-bar.php (18487 => 18488)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-admin-bar.php        2011-07-29 21:36:45 UTC (rev 18487)
+++ trunk/wp-includes/class-wp-admin-bar.php        2011-07-29 22:57:30 UTC (rev 18488)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">
</span><span class="cx">         function render() {
</span><span class="cx">                 ?>
</span><del>-                <div id="wpadminbar">
</del><ins>+                <div id="wpadminbar" class="nojq">
</ins><span class="cx">                         <div class="quicklinks">
</span><span class="cx">                                 <ul>
</span><span class="cx">                                         <?php foreach ( (array) $this->menu as $id => $menu_item ) : ?>
</span></span></pre></div>
<a id="trunkwpincludescssadminbarcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/admin-bar.css (18487 => 18488)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/admin-bar.css        2011-07-29 21:36:45 UTC (rev 18487)
+++ trunk/wp-includes/css/admin-bar.css        2011-07-29 22:57:30 UTC (rev 18488)
</span><span class="lines">@@ -1 +1 @@
</span><del>-#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 13px/28px Arial,Helvetica,sans-serif;color:#ddd;text-shadow:#555 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;background-color:#777;background-image:-moz-linear-gradient(bottom,#666,#7f7f7f);background-image:-webkit-gradient(linear,left bottom,left top,from(#666),to(#7f7f7f));color:#ddd;font:normal 12px/28px Arial,Helvetica,sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar .quicklinks ul li{float:left;}#wpadminbar .quicklinks>ul&
gt;li>a{border-right:1px solid #686868;border-left:1px solid #808080;}#wpadminbar .quicklinks>ul>li:last-child>a{border-right:none;}#wpadminbar .quicklinks>ul>li:hover>a{border-left-color:#707070;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 .85em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{-moz-box-shadow:0 4px 8px rgba(0,0,0,0.1);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1);box-shadow:0 4px 8px rgba(0,0,0,0.1);background:#fff;background:rgba(255,255,255,0.97);display:none;position:absolute;border:1px solid #dfdfdf;border-top:none;float:none;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupo
p ul li a strong,#wpadminbar .shortlink-input{color:#555;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar .quicklinks .menupop ul li:hover>a,#wpadminbar .quicklinks .menupop ul li:hover>a span,#wpadminbar .quicklinks .menupop ul li:hover>a strong{color:#fff;text-shadow:#666 0 -1px 0;}#wpadminbar .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-28px;}#wpadminbar .quicklinks li:hover,#wpadminbar .quicklinks .selected{background:#555;background:-moz-linear-gradient(bottom,#555,#3e3e3e);background:-webkit-gradient(linear,left bottom,left top,from(#555),to(#3e3e3e));}#wpadminbar .quicklinks .menupop li:hover{background:#888;background:-moz-linear-gradient(bottom,#888,#9d9d9d);background:-webkit-gradient(linear,left bottom,left top,from(#888),to(#9d9d9d));}#wpa
dminbar .quicklinks .menupop a>span{display:inline;background:url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;padding-right:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;padding-right:1.5em;}#wpadminbar .quicklinks a span#ab-awaiting-mod,#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-awaiting-mod,#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a{border-left:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border-left:none;background:url(../images/admin-bar-sprite.png?d=11122010) top left no-repeat;}#wpadminbar
.quicklinks li#wp-admin-bar-my-account-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px 23px 0 -5px;padding:0;background:#eee;float:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul{left:30px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul{left:0;}#wpadminbar .quicklinks .menupop li a img.blavatar{vertical-align:middle;margin:0 8px 0 0;padding:0;}#wpadminbar #adminbarsearch{float:right;height:18px;padding:3px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{width:140px;height:auto;float:left;font:12px Arial,Helvetica,sans-serif;color:#555;text-shadow:0 1px 0 #fff;border:1px solid #626262;padding:2px 3px;margin:0 3px 0 0;background:#ddd;-moz-box-shadow:inset 2px 2px 1px #cdcdcd;-webkit-box-shadow:inset 2px 2px 1px #cdcdcd;box-shadow:inset 2px 2px 1px #cdcdcd;-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;border-radius:0;-moz-box-sizing:border
-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;}#wpadminbar #adminbarsearch .adminbar-button{font:bold 12px Arial,Helvetica,sans-serif;color:#444;text-shadow:0 1px 0 #eee;cursor:pointer;float:left;background:#aaa;background:-moz-linear-gradient(bottom,#aaa,#cecece);background:-webkit-gradient(linear,left bottom,left top,from(#aaa),to(#cecece));-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border:1px solid #626262;padding:2px 13px;margin:0;width:auto;height:auto;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminbarsear
ch .adminbar-button::-moz-focus-inner{border:none;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
</del><span class="cx">\ No newline at end of file
</span><ins>+#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 13px/28px Arial,Helvetica,sans-serif;color:#ddd;text-shadow:#555 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;background-color:#777;background-image:-moz-linear-gradient(bottom,#666,#7f7f7f);background-image:-webkit-gradient(linear,left bottom,left top,from(#666),to(#7f7f7f));color:#ddd;font:normal 12px/28px Arial,Helvetica,sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar .quicklinks ul li{float:left;}#wpadminbar .quicklinks>ul&
gt;li>a{border-right:1px solid #686868;border-left:1px solid #808080;}#wpadminbar .quicklinks>ul>li:last-child>a{border-right:none;}#wpadminbar .quicklinks>ul>li:hover>a{border-left-color:#707070;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 .85em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{-moz-box-shadow:0 4px 8px rgba(0,0,0,0.1);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1);box-shadow:0 4px 8px rgba(0,0,0,0.1);background:#fff;background:rgba(255,255,255,0.97);display:none;position:absolute;border:1px solid #dfdfdf;border-top:none;float:none;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupo
p ul li a strong,#wpadminbar .shortlink-input{color:#555;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar .quicklinks .menupop ul li:hover>a,#wpadminbar .quicklinks .menupop ul li:hover>a span,#wpadminbar .quicklinks .menupop ul li:hover>a strong{color:#fff;text-shadow:#666 0 -1px 0;}#wpadminbar.nojq .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-28px;}#wpadminbar .quicklinks li:hover,#wpadminbar .quicklinks .selected{background:#555;background:-moz-linear-gradient(bottom,#555,#3e3e3e);background:-webkit-gradient(linear,left bottom,left top,from(#555),to(#3e3e3e));}#wpadminbar .quicklinks .menupop li:hover{background:#888;background:-moz-linear-gradient(bottom,#888,#9d9d9d);background:-webkit-gradient(linear,left bottom,left top,from(#888),to(#9d9d9d));
}#wpadminbar .quicklinks .menupop a>span{display:inline;background:url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;padding-right:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;padding-right:1.5em;}#wpadminbar .quicklinks a span#ab-awaiting-mod,#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-awaiting-mod,#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a{border-left:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border-left:none;background:url(../images/admin-bar-sprite.png?d=11122010) top left no-repeat;}#wpadmi
nbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px 23px 0 -5px;padding:0;background:#eee;float:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul{left:30px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul{left:0;}#wpadminbar .quicklinks .menupop li a img.blavatar{vertical-align:middle;margin:0 8px 0 0;padding:0;}#wpadminbar #adminbarsearch{float:right;height:18px;padding:3px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{width:140px;height:auto;float:left;font:12px Arial,Helvetica,sans-serif;color:#555;text-shadow:0 1px 0 #fff;border:1px solid #626262;padding:2px 3px;margin:0 3px 0 0;background:#ddd;-moz-box-shadow:inset 2px 2px 1px #cdcdcd;-webkit-box-shadow:inset 2px 2px 1px #cdcdcd;box-shadow:inset 2px 2px 1px #cdcdcd;-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;border-radius:0;-moz-box-sizing:b
order-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;}#wpadminbar #adminbarsearch .adminbar-button{font:bold 12px Arial,Helvetica,sans-serif;color:#444;text-shadow:0 1px 0 #eee;cursor:pointer;float:left;background:#aaa;background:-moz-linear-gradient(bottom,#aaa,#cecece);background:-webkit-gradient(linear,left bottom,left top,from(#aaa),to(#cecece));-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;border-radius:10px;border:1px solid #626262;padding:2px 13px;margin:0;width:auto;height:auto;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminba
rsearch .adminbar-button::-moz-focus-inner{border:none;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludescssadminbardevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/admin-bar.dev.css (18487 => 18488)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/admin-bar.dev.css        2011-07-29 21:36:45 UTC (rev 18487)
+++ trunk/wp-includes/css/admin-bar.dev.css        2011-07-29 22:57:30 UTC (rev 18488)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">         text-shadow: #666 0px -1px 0px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#wpadminbar .quicklinks li:hover > ul,
</del><ins>+#wpadminbar.nojq .quicklinks li:hover > ul,
</ins><span class="cx"> #wpadminbar .quicklinks li.hover > ul {
</span><span class="cx">         display: block;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesjsadminbardevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/admin-bar.dev.js (18487 => 18488)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/admin-bar.dev.js        2011-07-29 21:36:45 UTC (rev 18487)
+++ trunk/wp-includes/js/admin-bar.dev.js        2011-07-29 22:57:30 UTC (rev 18488)
</span><span class="lines">@@ -1,140 +1,162 @@
</span><del>-(function(d, w) {
-        var addEvent = function( obj, type, fn ) {
-                if (obj.addEventListener)
-                        obj.addEventListener(type, fn, false);
-                else if (obj.attachEvent)
-                        obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);});
-        },
</del><ins>+// use jQuery and hoverIntent if loaded
+if ( typeof(jQuery) != 'undefined' ) {
+        if ( typeof(jQuery.fn.hoverIntent) == 'undefined' )
+                (function(a){a.fn.hoverIntent=function(l,j){var m={sensitivity:7,interval:100,timeout:0};m=a.extend(m,j?{over:l,out:j}:l);var o,n,h,d;var e=function(f){o=f.pageX;n=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-o)+Math.abs(d-n))<m.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return m.over.apply(f,[g])}else{h=o;d=n;f.hoverIntent_t=setTimeout(function(){c(g,f)},m.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return m.out.apply(f,[g])};var b=function(q){var f=this;var g=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(g&&g!=this){try{g=g.parentNode}catch(q){g=this}}if(g==this){if(a.browser.mozilla){if(q.type=="mouseout"){f.mtout=setTimeout(function(){k(q,f)},30)}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}}}return}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}k(q,f)}};var k=function(p,f){var g=jQuery.exten
d({},p);if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(p.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},m.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},m.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);
</ins><span class="cx">
</span><del>-        aB, hc = new RegExp('\\bhover\\b', 'g'), q = [],
-        rselected = new RegExp('\\bselected\\b', 'g'),
-
-        /**
-         * Get the timeout ID of the given element
-         */
-        getTOID = function(el) {
-                var i = q.length;
-                while( i-- )
-                        if ( q[i] && el == q[i][1] )
-                                return q[i][0];
-                return false;
-        },
-
-        addHoverClass = function(t) {
-                var i, id, inA, hovering, ul, li,
-                        ancestors = [],
-                        ancestorLength = 0;
-
-                while ( t && t != aB && t != d ) {
-                        if( 'LI' == t.nodeName.toUpperCase() ) {
-                                ancestors[ ancestors.length ] = t;
-                                id = getTOID(t);
-                                if ( id )
-                                        clearTimeout( id );
-                                t.className = t.className ? ( t.className.replace(hc, '') + ' hover' ) : 'hover';
-                                hovering = t;
</del><ins>+        jQuery(document).ready(function($){
+                $('#wpadminbar').removeClass('nojq').find('li.menupop').hoverIntent({
+                        over: function(e){
+                                $(this).addClass('hover');
+                        },
+                        out: function(e){
+                                $(this).removeClass('hover');
+                        },
+                        timeout: 200,
+                        sensitivity: 7,
+                        interval: 120
+                });
+        });
+} else {
+        (function(d, w) {
+                var addEvent = function( obj, type, fn ) {
+                        if (obj.addEventListener)
+                                obj.addEventListener(type, fn, false);
+                        else if (obj.attachEvent)
+                                obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);});
+                },
+        
+                aB, hc = new RegExp('\\bhover\\b', 'g'), q = [],
+                rselected = new RegExp('\\bselected\\b', 'g'),
+        
+                /**
+                 * Get the timeout ID of the given element
+                 */
+                getTOID = function(el) {
+                        var i = q.length;
+                        while( i-- )
+                                if ( q[i] && el == q[i][1] )
+                                        return q[i][0];
+                        return false;
+                },
+        
+                addHoverClass = function(t) {
+                        var i, id, inA, hovering, ul, li,
+                                ancestors = [],
+                                ancestorLength = 0;
+        
+                        while ( t && t != aB && t != d ) {
+                                if( 'LI' == t.nodeName.toUpperCase() ) {
+                                        ancestors[ ancestors.length ] = t;
+                                        id = getTOID(t);
+                                        if ( id )
+                                                clearTimeout( id );
+                                        t.className = t.className ? ( t.className.replace(hc, '') + ' hover' ) : 'hover';
+                                        hovering = t;
+                                }
+                                t = t.parentNode;
</ins><span class="cx">                         }
</span><del>-                        t = t.parentNode;
-                }
-
-                // Remove any selected classes.
-                if ( hovering && hovering.parentNode ) {
-                        ul = hovering.parentNode;
-                        if ( ul && 'UL' == ul.nodeName.toUpperCase() ) {
-                                i = ul.childNodes.length;
-                                while ( i-- ) {
-                                        li = ul.childNodes[i];
-                                        if ( li != hovering )
-                                                li.className = li.className ? li.className.replace( rselected, '' ) : '';
</del><ins>+        
+                        // Remove any selected classes.
+                        if ( hovering && hovering.parentNode ) {
+                                ul = hovering.parentNode;
+                                if ( ul && 'UL' == ul.nodeName.toUpperCase() ) {
+                                        i = ul.childNodes.length;
+                                        while ( i-- ) {
+                                                li = ul.childNodes[i];
+                                                if ( li != hovering )
+                                                        li.className = li.className ? li.className.replace( rselected, '' ) : '';
+                                        }
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><del>-                }
-
-                /* remove the hover class for any objects not in the immediate element's ancestry */
-                i = q.length;
-                while ( i-- ) {
-                        inA = false;
-                        ancestorLength = ancestors.length;
-                        while( ancestorLength-- ) {
-                                if ( ancestors[ ancestorLength ] == q[i][1] )
-                                        inA = true;
</del><ins>+        
+                        /* remove the hover class for any objects not in the immediate element's ancestry */
+                        i = q.length;
+                        while ( i-- ) {
+                                inA = false;
+                                ancestorLength = ancestors.length;
+                                while( ancestorLength-- ) {
+                                        if ( ancestors[ ancestorLength ] == q[i][1] )
+                                                inA = true;
+                                }
+        
+                                if ( ! inA )
+                                        q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : '';
</ins><span class="cx">                         }
</span><del>-
-                        if ( ! inA )
-                                q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : '';
-                }
-        },
-
-        removeHoverClass = function(t) {
-                while ( t && t != aB && t != d ) {
-                        if( 'LI' == t.nodeName.toUpperCase() ) {
-                                (function(t) {
-                                        var to = setTimeout(function() {
-                                                t.className = t.className ? t.className.replace(hc, '') : '';
-                                        }, 500);
-                                        q[q.length] = [to, t];
-                                })(t);
</del><ins>+                },
+        
+                removeHoverClass = function(t) {
+                        while ( t && t != aB && t != d ) {
+                                if( 'LI' == t.nodeName.toUpperCase() ) {
+                                        (function(t) {
+                                                var to = setTimeout(function() {
+                                                        t.className = t.className ? t.className.replace(hc, '') : '';
+                                                }, 500);
+                                                q[q.length] = [to, t];
+                                        })(t);
+                                }
+                                t = t.parentNode;
</ins><span class="cx">                         }
</span><del>-                        t = t.parentNode;
-                }
-        },
-
-        clickShortlink = function(e) {
-                var i, l, node,
-                        t = e.target || e.srcElement;
-
-                // Make t the shortlink menu item, or return.
-                while ( true ) {
-                        // Check if we've gone past the shortlink node,
-                        // or if the user is clicking on the input.
-                        if ( ! t || t == d || t == aB )
-                                return;
-                        // Check if we've found the shortlink node.
-                        if ( t.id && t.id == 'wp-admin-bar-get-shortlink' )
-                                break;
-                        t = t.parentNode;
-                }
-
-                // IE doesn't support preventDefault, and does support returnValue
-                if ( e.preventDefault )
-                        e.preventDefault();
-                e.returnValue = false;
-
-                if ( -1 == t.className.indexOf('selected') )
-                        t.className += ' selected';
-
-                for ( i = 0, l = t.childNodes.length; i < l; i++ ) {
-                        node = t.childNodes[i];
-                        if ( node.className && -1 != node.className.indexOf('shortlink-input') ) {
-                                node.focus();
-                                node.select();
-                                node.onblur = function() {
-                                        t.className = t.className ? t.className.replace( rselected, '' ) : '';
-                                };
-                                break;
</del><ins>+                },
+        
+                clickShortlink = function(e) {
+                        var i, l, node,
+                                t = e.target || e.srcElement;
+        
+                        // Make t the shortlink menu item, or return.
+                        while ( true ) {
+                                // Check if we've gone past the shortlink node,
+                                // or if the user is clicking on the input.
+                                if ( ! t || t == d || t == aB )
+                                        return;
+                                // Check if we've found the shortlink node.
+                                if ( t.id && t.id == 'wp-admin-bar-get-shortlink' )
+                                        break;
+                                t = t.parentNode;
</ins><span class="cx">                         }
</span><del>-                }
-                return false;
-        };
</del><ins>+        
+                        // IE doesn't support preventDefault, and does support returnValue
+                        if ( e.preventDefault )
+                                e.preventDefault();
+                        e.returnValue = false;
+        
+                        if ( -1 == t.className.indexOf('selected') )
+                                t.className += ' selected';
+        
+                        for ( i = 0, l = t.childNodes.length; i < l; i++ ) {
+                                node = t.childNodes[i];
+                                if ( node.className && -1 != node.className.indexOf('shortlink-input') ) {
+                                        node.focus();
+                                        node.select();
+                                        node.onblur = function() {
+                                                t.className = t.className ? t.className.replace( rselected, '' ) : '';
+                                        };
+                                        break;
+                                }
+                        }
+                        return false;
+                };
+        
+                addEvent(w, 'load', function() {
+                        aB = d.getElementById('wpadminbar');
+        
+                        if ( d.body && aB ) {
+                                d.body.appendChild( aB );
+        
+                                addEvent(aB, 'mouseover', function(e) {
+                                        addHoverClass( e.target || e.srcElement );
+                                });
+        
+                                addEvent(aB, 'mouseout', function(e) {
+                                        removeHoverClass( e.target || e.srcElement );
+                                });
+        
+                                addEvent(aB, 'click', clickShortlink );
+                        }
+        
+                        if ( w.location.hash )
+                                w.scrollBy(0,-32);
+                });
+        })(document, window);
</ins><span class="cx">
</span><del>-        addEvent(w, 'load', function() {
-                aB = d.getElementById('wpadminbar');
</del><ins>+}
</ins><span class="cx">
</span><del>-                if ( d.body && aB ) {
-                        d.body.appendChild( aB );
-
-                        addEvent(aB, 'mouseover', function(e) {
-                                addHoverClass( e.target || e.srcElement );
-                        });
-
-                        addEvent(aB, 'mouseout', function(e) {
-                                removeHoverClass( e.target || e.srcElement );
-                        });
-
-                        addEvent(aB, 'click', clickShortlink );
-                }
-
-                if ( w.location.hash )
-                        w.scrollBy(0,-32);
-        });
-})(document, window);
</del></span></pre></div>
<a id="trunkwpincludesjsadminbarjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/admin-bar.js (18487 => 18488)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/admin-bar.js        2011-07-29 21:36:45 UTC (rev 18487)
+++ trunk/wp-includes/js/admin-bar.js        2011-07-29 22:57:30 UTC (rev 18488)
</span><span class="lines">@@ -1 +1 @@
</span><del>-(function(i,k){var c=function(n,m,d){if(n.addEventListener){n.addEventListener(m,d,false)}else{if(n.attachEvent){n.attachEvent("on"+m,function(){return d.call(n,window.event)})}}},e,f=new RegExp("\\bhover\\b","g"),a=[],j=new RegExp("\\bselected\\b","g"),g=function(m){var d=a.length;while(d--){if(a[d]&&m==a[d][1]){return a[d][0]}}return false},h=function(s){var n,d,q,m,p,r,u=[],o=0;while(s&&s!=e&&s!=i){if("LI"==s.nodeName.toUpperCase()){u[u.length]=s;d=g(s);if(d){clearTimeout(d)}s.className=s.className?(s.className.replace(f,"")+" hover"):"hover";m=s}s=s.parentNode}if(m&&m.parentNode){p=m.parentNode;if(p&&"UL"==p.nodeName.toUpperCase()){n=p.childNodes.length;while(n--){r=p.childNodes[n];if(r!=m){r.className=r.className?r.className.replace(j,""):""}}}}n=a.length;while(n--){q=false;o=u.length;while(o--){if(u[
o]==a[n][1]){q=true}}if(!q){a[n][1].className=a[n][1].className?a[n][1].className.replace(f,""):""}}},l=function(d){while(d&&d!=e&&d!=i){if("LI"==d.nodeName.toUpperCase()){(function(m){var n=setTimeout(function(){m.className=m.className?m.className.replace(f,""):""},500);a[a.length]=[n,m]})(d)}d=d.parentNode}},b=function(p){var n,d,o,m=p.target||p.srcElement;while(true){if(!m||m==i||m==e){return}if(m.id&&m.id=="wp-admin-bar-get-shortlink"){break}m=m.parentNode}if(p.preventDefault){p.preventDefault()}p.returnValue=false;if(-1==m.className.indexOf("selected")){m.className+=" selected"}for(n=0,d=m.childNodes.length;n<d;n++){o=m.childNodes[n];if(o.className&&-1!=o.className.indexOf("shortlink-input")){o.focus();o.select();o.onblur=function(){m.className=m.className?m.className.replace(j,""):""};break}}return false};c(k,"load",
function(){e=i.getElementById("wpadminbar");if(i.body&&e){i.body.appendChild(e);c(e,"mouseover",function(d){h(d.target||d.srcElement)});c(e,"mouseout",function(d){l(d.target||d.srcElement)});c(e,"click",b)}if(k.location.hash){k.scrollBy(0,-32)}})})(document,window);
</del><span class="cx">\ No newline at end of file
</span><ins>+if(typeof(jQuery)!="undefined"){if(typeof(jQuery.fn.hoverIntent)=="undefined"){(function(b){b.fn.hoverIntent=function(p,r){var g={sensitivity:7,interval:100,timeout:0};g=b.extend(g,r?{over:p,out:r}:p);var a,f,t,v;var u=function(c){a=c.pageX;f=c.pageY};var w=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if((Math.abs(t-a)+Math.abs(v-f))<g.sensitivity){b(d).unbind("mousemove",u);d.hoverIntent_s=1;return g.over.apply(d,[c])}else{t=a;v=f;d.hoverIntent_t=setTimeout(function(){w(c,d)},g.interval)}};var s=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;return g.out.apply(d,[c])};var x=function(e){var d=this;var c=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(c&&c!=this){try{c=c.parentNode}catch(e){c=this}}if(c==this){if(b.browser.mozilla){if(e.type=="mouseout"){d.mtout=setTimeout(function(){q(e,d)},30)}else{if(d.mtout){d.mtout=clearTimeout(d.m
tout)}}}return}else{if(d.mtout){d.mtout=clearTimeout(d.mtout)}q(e,d)}};var q=function(e,d){var c=jQuery.extend({},e);if(d.hoverIntent_t){d.hoverIntent_t=clearTimeout(d.hoverIntent_t)}if(e.type=="mouseover"){t=c.pageX;v=c.pageY;b(d).bind("mousemove",u);if(d.hoverIntent_s!=1){d.hoverIntent_t=setTimeout(function(){w(c,d)},g.interval)}}else{b(d).unbind("mousemove",u);if(d.hoverIntent_s==1){d.hoverIntent_t=setTimeout(function(){s(c,d)},g.timeout)}}};return this.mouseover(x).mouseout(x)}})(jQuery)}jQuery(document).ready(function(a){a("#wpadminbar").removeClass("nojq").find("li.menupop").hoverIntent({over:function(b){a(this).addClass("hover")},out:function(b){a(this).removeClass("hover")},timeout:200,sensitivity:7,interval:120})})}else{(function(i,k){var c=function(n,m,d){if(n.addEventListener){n.addEventListener(m,d,false)}else{if(n.attachEvent){n.attachEvent("on"+m,function(){return d.call(n
,window.event)})}}},e,f=new RegExp("\\bhover\\b","g"),a=[],j=new RegExp("\\bselected\\b","g"),g=function(m){var d=a.length;while(d--){if(a[d]&&m==a[d][1]){return a[d][0]}}return false},h=function(s){var n,d,q,m,p,r,u=[],o=0;while(s&&s!=e&&s!=i){if("LI"==s.nodeName.toUpperCase()){u[u.length]=s;d=g(s);if(d){clearTimeout(d)}s.className=s.className?(s.className.replace(f,"")+" hover"):"hover";m=s}s=s.parentNode}if(m&&m.parentNode){p=m.parentNode;if(p&&"UL"==p.nodeName.toUpperCase()){n=p.childNodes.length;while(n--){r=p.childNodes[n];if(r!=m){r.className=r.className?r.className.replace(j,""):""}}}}n=a.length;while(n--){q=false;o=u.length;while(o--){if(u[o]==a[n][1]){q=true}}if(!q){a[n][1].className=a[n][1].className?a[n][1].className.replace(f,""):""}}},l=function(d){while(d&&d!=e&&d!=i){if("
LI"==d.nodeName.toUpperCase()){(function(m){var n=setTimeout(function(){m.className=m.className?m.className.replace(f,""):""},500);a[a.length]=[n,m]})(d)}d=d.parentNode}},b=function(p){var n,d,o,m=p.target||p.srcElement;while(true){if(!m||m==i||m==e){return}if(m.id&&m.id=="wp-admin-bar-get-shortlink"){break}m=m.parentNode}if(p.preventDefault){p.preventDefault()}p.returnValue=false;if(-1==m.className.indexOf("selected")){m.className+=" selected"}for(n=0,d=m.childNodes.length;n<d;n++){o=m.childNodes[n];if(o.className&&-1!=o.className.indexOf("shortlink-input")){o.focus();o.select();o.onblur=function(){m.className=m.className?m.className.replace(j,""):""};break}}return false};c(k,"load",function(){e=i.getElementById("wpadminbar");if(i.body&&e){i.body.appendChild(e);c(e,"mouseover",function(d){h(d.target||d.srcElement)});c(e,"mouseout
",function(d){l(d.target||d.srcElement)});c(e,"click",b)}if(k.location.hash){k.scrollBy(0,-32)}})})(document,window)};
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>