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

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14333">14333</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-02 18:15:41 +0000 (Sun, 02 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clarify menu creation versus save. props duck_, see <a href="http://trac.wordpress.org/ticket/13134">#13134</a>. Check in scripts for r14332, see <a href="http://trac.wordpress.org/ticket/13204">#13204</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjsnavmenujs">trunk/wp-admin/js/nav-menu.js</a></li>
<li><a href="#trunkwpadminnavmenusphp">trunk/wp-admin/nav-menus.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsnavmenujs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu.js (14332 => 14333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu.js        2010-05-02 18:12:13 UTC (rev 14332)
+++ trunk/wp-admin/js/nav-menu.js        2010-05-02 18:15:41 UTC (rev 14333)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&amp;&amp;p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&amp;&amp;r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&amp;&amp;p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=[&quot;menu-item-db-id&quot;,&quot;menu-item-object-id&quot;,&quot;menu-item-object&quot;,&quot;menu-item-parent-id&quot;,&quot;menu-item-position&quot;,&quot;menu-item-type&quot;,&quot;menu-item-append&quot;,&quot;menu-item-title&quot;,&quot;menu-item-url&quot;,&quot;menu-item-description&quot;,&quot;menu-item-attr-title&quot;,&quot;menu-item-target&quot;,&quot;menu-item-classes&quot;,&quot;menu-item-xfn&quot;],p={},r=u.getElementsByTagName(&quot;input&quot;),t=r.length,s,w=document.getElementById(&quot;nav-menu-meta-object-id&quot;).value;while(t--){s=q.length;while(s--){if(r[t]&amp;&amp;r[t].name&amp;&amp;&quot;menu-item[&quot;+v+&quot;][&quot;+q[s]+&quot;]&quot;==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName(&quot;input&quot;),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf(&quot;menu-item-parent-id[&quot;+parseInt(this.id.replace(&quot;menu-item-&quot;,&quot;&quot;),10)+&quot;]&quot;)){if(!this.parentNode.className||-1==this.parentNode.className.indexOf(&quot;sub-menu&quot;)){t[q].value=0}else{if(&quot;LI&quot;==this.parentNode.parentNode.nodeName&amp;&amp;-1!=this.parentNode.parentNode.id.indexOf(&quot;menu-item-&quot;)){s=this.parentNode.parentNode;r=s.getElementsByTagName(&quot;input&quot;);p=r.length;while(p--){if(r[p].name&amp;&amp;-1!=r[p].name.indexOf(&quot;menu-item-object-id[&quot;+parseInt(s.id.replace(&quot;menu-item-&quot;,&quot;&quot;),10)+&quot;]&quot;)){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:&quot;.menu li&quot;,tolerance:&quot;pointer&quot;,drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+&quot;-dummy-list-item&quot;),p=s.getElementsByTagName(&quot;li&quot;),r=p.length;if(!q){q=document.createElement(&quot;li&quot;);q.id=s.id+&quot;-dummy-list-item&quot;;s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById(&quot;menu-to-edit&quot;);this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById(&quot;nav-menu-meta&quot;));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles(&quot;nav-menus&quot;);columns.useCheckboxesForHidden();columns.checked=function(p){h(&quot;.field-&quot;+p).removeClass(&quot;hidden-field&quot;)};columns.unchecked=function(p){h(&quot;.field-&quot;+p).addClass(&quot;hidden-field&quot;)};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||&quot;.menu&quot;;h(&quot;.hide-column-tog&quot;).not(&quot;:checked&quot;).each(function(){h(p).find(&quot;.field-&quot;+h(this).val()).addClass(&quot;hidden-field&quot;)})},attachMenuEditListeners:function(){var p=this;h(&quot;#update-nav-menu&quot;).bind(&quot;click&quot;,function(q){if(q.target&amp;&amp;q.target.className){if(-1!=q.target.className.indexOf(&quot;item-edit&quot;)){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf(&quot;menu-delete&quot;)){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf(&quot;item-delete&quot;)){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf(&quot;item-close&quot;)){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p=&quot;label-with-default-title&quot;;h(&quot;.&quot;+p).each(function(){var u=h(this),t=u.attr(&quot;title&quot;),s=u.val();u.data(p,t);if(&quot;&quot;==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val(&quot;&quot;).removeClass(p)}}).blur(function(){var s=h(this);if(&quot;&quot;==s.val()){s.val(s.data(p)).addClass(p)}});h(&quot;input.quick-search&quot;).each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind(&quot;submit&quot;,function(s){return r.eventSubmitMetaForm.call(r,this,s)});h(q).find(&quot;input:submit&quot;).click(function(){h(this).siblings(&quot;img.waiting&quot;).show()})},attachTabsPanelListeners:function(){h(&quot;#menu-settings-column&quot;).bind(&quot;click&quot;,function(u){if(u.target&amp;&amp;u.target.className&amp;&amp;-1!=u.target.className.indexOf(&quot;nav-tab-link&quot;)){var v,q=/#(.*)$/.exec(u.target.href),t,w=getParentWrapper(u.target,&quot;inside&quot;),p=w?w.getElementsByTagName(&quot;input&quot;):[],r=p.length;while(r--){p[r].checked=false}h(&quot;.tabs-panel&quot;,w).each(function(){if(this.className){this.className=this.className.replace(&quot;tabs-panel-active&quot;,&quot;tabs-panel-inactive&quot;)}});h(&quot;.tabs&quot;,w).each(function(){this.className=this.className.replace(&quot;tabs&quot;,&quot;&quot;)});u.target.parentNode.className+=&quot; tabs&quot;;if(q&amp;&amp;q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace(&quot;tabs-panel-inactive&quot;,&quot;tabs-panel-active&quot;)}}return false}else{if(u.target&amp;&amp;u.target.className&amp;&amp;-1!=u.target.className.indexOf(&quot;select-all&quot;)){var s=/#(.*)$/.exec(u.target.href);if(s&amp;&amp;s[1]){h(&quot;#&quot;+s[1]+&quot; .tabs-panel-active input[type=checkbox]&quot;).attr(&quot;checked&quot;,&quot;checked&quot;);return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName(&quot;dl&quot;),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+&quot;?action=menu-quick-search&amp;type=&quot;+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind(&quot;blur&quot;,function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+&quot;?action=menu-quick-search&amp;type=get-post-item&amp;response-format=markup&quot;,r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&amp;&amp;q[1]){r=h(&quot;#&quot;+q[1]);if(0!=r.length){if(r.hasClass(&quot;menu-item-edit-inactive&quot;)){r.slideDown(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-inactive&quot;).addClass(&quot;menu-item-edit-active&quot;)}else{r.slideUp(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-active&quot;).addClass(&quot;menu-item-edit-inactive&quot;)}return false}}},eventOnClickCloseLink:function(p){h(p).closest(&quot;.menu-item-settings&quot;).siblings(&quot;dl&quot;).find(&quot;.item-edit&quot;).click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&amp;&amp;r[1]){s=parseInt(p.id.replace(&quot;delete-&quot;,&quot;&quot;),10);h.post(ajaxurl,{action:&quot;delete-menu-item&quot;,&quot;menu-item&quot;:s,_wpnonce:r[1]},function(t){if(&quot;1&quot;==t){q.removeMenuItem(document.getElementById(&quot;menu-item-&quot;+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=&quot; sortable-placeholder&quot;},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&amp;&amp;r.className&amp;&amp;-1!=r.className.indexOf(&quot;sortable-placeholder&quot;))){r.className=r.className.replace(/sortable-placeholder/g,&quot;&quot;)}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf(&quot;dropzone&quot;)),q=v.parentNode.getElementsByTagName(&quot;ul&quot;),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,&quot;&quot;);if(t){while(r--){if(q[r]&amp;&amp;1!=q[r].className.indexOf(&quot;sub-menu&quot;)){u=true;p=q[r]}}if(!u){p=document.createElement(&quot;ul&quot;);p.className=&quot;sub-menu&quot;;v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName(&quot;input&quot;),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;);that=this;r.action=&quot;&quot;;while(t--){if(u[t].name&amp;&amp;-1!=u[t].name.indexOf(&quot;menu-item-object-id&quot;)&amp;&amp;u[t].checked||(&quot;undefined&quot;!=typeof u[t].id&amp;&amp;&quot;custom-menu-item-url&quot;==u[t].id&amp;&amp;&quot;&quot;!=u[t].value&amp;&amp;&quot;http://&quot;!=u[t].value)){r.action=&quot;add-menu-item&quot;;x=that.processAddMenuItemResponse;v=z.exec(u[t].name);p=&quot;undefined&quot;==typeof v[1]?0:parseInt(v[1],10);y=b(p);for(s in y){r[&quot;menu-item[&quot;+p+&quot;][&quot;+s+&quot;]&quot;]=y[s]}u[t].checked=false}else{if(&quot;&quot;==r.action&amp;&amp;&quot;&quot;!=u[t].value&amp;&amp;u[t].className&amp;&amp;-1!=u[t].className.search(/quick-search\b[^-]/)){r.action=&quot;menu-quick-search&quot;;r.q=u[t].value;r[&quot;response-format&quot;]=&quot;markup&quot;;r.type=u[t].name;x=that.processQuickSearchQueryResponse}}}r.menu=q.elements.menu.value;r[&quot;menu-settings-column-nonce&quot;]=q.elements[&quot;menu-settings-column-nonce&quot;].value;h.post(ajaxurl,r,function(A){x.call(that,A,r);h(q).find(&quot;img.waiting&quot;).hide()});return false},makeListItemDraggable:function(p){h(p).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName(&quot;div&quot;),p=q.length,s=document.createElement(&quot;div&quot;);while(p--){if(q[p].className&amp;&amp;-1!=q[p].className.indexOf(&quot;dropzone&quot;)&amp;&amp;(r==q[p].parentNode)){return q[p]}}s.className=&quot;dropzone&quot;;r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+&quot;-dummy-list-item&quot;),s,r,t=document.createElement(&quot;ul&quot;);t.innerHTML=p;r=t.getElementsByTagName(&quot;li&quot;);s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h(&quot;#custom-menu-item-name&quot;).val(&quot;&quot;).blur();h(&quot;#custom-menu-item-url&quot;).val(&quot;http://&quot;)},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement(&quot;ul&quot;),p=document.getElementById(&quot;nav-menu-meta&quot;),u,x,r,z,v,w=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;),s;r=w.exec(t);if(r&amp;&amp;r[1]){v=r[1];while(p.elements[&quot;menu-item[&quot;+v+&quot;][menu-item-type]&quot;]){v--}if(v!=r[1]){t=t.replace(new RegExp(&quot;menu-item\\[&quot;+r[1]+&quot;\\]&quot;,&quot;g&quot;),&quot;menu-item[&quot;+v+&quot;]&quot;)}}q.innerHTML=t;x=q.getElementsByTagName(&quot;li&quot;);if(x[0]&amp;&amp;y.object_type){s=document.getElementById(y.object_type+&quot;-search-checklist&quot;);if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&amp;&amp;r[2]){s=document.getElementById(r[2]+&quot;-search-checklist&quot;);if(s){u=x.length;if(!u){z=document.createElement(&quot;li&quot;);z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName(&quot;input&quot;),q,p=0;for(q=0;q&lt;s.length;q++){if(s[q].name&amp;&amp;-1!=s[q].name.indexOf(&quot;menu-item-position&quot;)){s[q].value=++p}}},removeMenuItem:function(r){if(!r){return false}var s=r.getElementsByTagName(&quot;ul&quot;),q,p;if(s[0]){q=s[0].getElementsByTagName(&quot;li&quot;);for(p=0;p&lt;q.length;p++){if(q[p].id&amp;&amp;-1!=q[p].id.indexOf(&quot;menu-item-&quot;)&amp;&amp;q[p].parentNode==s[0]){r.parentNode.insertBefore(q[p],r)}}}r.className+=&quot; deleting&quot;;h(r).fadeOut(350,function(){this.parentNode.removeChild(this)});this.recalculateSortOrder(k)}}};var wpNavMenu=new WPNavMenuHandler();jQuery(function(){wpNavMenu.init()});
</del><span class="cx">\ No newline at end of file
</span><ins>+var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&amp;&amp;p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&amp;&amp;r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&amp;&amp;p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=[&quot;menu-item-db-id&quot;,&quot;menu-item-object-id&quot;,&quot;menu-item-object&quot;,&quot;menu-item-parent-id&quot;,&quot;menu-item-position&quot;,&quot;menu-item-type&quot;,&quot;menu-item-append&quot;,&quot;menu-item-title&quot;,&quot;menu-item-url&quot;,&quot;menu-item-description&quot;,&quot;menu-item-attr-title&quot;,&quot;menu-item-target&quot;,&quot;menu-item-classes&quot;,&quot;menu-item-xfn&quot;],p={},r=u.getElementsByTagName(&quot;input&quot;),t=r.length,s,w=document.getElementById(&quot;nav-menu-meta-object-id&quot;).value;while(t--){s=q.length;while(s--){if(r[t]&amp;&amp;r[t].name&amp;&amp;&quot;menu-item[&quot;+v+&quot;][&quot;+q[s]+&quot;]&quot;==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName(&quot;input&quot;),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf(&quot;menu-item-parent-id[&quot;+parseInt(this.id.replace(&quot;menu-item-&quot;,&quot;&quot;),10)+&quot;]&quot;)){if(!this.parentNode.className||-1==this.parentNode.className.indexOf(&quot;sub-menu&quot;)){t[q].value=0}else{if(&quot;LI&quot;==this.parentNode.parentNode.nodeName&amp;&amp;-1!=this.parentNode.parentNode.id.indexOf(&quot;menu-item-&quot;)){s=this.parentNode.parentNode;r=s.getElementsByTagName(&quot;input&quot;);p=r.length;while(p--){if(r[p].name&amp;&amp;-1!=r[p].name.indexOf(&quot;menu-item-object-id[&quot;+parseInt(s.id.replace(&quot;menu-item-&quot;,&quot;&quot;),10)+&quot;]&quot;)){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:&quot;.menu li&quot;,tolerance:&quot;pointer&quot;,drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+&quot;-dummy-list-item&quot;),p=s.getElementsByTagName(&quot;li&quot;),r=p.length;if(!q){q=document.createElement(&quot;li&quot;);q.id=s.id+&quot;-dummy-list-item&quot;;s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById(&quot;menu-to-edit&quot;);this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById(&quot;nav-menu-meta&quot;));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles(&quot;nav-menus&quot;);columns.useCheckboxesForHidden();columns.checked=function(p){h(&quot;.field-&quot;+p).removeClass(&quot;hidden-field&quot;)};columns.unchecked=function(p){h(&quot;.field-&quot;+p).addClass(&quot;hidden-field&quot;)};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||&quot;.menu&quot;;h(&quot;.hide-column-tog&quot;).not(&quot;:checked&quot;).each(function(){h(p).find(&quot;.field-&quot;+h(this).val()).addClass(&quot;hidden-field&quot;)})},attachMenuEditListeners:function(){var p=this;h(&quot;#update-nav-menu&quot;).bind(&quot;click&quot;,function(q){if(q.target&amp;&amp;q.target.className){if(-1!=q.target.className.indexOf(&quot;item-edit&quot;)){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf(&quot;menu-delete&quot;)){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf(&quot;item-delete&quot;)){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf(&quot;item-close&quot;)){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p=&quot;label-with-default-title&quot;;h(&quot;.&quot;+p).each(function(){var u=h(this),t=u.attr(&quot;title&quot;),s=u.val();u.data(p,t);if(&quot;&quot;==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val(&quot;&quot;).removeClass(p)}}).blur(function(){var s=h(this);if(&quot;&quot;==s.val()){s.val(s.data(p)).addClass(p)}});h(&quot;input.quick-search&quot;).each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind(&quot;submit&quot;,function(s){return r.eventSubmitMetaForm.call(r,this,s)});h(q).find(&quot;input:submit&quot;).click(function(){h(this).siblings(&quot;img.waiting&quot;).show()})},attachTabsPanelListeners:function(){h(&quot;#menu-settings-column&quot;).bind(&quot;click&quot;,function(u){if(u.target&amp;&amp;u.target.className&amp;&amp;-1!=u.target.className.indexOf(&quot;nav-tab-link&quot;)){var v,q=/#(.*)$/.exec(u.target.href),t,w=h(u.target).parents(&quot;.inside&quot;).first()[0],p=w?w.getElementsByTagName(&quot;input&quot;):[],r=p.length;while(r--){p[r].checked=false}h(&quot;.tabs-panel&quot;,w).each(function(){if(this.className){this.className=this.className.replace(&quot;tabs-panel-active&quot;,&quot;tabs-panel-inactive&quot;)}});h(&quot;.tabs&quot;,w).each(function(){this.className=this.className.replace(&quot;tabs&quot;,&quot;&quot;)});u.target.parentNode.className+=&quot; tabs&quot;;if(q&amp;&amp;q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace(&quot;tabs-panel-inactive&quot;,&quot;tabs-panel-active&quot;)}}return false}else{if(u.target&amp;&amp;u.target.className&amp;&amp;-1!=u.target.className.indexOf(&quot;select-all&quot;)){var s=/#(.*)$/.exec(u.target.href);if(s&amp;&amp;s[1]){h(&quot;#&quot;+s[1]+&quot; .tabs-panel-active input[type=checkbox]&quot;).attr(&quot;checked&quot;,&quot;checked&quot;);return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName(&quot;dl&quot;),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+&quot;?action=menu-quick-search&amp;type=&quot;+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind(&quot;blur&quot;,function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+&quot;?action=menu-quick-search&amp;type=get-post-item&amp;response-format=markup&quot;,r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&amp;&amp;q[1]){r=h(&quot;#&quot;+q[1]);if(0!=r.length){if(r.hasClass(&quot;menu-item-edit-inactive&quot;)){r.slideDown(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-inactive&quot;).addClass(&quot;menu-item-edit-active&quot;)}else{r.slideUp(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-active&quot;).addClass(&quot;menu-item-edit-inactive&quot;)}return false}}},eventOnClickCloseLink:function(p){h(p).closest(&quot;.menu-item-settings&quot;).siblings(&quot;dl&quot;).find(&quot;.item-edit&quot;).click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&amp;&amp;r[1]){s=parseInt(p.id.replace(&quot;delete-&quot;,&quot;&quot;),10);h.post(ajaxurl,{action:&quot;delete-menu-item&quot;,&quot;menu-item&quot;:s,_wpnonce:r[1]},function(t){if(&quot;1&quot;==t){q.removeMenuItem(document.getElementById(&quot;menu-item-&quot;+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=&quot; sortable-placeholder&quot;},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&amp;&amp;r.className&amp;&amp;-1!=r.className.indexOf(&quot;sortable-placeholder&quot;))){r.className=r.className.replace(/sortable-placeholder/g,&quot;&quot;)}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf(&quot;dropzone&quot;)),q=v.parentNode.getElementsByTagName(&quot;ul&quot;),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,&quot;&quot;);if(t){while(r--){if(q[r]&amp;&amp;1!=q[r].className.indexOf(&quot;sub-menu&quot;)){u=true;p=q[r]}}if(!u){p=document.createElement(&quot;ul&quot;);p.className=&quot;sub-menu&quot;;v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName(&quot;input&quot;),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;);that=this;r.action=&quot;&quot;;while(t--){if(u[t].name&amp;&amp;-1!=u[t].name.indexOf(&quot;menu-item-object-id&quot;)&amp;&amp;u[t].checked||(&quot;undefined&quot;!=typeof u[t].id&amp;&amp;&quot;custom-menu-item-url&quot;==u[t].id&amp;&amp;&quot;&quot;!=u[t].value&amp;&amp;&quot;http://&quot;!=u[t].value)){r.action=&quot;add-menu-item&quot;;x=that.processAddMenuItemResponse;v=z.exec(u[t].name);p=&quot;undefined&quot;==typeof v[1]?0:parseInt(v[1],10);y=b(p);for(s in y){r[&quot;menu-item[&quot;+p+&quot;][&quot;+s+&quot;]&quot;]=y[s]}u[t].checked=false}else{if(&quot;&quot;==r.action&amp;&amp;&quot;&quot;!=u[t].value&amp;&amp;u[t].className&amp;&amp;-1!=u[t].className.search(/quick-search\b[^-]/)){r.action=&quot;menu-quick-search&quot;;r.q=u[t].value;r[&quot;response-format&quot;]=&quot;markup&quot;;r.type=u[t].name;x=that.processQuickSearchQueryResponse}}}r.menu=q.elements.menu.value;r[&quot;menu-settings-column-nonce&quot;]=q.elements[&quot;menu-settings-column-nonce&quot;].value;h.post(ajaxurl,r,function(A){x.call(that,A,r);h(q).find(&quot;img.waiting&quot;).hide()});return false},makeListItemDraggable:function(p){h(p).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName(&quot;div&quot;),p=q.length,s=document.createElement(&quot;div&quot;);while(p--){if(q[p].className&amp;&amp;-1!=q[p].className.indexOf(&quot;dropzone&quot;)&amp;&amp;(r==q[p].parentNode)){return q[p]}}s.className=&quot;dropzone&quot;;r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+&quot;-dummy-list-item&quot;),s,r,t=document.createElement(&quot;ul&quot;);t.innerHTML=p;r=t.getElementsByTagName(&quot;li&quot;);s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h(&quot;#custom-menu-item-name&quot;).val(&quot;&quot;).blur();h(&quot;#custom-menu-item-url&quot;).val(&quot;http://&quot;)},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement(&quot;ul&quot;),p=document.getElementById(&quot;nav-menu-meta&quot;),u,x,r,z,v,w=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;),s;r=w.exec(t);if(r&amp;&amp;r[1]){v=r[1];while(p.elements[&quot;menu-item[&quot;+v+&quot;][menu-item-type]&quot;]){v--}if(v!=r[1]){t=t.replace(new RegExp(&quot;menu-item\\[&quot;+r[1]+&quot;\\]&quot;,&quot;g&quot;),&quot;menu-item[&quot;+v+&quot;]&quot;)}}q.innerHTML=t;x=q.getElementsByTagName(&quot;li&quot;);if(x[0]&amp;&amp;y.object_type){s=document.getElementById(y.object_type+&quot;-search-checklist&quot;);if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&amp;&amp;r[2]){s=document.getElementById(r[2]+&quot;-search-checklist&quot;);if(s){u=x.length;if(!u){z=document.createElement(&quot;li&quot;);z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName(&quot;input&quot;),q,p=0;for(q=0;q&lt;s.length;q++){if(s[q].name&amp;&amp;-1!=s[q].name.indexOf(&quot;menu-item-position&quot;)){s[q].value=++p}}},removeMenuItem:function(r){if(!r){return false}var s=r.getElementsByTagName(&quot;ul&quot;),q,p;if(s[0]){q=s[0].getElementsByTagName(&quot;li&quot;);for(p=0;p&lt;q.length;p++){if(q[p].id&amp;&amp;-1!=q[p].id.indexOf(&quot;menu-item-&quot;)&amp;&amp;q[p].parentNode==s[0]){r.parentNode.insertBefore(q[p],r)}}}r.className+=&quot; deleting&quot;;h(r).fadeOut(350,function(){this.parentNode.removeChild(this)});this.recalculateSortOrder(k)}}};var wpNavMenu=new WPNavMenuHandler();jQuery(function(){wpNavMenu.init()});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminnavmenusphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/nav-menus.php (14332 => 14333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/nav-menus.php        2010-05-02 18:12:13 UTC (rev 14332)
+++ trunk/wp-admin/nav-menus.php        2010-05-02 18:15:41 UTC (rev 14333)
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx">                                                                 &lt;/label&gt;
</span><span class="cx">                                                         
</span><span class="cx">                                                                 &lt;div class=&quot;publishing-action&quot;&gt;
</span><del>-                                                                        &lt;input class=&quot;button-primary&quot; name=&quot;save_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Save Menu'); ?&gt;&quot; /&gt;
</del><ins>+                                                                        &lt;input class=&quot;button-primary&quot; name=&quot;save_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php empty($nav_menu_selected_id) ? esc_attr_e('Create Menu') : esc_attr_e('Save Menu'); ?&gt;&quot; /&gt;
</ins><span class="cx">                                                                 &lt;/div&gt;&lt;!--END .publishing-action--&gt;
</span><span class="cx">                                                         
</span><span class="cx">                                                                 &lt;?php if ( ! empty( $nav_menu_selected_id ) ) : ?&gt;
</span><span class="lines">@@ -419,9 +419,9 @@
</span><span class="cx">                                                                 &lt;/ul&gt;
</span><span class="cx">                                                         &lt;?php elseif ( empty($nav_menu_selected_id) ):
</span><span class="cx">                                                                 echo '&lt;div class=&quot;post-body-plain&quot;&gt;';
</span><del>-                                                                echo '&lt;p&gt;' . __('To create a custom menu, give it a name above, then choose items like pages, categories or custom links from the left column to add to this menu.') . '&lt;/p&gt;';
-                                                                echo '&lt;p&gt;' . __('After you have added your items, drag and drop to put them in the order you want, and click each item to reveal additional configuration options.') . '&lt;/p&gt;';
-                                                                echo '&lt;p&gt;' . __('When you are finished building your custom menu, make sure you click the Save Menu button above.') . '&lt;/p&gt;';
</del><ins>+                                                                echo '&lt;p&gt;' . __('To create a custom menu, give it a name above and click Create Menu. Then choose items like pages, categories or custom links from the left column to add to this menu.') . '&lt;/p&gt;';
+                                                                echo '&lt;p&gt;' . __('After you have added your items, drag and drop to put them in the order you want. You can also click each item to reveal additional configuration options.') . '&lt;/p&gt;';
+                                                                echo '&lt;p&gt;' . __('When you have finished building your custom menu, make sure you click the Save Menu button.') . '&lt;/p&gt;';
</ins><span class="cx">                                                                 echo '&lt;p&gt;' . __('You can create multiple menus. You can also display custom menus using the new &quot;Custom Menu&quot; widget.') . '&lt;/p&gt;';
</span><span class="cx">                                                                 echo '&lt;p&gt;' . sprintf( __('For more information on this feature, see the &lt;a href=&quot;%s&quot;&gt;Custom Menus&lt;/a&gt; article in the Codex.'), _x('http://codex.wordpress.org/Custom_Menus', 'Custom Menus codex page') ) . '&lt;/p&gt;';
</span><span class="cx">                                                                 echo '&lt;/div&gt;';
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (14332 => 14333)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-05-02 18:12:13 UTC (rev 14332)
+++ trunk/wp-includes/script-loader.php        2010-05-02 18:15:41 UTC (rev 14333)
</span><span class="lines">@@ -393,7 +393,7 @@
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="cx">                 // Custom Navigation
</span><del>-                $scripts-&gt;add( 'nav-menu', &quot;/wp-admin/js/nav-menu$suffix.js&quot;, false, '20100429' );
</del><ins>+                $scripts-&gt;add( 'nav-menu', &quot;/wp-admin/js/nav-menu$suffix.js&quot;, false, '20100502' );
</ins><span class="cx">                 $scripts-&gt;localize( 'nav-menu', 'navMenuL10n', array(
</span><span class="cx">                         'custom' =&gt; _x('Custom', 'menu nav item type'),
</span><span class="cx">                         'thickbox' =&gt; _x('Edit Menu Item', 'Thickbox Title'),
</span></span></pre>
</div>
</div>

</body>
</html>