<!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>[14438] trunk/wp-admin/js: Fix 'Select All' for the new drag/drop code.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14438">14438</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-04 08:54:35 +0000 (Tue, 04 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix 'Select All' for the new drag/drop code. props koopersmith, see <a href="http://trac.wordpress.org/ticket/13220">#13220</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjsnavmenudevjs">trunk/wp-admin/js/nav-menu.dev.js</a></li>
<li><a href="#trunkwpadminjsnavmenujs">trunk/wp-admin/js/nav-menu.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsnavmenudevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu.dev.js (14437 => 14438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu.dev.js        2010-05-04 08:41:46 UTC (rev 14437)
+++ trunk/wp-admin/js/nav-menu.dev.js        2010-05-04 08:54:35 UTC (rev 14438)
</span><span class="lines">@@ -146,6 +146,27 @@
</span><span class="cx">                                 });
</span><span class="cx">                         });
</span><span class="cx">                 },
</span><ins>+                selectItem : function() {
+                        return this.each(function(){
+                                $(this).addClass('selected-menu-item')
+                                        .next().children('input').attr('checked','checked');
+                        });
+                },
+                deselectItem : function() {
+                        return this.each(function(){
+                                $(this).removeClass('selected-menu-item')
+                                        .next().children('input').removeAttr('checked');
+                        });
+                },
+                toggleItem : function() {
+                        return this.each(function(){
+                                var t = $(this);
+                                if( t.hasClass('selected-menu-item') )
+                                        t.deselectItem();
+                                else
+                                        t.selectItem();
+                        });
+                }
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         return {
</span><span class="lines">@@ -309,30 +330,6 @@
</span><span class="cx">                 },
</span><span class="cx">                 
</span><span class="cx">                 initAddMenuItemDraggables : function() {
</span><del>-                        $.fn.extend({
-                                checkItem : function() {
-                                        return this.each(function(){
-                                                $(this).addClass('selected-menu-item')
-                                                        .next().children('input').attr('checked','checked');
-                                        });
-                                },
-                                uncheckItem : function() {
-                                        return this.each(function(){
-                                                $(this).removeClass('selected-menu-item')
-                                                        .next().children('input').removeAttr('checked');
-                                        });
-                                },
-                                toggleItem : function() {
-                                        return this.each(function(){
-                                                var t = $(this);
-                                                if( t.hasClass('selected-menu-item') )
-                                                        t.uncheckItem();
-                                                else
-                                                        t.checkItem();
-                                        });
-                                }
-                        });
-                        
</del><span class="cx">                         var menuItems = $('.potential-menu-item');
</span><span class="cx">                         menuItems.click(function(e){
</span><span class="cx">                                 $(this).toggleItem();
</span><span class="lines">@@ -348,7 +345,7 @@
</span><span class="cx">                                                 items;
</span><span class="cx">                                         
</span><span class="cx">                                         // Make sure the item we're dragging is selected.
</span><del>-                                        item.checkItem();
</del><ins>+                                        item.selectItem();
</ins><span class="cx">                                         // Set us to be the ajax target
</span><span class="cx">                                         targetList = target.children('.menu-item-transport');
</span><span class="cx">                                         // Get all checked elements and assemble selected items.
</span><span class="lines">@@ -375,7 +372,7 @@
</span><span class="cx">                                 stop: function(e, ui) {
</span><span class="cx">                                         // Reset the targetList and unselect the menu items
</span><span class="cx">                                         targetList = menuList;
</span><del>-                                        menuItems.filter('.selected-menu-item').uncheckItem();
</del><ins>+                                        menuItems.filter('.selected-menu-item').deselectItem();
</ins><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx">                 },
</span><span class="lines">@@ -553,9 +550,13 @@
</span><span class="cx"> 
</span><span class="cx">                                         return false;
</span><span class="cx">                                 } else if ( e.target &amp;&amp; e.target.className &amp;&amp; -1 != e.target.className.indexOf('select-all') ) {
</span><del>-                                        var selectAreaMatch = /#(.*)$/.exec(e.target.href);
</del><ins>+                                        var selectAreaMatch = /#(.*)$/.exec(e.target.href), items;
</ins><span class="cx">                                         if ( selectAreaMatch &amp;&amp; selectAreaMatch[1] ) {
</span><del>-                                                $('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked', 'checked');
</del><ins>+                                                items = $('#' + selectAreaMatch[1] + ' .tabs-panel-active .potential-menu-item');
+                                                if( items.length === items.filter('.selected-menu-item').length )
+                                                        items.deselectItem();
+                                                else
+                                                        items.selectItem();
</ins><span class="cx">                                                 return false;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span></span></pre></div>
<a id="trunkwpadminjsnavmenujs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu.js (14437 => 14438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu.js        2010-05-04 08:41:46 UTC (rev 14437)
+++ trunk/wp-admin/js/nav-menu.js        2010-05-04 08:54:35 UTC (rev 14438)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&amp;&amp;m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&amp;&amp;o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&amp;&amp;m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=[&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;],m={},o=r.getElementsByTagName(&quot;input&quot;),q=o.length,p,t=document.getElementById(&quot;nav-menu-meta-object-id&quot;).value;while(q--){p=n.length;while(p--){if(o[q]&amp;&amp;o[q].name&amp;&amp;&quot;menu-item[&quot;+s+&quot;][&quot;+n[p]+&quot;]&quot;==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(&quot;.menu-item-data-position&quot;).val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css(&quot;margin-left&quot;).slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass(&quot;menu-item-depth-&quot;+m).addClass(&quot;menu-item-depth-&quot;+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass(&quot;menu-item-depth-&quot;+o).addClass(&quot;menu-item-depth-&quot;+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&amp;&amp;o.menuItemDepth()&gt;p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(&quot;.menu-item-data-parent-id&quot;),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(&quot;.menu-item-data-object-id&quot;).val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(&quot;.hide-column-tog&quot;).not(&quot;:checked&quot;).each(function(){m.find(&quot;.field-&quot;+d(this).val()).addClass(&quot;hidden-field&quot;)})})},});return{init:function(){g=d(&quot;#menu-to-edit&quot;);j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById(&quot;nav-menu-meta&quot;));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables()},initToggles:function(){postboxes.add_postbox_toggles(&quot;nav-menus&quot;);columns.useCheckboxesForHidden();columns.checked=function(m){d(&quot;.field-&quot;+m).removeClass(&quot;hidden-field&quot;)};columns.unchecked=function(m){d(&quot;.field-&quot;+m).addClass(&quot;hidden-field&quot;)};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:&quot;.menu-item-handle&quot;,placeholder:&quot;sortable-placeholder&quot;,start:function(C,B){var A,v,z,y,w,x;o=B.item.children(&quot;.menu-item-transport&quot;);t=(B.helper.hasClass(&quot;new-menu-item&quot;));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v&gt;0)?(B.placeholder.css(&quot;margin-top&quot;).slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D&gt;x)?D:x})}z=B.helper.find(&quot;.menu-item-handle&quot;).outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass(&quot;menu&quot;)){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x&lt;q){x=q}else{if(x&gt;m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(&quot;.menu-item-transport&quot;)}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)&gt;c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){d.fn.extend({checkItem:function(){return this.each(function(){d(this).addClass(&quot;selected-menu-item&quot;).next().children(&quot;input&quot;).attr(&quot;checked&quot;,&quot;checked&quot;)})},uncheckItem:function(){return this.each(function(){d(this).removeClass(&quot;selected-menu-item&quot;).next().children(&quot;input&quot;).removeAttr(&quot;checked&quot;)})},toggleItem:function(){return this.each(function(){var n=d(this);if(n.hasClass(&quot;selected-menu-item&quot;)){n.uncheckItem()}else{n.checkItem()}})}});var m=d(&quot;.potential-menu-item&quot;);m.click(function(n){d(this).toggleItem()}).children().draggable({helper:&quot;clone&quot;,connectToSortable:&quot;ul#menu-to-edit&quot;,distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.checkItem();j=r.children(&quot;.menu-item-transport&quot;);o=m.filter(&quot;.selected-menu-item&quot;).children().not(q.helper).clone();q.helper.children(&quot;.additional-menu-items&quot;).append(o);q.helper.addClass(&quot;new-menu-item&quot;);q.helper.children(&quot;div&quot;).hide();o.first().css(&quot;margin-top&quot;,0);o.children(&quot;div&quot;).addClass(&quot;menu-item-handle&quot;);q.helper.children(&quot;div&quot;).addClass(&quot;hidden-handle&quot;);n.parents(&quot;.inside&quot;).find(&quot;.add-to-menu input&quot;).click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;m.filter(&quot;.selected-menu-item&quot;).uncheckItem()}})},attachMenuEditListeners:function(){var m=this;d(&quot;#update-nav-menu&quot;).bind(&quot;click&quot;,function(n){if(n.target&amp;&amp;n.target.className){if(-1!=n.target.className.indexOf(&quot;item-edit&quot;)){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf(&quot;menu-delete&quot;)){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf(&quot;item-delete&quot;)){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf(&quot;item-close&quot;)){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m=&quot;input-with-default-title&quot;;d(&quot;.&quot;+m).each(function(){var p=d(this),o=p.attr(&quot;title&quot;),n=p.val();p.data(m,o);if(&quot;&quot;==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val(&quot;&quot;).removeClass(m)}}).blur(function(){var n=d(this);if(&quot;&quot;==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d(&quot;input.quick-search&quot;).each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is(&quot;input&quot;)&amp;&amp;d(p.target).hasClass(&quot;button-secondary&quot;)&amp;&amp;!d(p.target).hasClass(&quot;quick-search-submit&quot;)){if(d(o).hasClass(&quot;customlinkdiv&quot;)){n.addCustomLink()}else{if(d(o).hasClass(&quot;posttypediv&quot;)||d(o).hasClass(&quot;taxonomydiv&quot;)){n.addItemsToMenu(d(o).attr(&quot;id&quot;))}}return false}else{if(d(p.target).is(&quot;input&quot;)&amp;&amp;d(p.target).hasClass(&quot;quick-search-submit&quot;)){n.quickSearch(d(o).attr(&quot;id&quot;));return false}}})},quickSearch:function(u){var o=d(&quot;#&quot;+u+&quot; .quick-search&quot;).attr(&quot;name&quot;),r=d(&quot;#&quot;+u+&quot; .quick-search&quot;).val(),t=d(&quot;#menu&quot;).val(),n=d(&quot;#menu-settings-column-nonce&quot;).val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:&quot;menu-quick-search&quot;,&quot;response-format&quot;:&quot;markup&quot;,menu:t,&quot;menu-settings-column-nonce&quot;:n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(){var o=d(&quot;#custom-menu-item-url&quot;).val(),n=d(&quot;#custom-menu-item-name&quot;).val(),s=d(&quot;#menu&quot;).val(),p=d(&quot;#menu-settings-column-nonce&quot;).val(),r={},q=this,m=function(){};if(&quot;&quot;==o||&quot;http://&quot;==o){return false}d(&quot;.customlinkdiv img.waiting&quot;).show();r={action:&quot;add-menu-item&quot;,menu:s,&quot;menu-settings-column-nonce&quot;:p,&quot;menu-item&quot;:{&quot;-1&quot;:{&quot;menu-item-type&quot;:&quot;custom&quot;,&quot;menu-item-url&quot;:o,&quot;menu-item-title&quot;:n}}};m=q.eventAddMenuItem;d.post(ajaxurl,r,function(t){m.call(q,t,r);d(&quot;.customlinkdiv img.waiting&quot;).hide()})},attachTabsPanelListeners:function(){d(&quot;#menu-settings-column&quot;).bind(&quot;click&quot;,function(r){if(r.target&amp;&amp;r.target.className&amp;&amp;-1!=r.target.className.indexOf(&quot;nav-tab-link&quot;)){var s,n=/#(.*)$/.exec(r.target.href),q,t=d(r.target).parents(&quot;.inside&quot;).first()[0],m=t?t.getElementsByTagName(&quot;input&quot;):[],o=m.length;while(o--){m[o].checked=false}d(&quot;.tabs-panel&quot;,t).each(function(){if(this.className){this.className=this.className.replace(&quot;tabs-panel-active&quot;,&quot;tabs-panel-inactive&quot;)}});d(&quot;.tabs&quot;,t).each(function(){this.className=this.className.replace(&quot;tabs&quot;,&quot;&quot;)});r.target.parentNode.className+=&quot; tabs&quot;;if(n&amp;&amp;n[1]){s=document.getElementById(n[1]);if(s){s.className=s.className.replace(&quot;tabs-panel-inactive&quot;,&quot;tabs-panel-active&quot;)}}return false}else{if(r.target&amp;&amp;r.target.className&amp;&amp;-1!=r.target.className.indexOf(&quot;select-all&quot;)){var p=/#(.*)$/.exec(r.target.href);if(p&amp;&amp;p[1]){d(&quot;#&quot;+p[1]+&quot; .tabs-panel-active input[type=checkbox]&quot;).attr(&quot;checked&quot;,&quot;checked&quot;);return false}}}})},initTabManager:function(){var r=d(&quot;.nav-tabs-wrapper&quot;),s=r.children(&quot;.nav-tabs&quot;),q=s.children(&quot;.nav-tab-active&quot;),u=s.children(&quot;.nav-tab&quot;),o=0,v,p,t,n;resizing=false;function m(){p=r.offset().left;v=p+r.width();q.makeTabVisible()}d.fn.extend({makeTabVisible:function(){var x=this.eq(0),y,w;if(!x.length){return}y=x.offset().left;w=y+x.outerWidth();if(w&gt;v){s.animate({&quot;margin-left&quot;:&quot;+=&quot;+(v-w)+&quot;px&quot;,},&quot;fast&quot;)}else{if(y&lt;p){s.animate({&quot;margin-left&quot;:&quot;-=&quot;+(y-p)+&quot;px&quot;,},&quot;fast&quot;)}}return x},isTabVisible:function(){var x=this.eq(0),y=x.offset().left,w=y+x.outerWidth();return(w&lt;=v&amp;&amp;y&gt;=p)?true:false}});u.each(function(){o+=d(this).outerWidth(true)});if(o&lt;=r.width()-s.css(&quot;padding-left&quot;).slice(0,-2)-s.css(&quot;padding-right&quot;).slice(0,-2)){return}s.css({&quot;margin-right&quot;:(-1*o)+&quot;px&quot;,padding:0,});t=d('&lt;div class=&quot;nav-tabs-arrow nav-tabs-arrow-left&quot;&gt;&lt;a&gt;&amp;laquo;&lt;/a&gt;&lt;/div&gt;');n=d('&lt;div class=&quot;nav-tabs-arrow nav-tabs-arrow-right&quot;&gt;&lt;a&gt;&amp;raquo;&lt;/a&gt;&lt;/div&gt;');r.wrap('&lt;div class=&quot;nav-tabs-nav&quot;/&gt;').parent().prepend(t).append(n);m();d(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){m();resizing=false},1000)});d.each([{arrow:t,next:&quot;next&quot;,last:&quot;first&quot;,operator:&quot;+=&quot;,},{arrow:n,next:&quot;prev&quot;,last:&quot;last&quot;,operator:&quot;-=&quot;,}],function(){var w=this;this.arrow.mousedown(function(){var y=u[w.last](),x=function(){if(!y.isTabVisible()){s.animate({&quot;margin-left&quot;:w.operator+&quot;90px&quot;,},300,&quot;linear&quot;,x)}};x()}).mouseup(function(){var y,x;s.stop(true);y=u[w.last]();while((x=y[w.next]())&amp;&amp;x.length&amp;&amp;!x.isTabVisible()){y=x}y.makeTabVisible()})})},setupQuickSearchEventListeners:function(m){var n=this;d(m).autocomplete(ajaxurl+&quot;?action=menu-quick-search&amp;type=&quot;+m.name,{delay:500,formatItem:k,formatResult:l,minchars:2,multiple:false}).bind(&quot;blur&quot;,function(q){var o=h[this.value],p=this;if(o){d.post(ajaxurl+&quot;?action=menu-quick-search&amp;type=get-post-item&amp;response-format=markup&quot;,o,function(s){n.processQuickSearchQueryResponse.call(n,s,o);h[p.value]=false})}})},eventOnClickEditLink:function(m){var o,n=/#(.*)$/.exec(m.href);if(n&amp;&amp;n[1]){o=d(&quot;#&quot;+n[1]);if(0!=o.length){if(o.hasClass(&quot;menu-item-edit-inactive&quot;)){o.slideDown(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-inactive&quot;).addClass(&quot;menu-item-edit-active&quot;)}else{o.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(m){d(m).closest(&quot;.menu-item-settings&quot;).siblings(&quot;dl&quot;).find(&quot;.item-edit&quot;).click();return false},eventOnClickMenuDelete:function(m){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(m){var p,o,n=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){o=/_wpnonce=([a-zA-Z0-9]*)$/.exec(m.href);if(o&amp;&amp;o[1]){p=parseInt(m.id.replace(&quot;delete-&quot;,&quot;&quot;),10);d.post(ajaxurl,{action:&quot;delete-menu-item&quot;,&quot;menu-item&quot;:p,_wpnonce:o[1]},function(q){if(&quot;1&quot;==q){n.removeMenuItem(document.getElementById(&quot;menu-item-&quot;+p))}});return false}return true}else{return false}},addItemsToMenu:function(t){var n=d(&quot;.tabs-panel-active .categorychecklist li input:checked&quot;,&quot;#&quot;+t),s=d(&quot;#menu&quot;).val(),p=d(&quot;#menu-settings-column-nonce&quot;).val(),r={},q=this,m=function(){},o=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;);m=q.eventAddMenuItem;if(!n.length){return false}d(&quot;#&quot;+t+&quot; img.waiting&quot;).show();d(n).each(function(){listItemDBIDMatch=o.exec(d(this).attr(&quot;name&quot;));listItemDBID=&quot;undefined&quot;==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);r={action:&quot;add-menu-item&quot;,menu:s,&quot;menu-settings-column-nonce&quot;:p,&quot;menu-item&quot;:{}};r[&quot;menu-item&quot;][listItemDBID]=listItemData;d.post(ajaxurl,r,function(u){m.call(q,u,r)});d(this).attr(&quot;checked&quot;,false)});d(&quot;#&quot;+t+&quot; img.waiting&quot;).hide()},eventAddMenuItem:function(m,n){d(m).hideAdvancedMenuItemFields().appendTo(j)},processQuickSearchQueryResponse:function(q,v){if(!v){v={}}var n=document.createElement(&quot;ul&quot;),m=document.getElementById(&quot;nav-menu-meta&quot;),r,u,o,w,s,t=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;),p;o=t.exec(q);if(o&amp;&amp;o[1]){s=o[1];while(m.elements[&quot;menu-item[&quot;+s+&quot;][menu-item-type]&quot;]){s--}if(s!=o[1]){q=q.replace(new RegExp(&quot;menu-item\\[&quot;+o[1]+&quot;\\]&quot;,&quot;g&quot;),&quot;menu-item[&quot;+s+&quot;]&quot;)}}n.innerHTML=q;u=n.getElementsByTagName(&quot;li&quot;);if(u[0]&amp;&amp;v.object_type){p=document.getElementById(v.object_type+&quot;-search-checklist&quot;);if(p){p.appendChild(u[0])}}else{if(v.type){o=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(v.type);if(o&amp;&amp;o[2]){p=document.getElementById(o[2]+&quot;-search-checklist&quot;);if(p){r=u.length;if(!r){w=document.createElement(&quot;li&quot;);w.appendChild(document.createTextNode(navMenuL10n.noResultsFound));p.appendChild(w)}while(r--){p.appendChild(u[r])}}}}}},removeMenuItem:function(n){n=d(n);var m=n.childMenuItems();n.addClass(&quot;deleting&quot;).fadeOut(350,function(){n.remove();m.shiftDepthClass(-1).updateParentMenuItemDBId();a()})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()});
</del><span class="cx">\ No newline at end of file
</span><ins>+var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&amp;&amp;m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&amp;&amp;o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&amp;&amp;m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=[&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;],m={},o=r.getElementsByTagName(&quot;input&quot;),q=o.length,p,t=document.getElementById(&quot;nav-menu-meta-object-id&quot;).value;while(q--){p=n.length;while(p--){if(o[q]&amp;&amp;o[q].name&amp;&amp;&quot;menu-item[&quot;+s+&quot;][&quot;+n[p]+&quot;]&quot;==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(&quot;.menu-item-data-position&quot;).val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css(&quot;margin-left&quot;).slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass(&quot;menu-item-depth-&quot;+m).addClass(&quot;menu-item-depth-&quot;+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass(&quot;menu-item-depth-&quot;+o).addClass(&quot;menu-item-depth-&quot;+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&amp;&amp;o.menuItemDepth()&gt;p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(&quot;.menu-item-data-parent-id&quot;),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(&quot;.menu-item-data-object-id&quot;).val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(&quot;.hide-column-tog&quot;).not(&quot;:checked&quot;).each(function(){m.find(&quot;.field-&quot;+d(this).val()).addClass(&quot;hidden-field&quot;)})})},selectItem:function(){return this.each(function(){d(this).addClass(&quot;selected-menu-item&quot;).next().children(&quot;input&quot;).attr(&quot;checked&quot;,&quot;checked&quot;)})},deselectItem:function(){return this.each(function(){d(this).removeClass(&quot;selected-menu-item&quot;).next().children(&quot;input&quot;).removeAttr(&quot;checked&quot;)})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass(&quot;selected-menu-item&quot;)){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d(&quot;#menu-to-edit&quot;);j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById(&quot;nav-menu-meta&quot;));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables()},initToggles:function(){postboxes.add_postbox_toggles(&quot;nav-menus&quot;);columns.useCheckboxesForHidden();columns.checked=function(m){d(&quot;.field-&quot;+m).removeClass(&quot;hidden-field&quot;)};columns.unchecked=function(m){d(&quot;.field-&quot;+m).addClass(&quot;hidden-field&quot;)};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:&quot;.menu-item-handle&quot;,placeholder:&quot;sortable-placeholder&quot;,start:function(C,B){var A,v,z,y,w,x;o=B.item.children(&quot;.menu-item-transport&quot;);t=(B.helper.hasClass(&quot;new-menu-item&quot;));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v&gt;0)?(B.placeholder.css(&quot;margin-top&quot;).slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D&gt;x)?D:x})}z=B.helper.find(&quot;.menu-item-handle&quot;).outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass(&quot;menu&quot;)){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x&lt;q){x=q}else{if(x&gt;m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(&quot;.menu-item-transport&quot;)}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)&gt;c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(&quot;.potential-menu-item&quot;);m.click(function(n){d(this).toggleItem()}).children().draggable({helper:&quot;clone&quot;,connectToSortable:&quot;ul#menu-to-edit&quot;,distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(&quot;.menu-item-transport&quot;);o=m.filter(&quot;.selected-menu-item&quot;).children().not(q.helper).clone();q.helper.children(&quot;.additional-menu-items&quot;).append(o);q.helper.addClass(&quot;new-menu-item&quot;);q.helper.children(&quot;div&quot;).hide();o.first().css(&quot;margin-top&quot;,0);o.children(&quot;div&quot;).addClass(&quot;menu-item-handle&quot;);q.helper.children(&quot;div&quot;).addClass(&quot;hidden-handle&quot;);n.parents(&quot;.inside&quot;).find(&quot;.add-to-menu input&quot;).click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;m.filter(&quot;.selected-menu-item&quot;).deselectItem()}})},attachMenuEditListeners:function(){var m=this;d(&quot;#update-nav-menu&quot;).bind(&quot;click&quot;,function(n){if(n.target&amp;&amp;n.target.className){if(-1!=n.target.className.indexOf(&quot;item-edit&quot;)){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf(&quot;menu-delete&quot;)){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf(&quot;item-delete&quot;)){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf(&quot;item-close&quot;)){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m=&quot;input-with-default-title&quot;;d(&quot;.&quot;+m).each(function(){var p=d(this),o=p.attr(&quot;title&quot;),n=p.val();p.data(m,o);if(&quot;&quot;==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val(&quot;&quot;).removeClass(m)}}).blur(function(){var n=d(this);if(&quot;&quot;==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d(&quot;input.quick-search&quot;).each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is(&quot;input&quot;)&amp;&amp;d(p.target).hasClass(&quot;button-secondary&quot;)&amp;&amp;!d(p.target).hasClass(&quot;quick-search-submit&quot;)){if(d(o).hasClass(&quot;customlinkdiv&quot;)){n.addCustomLink()}else{if(d(o).hasClass(&quot;posttypediv&quot;)||d(o).hasClass(&quot;taxonomydiv&quot;)){n.addItemsToMenu(d(o).attr(&quot;id&quot;))}}return false}else{if(d(p.target).is(&quot;input&quot;)&amp;&amp;d(p.target).hasClass(&quot;quick-search-submit&quot;)){n.quickSearch(d(o).attr(&quot;id&quot;));return false}}})},quickSearch:function(u){var o=d(&quot;#&quot;+u+&quot; .quick-search&quot;).attr(&quot;name&quot;),r=d(&quot;#&quot;+u+&quot; .quick-search&quot;).val(),t=d(&quot;#menu&quot;).val(),n=d(&quot;#menu-settings-column-nonce&quot;).val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:&quot;menu-quick-search&quot;,&quot;response-format&quot;:&quot;markup&quot;,menu:t,&quot;menu-settings-column-nonce&quot;:n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(){var o=d(&quot;#custom-menu-item-url&quot;).val(),n=d(&quot;#custom-menu-item-name&quot;).val(),s=d(&quot;#menu&quot;).val(),p=d(&quot;#menu-settings-column-nonce&quot;).val(),r={},q=this,m=function(){};if(&quot;&quot;==o||&quot;http://&quot;==o){return false}d(&quot;.customlinkdiv img.waiting&quot;).show();r={action:&quot;add-menu-item&quot;,menu:s,&quot;menu-settings-column-nonce&quot;:p,&quot;menu-item&quot;:{&quot;-1&quot;:{&quot;menu-item-type&quot;:&quot;custom&quot;,&quot;menu-item-url&quot;:o,&quot;menu-item-title&quot;:n}}};m=q.eventAddMenuItem;d.post(ajaxurl,r,function(t){m.call(q,t,r);d(&quot;.customlinkdiv img.waiting&quot;).hide()})},attachTabsPanelListeners:function(){d(&quot;#menu-settings-column&quot;).bind(&quot;click&quot;,function(r){if(r.target&amp;&amp;r.target.className&amp;&amp;-1!=r.target.className.indexOf(&quot;nav-tab-link&quot;)){var o,u=/#(.*)$/.exec(r.target.href),t,m=d(r.target).parents(&quot;.inside&quot;).first()[0],q=m?m.getElementsByTagName(&quot;input&quot;):[],p=q.length;while(p--){q[p].checked=false}d(&quot;.tabs-panel&quot;,m).each(function(){if(this.className){this.className=this.className.replace(&quot;tabs-panel-active&quot;,&quot;tabs-panel-inactive&quot;)}});d(&quot;.tabs&quot;,m).each(function(){this.className=this.className.replace(&quot;tabs&quot;,&quot;&quot;)});r.target.parentNode.className+=&quot; tabs&quot;;if(u&amp;&amp;u[1]){o=document.getElementById(u[1]);if(o){o.className=o.className.replace(&quot;tabs-panel-inactive&quot;,&quot;tabs-panel-active&quot;)}}return false}else{if(r.target&amp;&amp;r.target.className&amp;&amp;-1!=r.target.className.indexOf(&quot;select-all&quot;)){var n=/#(.*)$/.exec(r.target.href),s;if(n&amp;&amp;n[1]){s=d(&quot;#&quot;+n[1]+&quot; .tabs-panel-active .potential-menu-item&quot;);if(s.length===s.filter(&quot;.selected-menu-item&quot;).length){s.deselectItem()}else{s.selectItem()}return false}}}})},initTabManager:function(){var r=d(&quot;.nav-tabs-wrapper&quot;),s=r.children(&quot;.nav-tabs&quot;),q=s.children(&quot;.nav-tab-active&quot;),u=s.children(&quot;.nav-tab&quot;),o=0,v,p,t,n;resizing=false;function m(){p=r.offset().left;v=p+r.width();q.makeTabVisible()}d.fn.extend({makeTabVisible:function(){var x=this.eq(0),y,w;if(!x.length){return}y=x.offset().left;w=y+x.outerWidth();if(w&gt;v){s.animate({&quot;margin-left&quot;:&quot;+=&quot;+(v-w)+&quot;px&quot;,},&quot;fast&quot;)}else{if(y&lt;p){s.animate({&quot;margin-left&quot;:&quot;-=&quot;+(y-p)+&quot;px&quot;,},&quot;fast&quot;)}}return x},isTabVisible:function(){var x=this.eq(0),y=x.offset().left,w=y+x.outerWidth();return(w&lt;=v&amp;&amp;y&gt;=p)?true:false}});u.each(function(){o+=d(this).outerWidth(true)});if(o&lt;=r.width()-s.css(&quot;padding-left&quot;).slice(0,-2)-s.css(&quot;padding-right&quot;).slice(0,-2)){return}s.css({&quot;margin-right&quot;:(-1*o)+&quot;px&quot;,padding:0,});t=d('&lt;div class=&quot;nav-tabs-arrow nav-tabs-arrow-left&quot;&gt;&lt;a&gt;&amp;laquo;&lt;/a&gt;&lt;/div&gt;');n=d('&lt;div class=&quot;nav-tabs-arrow nav-tabs-arrow-right&quot;&gt;&lt;a&gt;&amp;raquo;&lt;/a&gt;&lt;/div&gt;');r.wrap('&lt;div class=&quot;nav-tabs-nav&quot;/&gt;').parent().prepend(t).append(n);m();d(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){m();resizing=false},1000)});d.each([{arrow:t,next:&quot;next&quot;,last:&quot;first&quot;,operator:&quot;+=&quot;,},{arrow:n,next:&quot;prev&quot;,last:&quot;last&quot;,operator:&quot;-=&quot;,}],function(){var w=this;this.arrow.mousedown(function(){var y=u[w.last](),x=function(){if(!y.isTabVisible()){s.animate({&quot;margin-left&quot;:w.operator+&quot;90px&quot;,},300,&quot;linear&quot;,x)}};x()}).mouseup(function(){var y,x;s.stop(true);y=u[w.last]();while((x=y[w.next]())&amp;&amp;x.length&amp;&amp;!x.isTabVisible()){y=x}y.makeTabVisible()})})},setupQuickSearchEventListeners:function(m){var n=this;d(m).autocomplete(ajaxurl+&quot;?action=menu-quick-search&amp;type=&quot;+m.name,{delay:500,formatItem:k,formatResult:l,minchars:2,multiple:false}).bind(&quot;blur&quot;,function(q){var o=h[this.value],p=this;if(o){d.post(ajaxurl+&quot;?action=menu-quick-search&amp;type=get-post-item&amp;response-format=markup&quot;,o,function(s){n.processQuickSearchQueryResponse.call(n,s,o);h[p.value]=false})}})},eventOnClickEditLink:function(m){var o,n=/#(.*)$/.exec(m.href);if(n&amp;&amp;n[1]){o=d(&quot;#&quot;+n[1]);if(0!=o.length){if(o.hasClass(&quot;menu-item-edit-inactive&quot;)){o.slideDown(&quot;fast&quot;).siblings(&quot;dl&quot;).andSelf().removeClass(&quot;menu-item-edit-inactive&quot;).addClass(&quot;menu-item-edit-active&quot;)}else{o.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(m){d(m).closest(&quot;.menu-item-settings&quot;).siblings(&quot;dl&quot;).find(&quot;.item-edit&quot;).click();return false},eventOnClickMenuDelete:function(m){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(m){var p,o,n=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){o=/_wpnonce=([a-zA-Z0-9]*)$/.exec(m.href);if(o&amp;&amp;o[1]){p=parseInt(m.id.replace(&quot;delete-&quot;,&quot;&quot;),10);d.post(ajaxurl,{action:&quot;delete-menu-item&quot;,&quot;menu-item&quot;:p,_wpnonce:o[1]},function(q){if(&quot;1&quot;==q){n.removeMenuItem(document.getElementById(&quot;menu-item-&quot;+p))}});return false}return true}else{return false}},addItemsToMenu:function(t){var n=d(&quot;.tabs-panel-active .categorychecklist li input:checked&quot;,&quot;#&quot;+t),s=d(&quot;#menu&quot;).val(),p=d(&quot;#menu-settings-column-nonce&quot;).val(),r={},q=this,m=function(){},o=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;);m=q.eventAddMenuItem;if(!n.length){return false}d(&quot;#&quot;+t+&quot; img.waiting&quot;).show();d(n).each(function(){listItemDBIDMatch=o.exec(d(this).attr(&quot;name&quot;));listItemDBID=&quot;undefined&quot;==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);r={action:&quot;add-menu-item&quot;,menu:s,&quot;menu-settings-column-nonce&quot;:p,&quot;menu-item&quot;:{}};r[&quot;menu-item&quot;][listItemDBID]=listItemData;d.post(ajaxurl,r,function(u){m.call(q,u,r)});d(this).attr(&quot;checked&quot;,false)});d(&quot;#&quot;+t+&quot; img.waiting&quot;).hide()},eventAddMenuItem:function(m,n){d(m).hideAdvancedMenuItemFields().appendTo(j)},processQuickSearchQueryResponse:function(q,v){if(!v){v={}}var n=document.createElement(&quot;ul&quot;),m=document.getElementById(&quot;nav-menu-meta&quot;),r,u,o,w,s,t=new RegExp(&quot;menu-item\\[([^\\]]*)&quot;),p;o=t.exec(q);if(o&amp;&amp;o[1]){s=o[1];while(m.elements[&quot;menu-item[&quot;+s+&quot;][menu-item-type]&quot;]){s--}if(s!=o[1]){q=q.replace(new RegExp(&quot;menu-item\\[&quot;+o[1]+&quot;\\]&quot;,&quot;g&quot;),&quot;menu-item[&quot;+s+&quot;]&quot;)}}n.innerHTML=q;u=n.getElementsByTagName(&quot;li&quot;);if(u[0]&amp;&amp;v.object_type){p=document.getElementById(v.object_type+&quot;-search-checklist&quot;);if(p){p.appendChild(u[0])}}else{if(v.type){o=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(v.type);if(o&amp;&amp;o[2]){p=document.getElementById(o[2]+&quot;-search-checklist&quot;);if(p){r=u.length;if(!r){w=document.createElement(&quot;li&quot;);w.appendChild(document.createTextNode(navMenuL10n.noResultsFound));p.appendChild(w)}while(r--){p.appendChild(u[r])}}}}}},removeMenuItem:function(n){n=d(n);var m=n.childMenuItems();n.addClass(&quot;deleting&quot;).fadeOut(350,function(){n.remove();m.shiftDepthClass(-1).updateParentMenuItemDBId();a()})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()});
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>