<!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>[18940] trunk: Don't move current open submenus, see #18382</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/18940">18940</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-10-11 17:59:51 +0000 (Tue, 11 Oct 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Don't move current open submenus, see <a href="http://core.trac.wordpress.org/ticket/18382">#18382</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjscommondevjs">trunk/wp-admin/js/common.dev.js</a></li>
<li><a href="#trunkwpadminjscommonjs">trunk/wp-admin/js/common.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="trunkwpadminjscommondevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/common.dev.js (18939 => 18940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/common.dev.js        2011-10-11 06:25:25 UTC (rev 18939)
+++ trunk/wp-admin/js/common.dev.js        2011-10-11 17:59:51 UTC (rev 18940)
</span><span class="lines">@@ -207,6 +207,9 @@
</span><span class="cx">                 over: function(e){
</span><span class="cx">                         var b, h, o, f, m = $(this).find('.wp-submenu');
</span><span class="cx">
</span><ins>+                        if ( !$(document.body).hasClass('folded') && $(this).hasClass('wp-menu-open') )
+                                return;
+
</ins><span class="cx">                         b = $(this).offset().top + m.height() + 1; // Bottom offset of the menu
</span><span class="cx">                         h = $('#wpwrap').height(); // Height of the entire page
</span><span class="cx">                         o = 60 + b - h;
</span></span></pre></div>
<a id="trunkwpadminjscommonjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/common.js (18939 => 18940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/common.js        2011-10-11 06:25:25 UTC (rev 18939)
+++ trunk/wp-admin/js/common.js        2011-10-11 17:59:51 UTC (rev 18940)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var showNotice,adminMenu,columns,validateForm,screenMeta,autofold_menu;(function(a){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}};columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.prop("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=funct
ion(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()};showNotice={warn:function(){var b=commonL10n.warnDelete||"";if(confirm(b)){return true}return false},note:function(b){alert(b)}};screenMeta={element:null,toggles:null,page:null,padding:null,top:null,map:{"wp-admin-bar-screen-options":&
quot;screen-options-wrap","wp-admin-bar-help":"contextual-help-wrap"},init:function(){screenMeta.element=a("#screen-meta");screenMeta.toggles=a(".screen-meta-toggle");screenMeta.page=a("#wpcontent");screenMeta.toggles.click(screenMeta.toggleEvent)},toggleEvent:function(c){var b;c.preventDefault();if(!screenMeta.map[this.id]){return}b=a("#"+screenMeta.map[this.id]);if(b.is(":visible")){screenMeta.close(b,a(this))}else{screenMeta.open(b,a(this))}},open:function(b,c){screenMeta.toggles.filter(".selected").click();c.addClass("selected");screenMeta.padding=parseInt(screenMeta.page.css("paddingTop"),10);screenMeta.top=parseInt(screenMeta.element.css("top"),10);b.show();screenMeta.refresh()},refresh:function(b,c){screenMeta.element.css({top:0});screenMeta.page.css({paddingTop:screenMeta.padding+screenMeta.element.outerHeight()})},close:function(b,c){screenMeta.element.
css({top:screenMeta.top});screenMeta.page.css({paddingTop:screenMeta.padding});b.hide();c.removeClass("selected")}};a(".contextual-help-tabs").delegate("a","click focus",function(g){var f=a(this),c,d,b;g.preventDefault();if(f.is(".active a")){return false}a(".contextual-help-tabs .active").removeClass("active");f.parent("li").addClass("active");c=a(f.attr("href"));a(".help-tab-content").not(c).removeClass("active").hide();c.addClass("active").show();d=a("#contextual-help-wrap").children();d.height("auto");b=Math.max.apply(null,a.map(d,function(e){return a(e).height()}));d.height(b);screenMeta.refresh()});a(document).ready(function(){var j=false,d,f,k,i,c=a("#adminmenu"),e=a("input.current-page"),g=e.val(),h,b=document.getElementById("ipad-viewportmeta");a("#collapse-menu",c).click(functio
n(){var l=a(document.body);if(l.hasClass("folded")){l.removeClass("folded");deleteUserSetting("mfold")}else{l.addClass("folded");setUserSetting("mfold","f")}return false});a("li.wp-has-submenu",c).hoverIntent({over:function(r){var n,p,s,q,l=a(this).find(".wp-submenu");n=a(this).offset().top+l.height()+1;p=a("#wpwrap").height();s=60+n-p;q=a(window).height()+a(window).scrollTop()-15;if(q<(n-s)){s=n-q}if(s>1){l.css({marginTop:"-"+s+"px"})}else{if(l.css("marginTop")){l.css({marginTop:""})}}l.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open")},timeout:200,sensitivity:7,interval:90});a("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");a("div.updated, div.error").not(".below-h2, .inline").insertAfter(a(&quo
t;div.wrap h2:first"));screenMeta.init();a("tbody").children().children(".check-column").find(":checkbox").click(function(l){if("undefined"==l.shiftKey){return true}if(l.shiftKey){if(!j){return true}d=a(j).closest("form").find(":checkbox");f=d.index(j);k=d.index(this);i=a(this).prop("checked");if(0<f&&0<k&&f!=k){d.slice(f,k).prop("checked",function(){if(a(this).closest("tr").is(":visible")){return i}return false})}}j=this;return true});a("thead, tfoot").find(".check-column :checkbox").click(function(n){var o=a(this).prop("checked"),m="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,l=n.shiftKey||m;a(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function()
{if(a(this).closest("tr").is(":hidden")){return false}if(l){return a(this).prop("checked")}else{if(o){return true}}return false});a(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){if(l){return false}else{if(o){return true}}return false})});a("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");a("div.default-password-nag").hide();return false});a("#newcontent").bind("keydown.wpevent_InsertTab",function(q){if(q.keyCode!=9){return true}var n=q.target,s=n.selectionStart,m=n.selectionEnd,r=n.value,l,p;try{this.lastKey=9}catch(o){}if(document.selection){n.focus();p=document.selection.createRange();p.text="\t"}else{if(s>=0){l=this.scrollTop;n.value=r.substring(0,s).concat("\t&quo
t;,r.substring(m));n.selectionStart=n.selectionEnd=s+1;this.scrollTop=l}}if(q.stopPropagation){q.stopPropagation()}if(q.preventDefault){q.preventDefault()}});a("#newcontent").bind("blur.wpevent_InsertTab",function(l){if(this.lastKey&&9==this.lastKey){this.focus()}});if(e.length){e.closest("form").submit(function(l){if(a('select[name="action"]').val()==-1&&a('select[name="action2"]').val()==-1&&e.val()==g){e.val("1")}})}a(window).bind("resize.autofold",function(){if(getUserSetting("mfold")=="f"){return}var l=a(window).width();if(l<=800){if(!h){a(document.body).addClass("folded");h=true}}else{if(h){a(document.body).removeClass("folded");h=false}}}).triggerHandler("resize");if(b){document.body.addEventListener("gesturestart",function(){if(b.content.indexOf("maximum-scale=1")!=-1){b.content="width=750px, maxim
um-scale=5, initial-scale=1"}},false);document.body.addEventListener("gestureend",function(){setTimeout(function(){if(b.content.indexOf("maximum-scale=1")==-1){b.content="width=750px, maximum-scale=1, initial-scale=1"}},2000)},false)}});a(document).bind("wp_CloseOnEscape",function(c,b){if(typeof(b.cb)!="function"){return}if(typeof(b.condition)!="function"||b.condition()){b.cb()}return true})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var showNotice,adminMenu,columns,validateForm,screenMeta,autofold_menu;(function(a){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}};columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.prop("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=funct
ion(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()};showNotice={warn:function(){var b=commonL10n.warnDelete||"";if(confirm(b)){return true}return false},note:function(b){alert(b)}};screenMeta={element:null,toggles:null,page:null,padding:null,top:null,map:{"wp-admin-bar-screen-options":&
quot;screen-options-wrap","wp-admin-bar-help":"contextual-help-wrap"},init:function(){screenMeta.element=a("#screen-meta");screenMeta.toggles=a(".screen-meta-toggle");screenMeta.page=a("#wpcontent");screenMeta.toggles.click(screenMeta.toggleEvent)},toggleEvent:function(c){var b;c.preventDefault();if(!screenMeta.map[this.id]){return}b=a("#"+screenMeta.map[this.id]);if(b.is(":visible")){screenMeta.close(b,a(this))}else{screenMeta.open(b,a(this))}},open:function(b,c){screenMeta.toggles.filter(".selected").click();c.addClass("selected");screenMeta.padding=parseInt(screenMeta.page.css("paddingTop"),10);screenMeta.top=parseInt(screenMeta.element.css("top"),10);b.show();screenMeta.refresh()},refresh:function(b,c){screenMeta.element.css({top:0});screenMeta.page.css({paddingTop:screenMeta.padding+screenMeta.element.outerHeight()})},close:function(b,c){screenMeta.element.
css({top:screenMeta.top});screenMeta.page.css({paddingTop:screenMeta.padding});b.hide();c.removeClass("selected")}};a(".contextual-help-tabs").delegate("a","click focus",function(g){var f=a(this),c,d,b;g.preventDefault();if(f.is(".active a")){return false}a(".contextual-help-tabs .active").removeClass("active");f.parent("li").addClass("active");c=a(f.attr("href"));a(".help-tab-content").not(c).removeClass("active").hide();c.addClass("active").show();d=a("#contextual-help-wrap").children();d.height("auto");b=Math.max.apply(null,a.map(d,function(e){return a(e).height()}));d.height(b);screenMeta.refresh()});a(document).ready(function(){var j=false,d,f,k,i,c=a("#adminmenu"),e=a("input.current-page"),g=e.val(),h,b=document.getElementById("ipad-viewportmeta");a("#collapse-menu",c).click(functio
n(){var l=a(document.body);if(l.hasClass("folded")){l.removeClass("folded");deleteUserSetting("mfold")}else{l.addClass("folded");setUserSetting("mfold","f")}return false});a("li.wp-has-submenu",c).hoverIntent({over:function(r){var n,p,s,q,l=a(this).find(".wp-submenu");if(!a(document.body).hasClass("folded")&&a(this).hasClass("wp-menu-open")){return}n=a(this).offset().top+l.height()+1;p=a("#wpwrap").height();s=60+n-p;q=a(window).height()+a(window).scrollTop()-15;if(q<(n-s)){s=n-q}if(s>1){l.css({marginTop:"-"+s+"px"})}else{if(l.css("marginTop")){l.css({marginTop:""})}}l.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open")},timeout:200,sensitivity:7,interval:90});a("div.wrap h2:first").nextAll("div.updated, div.error").addClass(&quo
t;below-h2");a("div.updated, div.error").not(".below-h2, .inline").insertAfter(a("div.wrap h2:first"));screenMeta.init();a("tbody").children().children(".check-column").find(":checkbox").click(function(l){if("undefined"==l.shiftKey){return true}if(l.shiftKey){if(!j){return true}d=a(j).closest("form").find(":checkbox");f=d.index(j);k=d.index(this);i=a(this).prop("checked");if(0<f&&0<k&&f!=k){d.slice(f,k).prop("checked",function(){if(a(this).closest("tr").is(":visible")){return i}return false})}}j=this;return true});a("thead, tfoot").find(".check-column :checkbox").click(function(n){var o=a(this).prop("checked"),m="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,l=n.shiftKey||m;a(this).closest("table").children("tbody").filter(":visible").
children().children(".check-column").find(":checkbox").prop("checked",function(){if(a(this).closest("tr").is(":hidden")){return false}if(l){return a(this).prop("checked")}else{if(o){return true}}return false});a(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){if(l){return false}else{if(o){return true}}return false})});a("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");a("div.default-password-nag").hide();return false});a("#newcontent").bind("keydown.wpevent_InsertTab",function(q){if(q.keyCode!=9){return true}var n=q.target,s=n.selectionStart,m=n.selectionEnd,r=n.value,l,p;try{this.lastKey=9}catch(o){}if(document.selection){n.focus();p=document.selection.crea
teRange();p.text="\t"}else{if(s>=0){l=this.scrollTop;n.value=r.substring(0,s).concat("\t",r.substring(m));n.selectionStart=n.selectionEnd=s+1;this.scrollTop=l}}if(q.stopPropagation){q.stopPropagation()}if(q.preventDefault){q.preventDefault()}});a("#newcontent").bind("blur.wpevent_InsertTab",function(l){if(this.lastKey&&9==this.lastKey){this.focus()}});if(e.length){e.closest("form").submit(function(l){if(a('select[name="action"]').val()==-1&&a('select[name="action2"]').val()==-1&&e.val()==g){e.val("1")}})}a(window).bind("resize.autofold",function(){if(getUserSetting("mfold")=="f"){return}var l=a(window).width();if(l<=800){if(!h){a(document.body).addClass("folded");h=true}}else{if(h){a(document.body).removeClass("folded");h=false}}}).triggerHandler("resize");if(b){document.body.addEventListener("gesturest
art",function(){if(b.content.indexOf("maximum-scale=1")!=-1){b.content="width=750px, maximum-scale=5, initial-scale=1"}},false);document.body.addEventListener("gestureend",function(){setTimeout(function(){if(b.content.indexOf("maximum-scale=1")==-1){b.content="width=750px, maximum-scale=1, initial-scale=1"}},2000)},false)}});a(document).bind("wp_CloseOnEscape",function(c,b){if(typeof(b.cb)!="function"){return}if(typeof(b.condition)!="function"||b.condition()){b.cb()}return true})})(jQuery);
</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 (18939 => 18940)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-10-11 06:25:25 UTC (rev 18939)
+++ trunk/wp-includes/script-loader.php        2011-10-11 17:59:51 UTC (rev 18940)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx">         $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
</span><span class="cx">
</span><del>-        $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111009', 1 );
</del><ins>+        $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111011', 1 );
</ins><span class="cx">         $scripts->add_script_data( 'common', 'commonL10n', array(
</span><span class="cx">                 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
</span><span class="cx">         ) );
</span></span></pre>
</div>
</div>
</body>
</html>