<!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>[13266] trunk: Make js noConflict compat.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13266">13266</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-02-20 23:58:00 +0000 (Sat, 20 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make js noConflict compat. see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincustomnavigationphp">trunk/wp-admin/custom-navigation.php</a></li>
<li><a href="#trunkwpadminjscustomnavigationdefaultitemsdevjs">trunk/wp-admin/js/custom-navigation-default-items.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdefaultitemsjs">trunk/wp-admin/js/custom-navigation-default-items.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdynamicfunctionsdevjs">trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdynamicfunctionsjs">trunk/wp-admin/js/custom-navigation-dynamic-functions.js</a></li>
<li><a href="#trunkwpincludescustomnavigationphp">trunk/wp-includes/custom-navigation.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="trunkwpadmincustomnavigationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-navigation.php (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-navigation.php        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-admin/custom-navigation.php        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -45,22 +45,22 @@
</span><span class="cx">         ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;div class=&quot;wrap&quot;&gt;
</span><del>-        &lt;div id=&quot;no-js&quot;&gt;&lt;h3&gt;You do not have JavaScript enabled in your browser. Please enabled it to access the Custom Menu functionality.&lt;/h3&gt;&lt;/div&gt;
</del><ins>+        &lt;div id=&quot;no-js&quot;&gt;&lt;h3&gt;You do not have JavaScript enabled in your browser. Please enable it to access the Custom Menu functionality.&lt;/h3&gt;&lt;/div&gt;
</ins><span class="cx">                         
</span><span class="cx">         &lt;?php
</span><span class="cx">         $messagesdiv = '';
</span><span class="cx">         $menu_id_in_edit = 0;
</span><span class="cx">             
</span><del>-        //Get the theme name
</del><ins>+        // Get the theme name
</ins><span class="cx">         $themename =  get_current_theme();
</span><span class="cx">             
</span><del>-        //CHECK which menu is selected and if menu is in edit already
</del><ins>+        // Check which menu is selected and if menu is in edit already
</ins><span class="cx">         if ( isset( $_POST['switch_menu'] ) )
</span><span class="cx">                 $menu_selected_id = $_POST['menu_select'];
</span><span class="cx">         elseif ( isset( $_POST['menu_id_in_edit'] ) )
</span><span class="cx">                 $menu_selected_id = $_POST['menu_id_in_edit'];
</span><span class="cx">             
</span><del>-        //Default Menu to show
</del><ins>+        // Default Menu to show
</ins><span class="cx">         $custom_menus = get_terms( 'menu', array( 'hide_empty' =&gt; false ) );
</span><span class="cx">          if ( !empty( $custom_menus ) )
</span><span class="cx">                 $menu_selected_id = $custom_menus[0]-&gt;term_id;
</span><span class="lines">@@ -84,7 +84,8 @@
</span><span class="cx">                 $postCounter = $_POST['licount'];
</span><span class="cx">         else
</span><span class="cx">                     $postCounter = 0;
</span><del>-                
</del><ins>+
+        // Create a new menu. Menus are stored as terms in the 'menu' taxonomy.
</ins><span class="cx">         if ( isset( $_POST['add_menu'] ) ) {
</span><span class="cx">                  $insert_menu_name = $_POST['add_menu_name'];
</span><span class="cx"> 
</span><span class="lines">@@ -106,21 +107,19 @@
</span><span class="cx">                  } else {
</span><span class="cx">                          $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;Please enter a valid Menu name&lt;/p&gt;&lt;/div&gt;';
</span><span class="cx">                  }
</span><del>-                         
-                        
</del><span class="cx">         }
</span><span class="cx">                 
</span><del>-        if (isset($_POST['reset_wp_menu'])) {        
</del><ins>+        if ( isset($_POST['reset_wp_menu']) ) {        
</ins><span class="cx">                     $success = wp_custom_nav_reset();
</span><span class="cx">                     if ($success) {
</span><del>-                            //DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
-                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu has been RESET!&lt;/p&gt;&lt;/div&gt;';
-                         //GET reset menu id
-                        $custom_menus = array();
-                        $menu_selected_id = 0;
</del><ins>+                            // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu has been RESET!&lt;/p&gt;&lt;/div&gt;';
+                                // GET reset menu id
+                                $custom_menus = array();
+                                $menu_selected_id = 0;
</ins><span class="cx">                     } else {
</span><del>-                            //DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
-                        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu could not be RESET. Please try again.&lt;/p&gt;&lt;/div&gt;';
</del><ins>+                            // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu could not be RESET. Please try again.&lt;/p&gt;&lt;/div&gt;';
</ins><span class="cx">                     }
</span><span class="cx">         } elseif ( $postCounter &gt; 0 &amp;&amp; $menu_selected_id &gt; 0 ) {
</span><span class="cx">                 $menu_objects = get_objects_in_term( $menu_selected_id, 'menu' );
</span><span class="lines">@@ -285,7 +284,7 @@
</span><span class="cx">                                                 //DISPLAY SELECT OPTIONS
</span><span class="cx">                                                 foreach( $custom_menus as $menu ) {
</span><span class="cx">                                                         $menu_term = get_term( $menu, 'menu' );
</span><del>-                                                        if ( ( $menu_id_in_edit == $menu ) || ( $menu_selected_id == $menu ) )
</del><ins>+                                                        if ( ( $menu_id_in_edit == $menu-&gt;term_id ) || ( $menu_selected_id == $menu-&gt;term_id ) )
</ins><span class="cx">                                                                 $selected_option = 'selected=&quot;selected&quot;';
</span><span class="cx">                                                         else
</span><span class="cx">                                                                 $selected_option = '';
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdefaultitemsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/custom-navigation-default-items.dev.js (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-default-items.dev.js        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-admin/js/custom-navigation-default-items.dev.js        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Init Functions
</span><span class="cx"> */
</span><del>-$(function() 
</del><ins>+jQuery(function($)
</ins><span class="cx">         {
</span><span class="cx">                 //Makes dialog box
</span><span class="cx">                 $(&quot;#dialog-confirm&quot;).dialog({
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdefaultitemsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/custom-navigation-default-items.js (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-default-items.js        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-admin/js/custom-navigation-default-items.js        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -1 +1 @@
</span><del>-$(function(){$(&quot;#dialog-confirm&quot;).dialog({autoOpen:false,resizable:false,height:210,width:400,modal:true,buttons:{Save:function(){titletosave=$(&quot;#edittitle&quot;).attr(&quot;value&quot;);linktosave=$(&quot;#editlink&quot;).attr(&quot;value&quot;);anchortitletosave=$(&quot;#editanchortitle&quot;).attr(&quot;value&quot;);newwindowtosave=$(&quot;#editnewwindow&quot;).attr(&quot;value&quot;);desctosave=$(&quot;#editdescription&quot;).attr(&quot;value&quot;);$(&quot;#title&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,titletosave);$(&quot;#linkurl&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,linktosave);$(&quot;#anchortitle&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,anchortitletosave);$(&quot;#newwindow&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,newwindowtosave);$(&quot;#description&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,desctosave);$(&quot;#menu-&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)+&quot; &gt; dl &gt; dt &gt; span.title&quot;).text(titletosave);$(&quot;#view&quot;+ +$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;href&quot;,linktosave);$(this).dialog(&quot;close&quot;)},Cancel:function(){$(this).dialog(&quot;close&quot;)}}});$(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$(&quot;#custom-nav li&quot;).prepend('&lt;div class=&quot;dropzone&quot;&gt;&lt;/div&gt;');$(&quot;#custom-nav li&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});$(&quot;#custom-nav dl, #custom-nav .dropzone&quot;).droppable({accept:&quot;#custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(f,d){var a=$(this).parent();var g=!$(this).hasClass(&quot;dropzone&quot;);if(g&amp;&amp;a.children(&quot;ul&quot;).length==0){a.append('&lt;ul id=&quot;sub-menu&quot; /&gt;')}if(g){a.children(&quot;ul&quot;).append(d.draggable)}else{a.before(d.draggable)}a.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var c=d.draggable.attr(&quot;value&quot;);var b=a.attr(&quot;value&quot;);a.find(&quot;#menu-&quot;+c).find(&quot;#parent&quot;+c).val(b);$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if($(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){$(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if($(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){$(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var a=$(this).parent().attr(&quot;id&quot;)},out:function(){$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);$(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})},deactivate:function(){}});$(&quot;#save_top&quot;).click(function(){updatepostdata()});$(&quot;#save_bottom&quot;).click(function(){updatepostdata()})});
</del><span class="cx">\ No newline at end of file
</span><ins>+jQuery(function(a){a(&quot;#dialog-confirm&quot;).dialog({autoOpen:false,resizable:false,height:210,width:400,modal:true,buttons:{Save:function(){titletosave=a(&quot;#edittitle&quot;).attr(&quot;value&quot;);linktosave=a(&quot;#editlink&quot;).attr(&quot;value&quot;);anchortitletosave=a(&quot;#editanchortitle&quot;).attr(&quot;value&quot;);newwindowtosave=a(&quot;#editnewwindow&quot;).attr(&quot;value&quot;);desctosave=a(&quot;#editdescription&quot;).attr(&quot;value&quot;);a(&quot;#title&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,titletosave);a(&quot;#linkurl&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,linktosave);a(&quot;#anchortitle&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,anchortitletosave);a(&quot;#newwindow&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,newwindowtosave);a(&quot;#description&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,desctosave);a(&quot;#menu-&quot;+a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)+&quot; &gt; dl &gt; dt &gt; span.title&quot;).text(titletosave);a(&quot;#view&quot;+ +a(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;href&quot;,linktosave);a(this).dialog(&quot;close&quot;)},Cancel:function(){a(this).dialog(&quot;close&quot;)}}});a(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){a(this).remove()});a(&quot;#custom-nav li&quot;).prepend('&lt;div class=&quot;dropzone&quot;&gt;&lt;/div&gt;');a(&quot;#custom-nav li&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});a(&quot;#custom-nav dl, #custom-nav .dropzone&quot;).droppable({accept:&quot;#custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(g,f){var b=a(this).parent();var h=!a(this).hasClass(&quot;dropzone&quot;);if(h&amp;&amp;b.children(&quot;ul&quot;).length==0){b.append('&lt;ul id=&quot;sub-menu&quot; /&gt;')}if(h){b.children(&quot;ul&quot;).append(f.draggable)}else{b.before(f.draggable)}b.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var d=f.draggable.attr(&quot;value&quot;);var c=b.attr(&quot;value&quot;);b.find(&quot;#menu-&quot;+d).find(&quot;#parent&quot;+d).val(c);a(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);a(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if(a(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){a(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if(a(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){a(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var b=a(this).parent().attr(&quot;id&quot;)},out:function(){a(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);a(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);a(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})},deactivate:function(){}});a(&quot;#save_top&quot;).click(function(){updatepostdata()});a(&quot;#save_bottom&quot;).click(function(){updatepostdata()})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdynamicfunctionsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -34,21 +34,21 @@
</span><span class="cx"> function edititem(o) 
</span><span class="cx"> {
</span><span class="cx">                            
</span><del>-                itemTitle = $('#title' + o).attr('value');
-                itemURL = $('#linkurl' + o).attr('value');
-                itemAnchorTitle = $('#anchortitle' + o).attr('value');
-                itemNewWindow = $('#newwindow' + o).attr('value');
-                itemDesc = $('#description' + o).attr('value');
</del><ins>+                itemTitle = jQuery('#title' + o).attr('value');
+                itemURL = jQuery('#linkurl' + o).attr('value');
+                itemAnchorTitle = jQuery('#anchortitle' + o).attr('value');
+                itemNewWindow = jQuery('#newwindow' + o).attr('value');
+                itemDesc = jQuery('#description' + o).attr('value');
</ins><span class="cx">                 
</span><del>-                $('#dialog-confirm').dialog( 'option' , 'itemID' , o )
</del><ins>+                jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o )
</ins><span class="cx">                                 
</span><del>-                $('#dialog-confirm').dialog('open');
</del><ins>+                jQuery('#dialog-confirm').dialog('open');
</ins><span class="cx">                 
</span><del>-                $('#edittitle').attr('value', itemTitle);
-                $('#editlink').attr('value', itemURL);
-                $('#editanchortitle').attr('value', itemAnchorTitle);
-                $(&quot;#editnewwindow option[value='&quot; + itemNewWindow  + &quot;']&quot;).attr('selected', 'selected');
-                $('#editdescription').attr('value', itemDesc);
</del><ins>+                jQuery('#edittitle').attr('value', itemTitle);
+                jQuery('#editlink').attr('value', itemURL);
+                jQuery('#editanchortitle').attr('value', itemAnchorTitle);
+                jQuery(&quot;#editnewwindow option[value='&quot; + itemNewWindow  + &quot;']&quot;).attr('selected', 'selected');
+                jQuery('#editdescription').attr('value', itemDesc);
</ins><span class="cx">         
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -59,24 +59,24 @@
</span><span class="cx"> {                       
</span><span class="cx">         
</span><span class="cx">         var i = 0;
</span><del>-         $(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(i) {
</del><ins>+         jQuery(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(i) {
</ins><span class="cx">                 i = i + 1;
</span><del>-             var j = $(this).attr('value');
</del><ins>+             var j = jQuery(this).attr('value');
</ins><span class="cx">                 
</span><del>-             $(this).find('#position' + j).attr('value', i);
-             $(this).attr('id','menu-' + i);
-             $(this).attr('value', i);
</del><ins>+             jQuery(this).find('#position' + j).attr('value', i);
+             jQuery(this).attr('id','menu-' + i);
+             jQuery(this).attr('value', i);
</ins><span class="cx">              
</span><del>-             $(this).find('#dbid' + j).attr('name','dbid' + i);
-             $(this).find('#dbid' + j).attr('id','dbid' + i);
</del><ins>+             jQuery(this).find('#dbid' + j).attr('name','dbid' + i);
+             jQuery(this).find('#dbid' + j).attr('id','dbid' + i);
</ins><span class="cx">              
</span><del>-                $(this).find('#postmenu' + j).attr('name','postmenu' + i);
-             $(this).find('#postmenu' + j).attr('id','postmenu' + i);
</del><ins>+                jQuery(this).find('#postmenu' + j).attr('name','postmenu' + i);
+             jQuery(this).find('#postmenu' + j).attr('id','postmenu' + i);
</ins><span class="cx">              
</span><del>-             var p = $(this).find('#parent' + j).parent().parent().parent().attr('value');
</del><ins>+             var p = jQuery(this).find('#parent' + j).parent().parent().parent().attr('value');
</ins><span class="cx">              
</span><del>-             $(this).find('#parent' + j).attr('name','parent' + i);
-             $(this).find('#parent' + j).attr('id','parent' + i);
</del><ins>+             jQuery(this).find('#parent' + j).attr('name','parent' + i);
+             jQuery(this).find('#parent' + j).attr('id','parent' + i);
</ins><span class="cx">              if (p) {
</span><span class="cx">                      //Do nothing
</span><span class="cx">              }
</span><span class="lines">@@ -85,37 +85,37 @@
</span><span class="cx">                      p = 0;
</span><span class="cx">              }
</span><span class="cx">                           
</span><del>-             $(this).find('#parent' + j).attr('value', p);
</del><ins>+             jQuery(this).find('#parent' + j).attr('value', p);
</ins><span class="cx">                           
</span><del>-             $(this).find('#title' + j).attr('name','title' + i);
-             $(this).find('#title' + j).attr('id','title' + i);
</del><ins>+             jQuery(this).find('#title' + j).attr('name','title' + i);
+             jQuery(this).find('#title' + j).attr('id','title' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#linkurl' + j).attr('name','linkurl' + i);
-             $(this).find('#linkurl' + j).attr('id','linkurl' + i);
</del><ins>+             jQuery(this).find('#linkurl' + j).attr('name','linkurl' + i);
+             jQuery(this).find('#linkurl' + j).attr('id','linkurl' + i);
</ins><span class="cx">                      
</span><del>-             $(this).find('#description' + j).attr('name','description' + i);
-             $(this).find('#description' + j).attr('id','description' + i);
</del><ins>+             jQuery(this).find('#description' + j).attr('name','description' + i);
+             jQuery(this).find('#description' + j).attr('id','description' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#icon' + j).attr('name','icon' + i);
-             $(this).find('#icon' + j).attr('id','icon' + i);
</del><ins>+             jQuery(this).find('#icon' + j).attr('name','icon' + i);
+             jQuery(this).find('#icon' + j).attr('id','icon' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#position' + j).attr('name','position' + i);
-             $(this).find('#position' + j).attr('id','position' + i);
</del><ins>+             jQuery(this).find('#position' + j).attr('name','position' + i);
+             jQuery(this).find('#position' + j).attr('id','position' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#linktype' + j).attr('name','linktype' + i);
-             $(this).find('#linktype' + j).attr('id','linktype' + i);
</del><ins>+             jQuery(this).find('#linktype' + j).attr('name','linktype' + i);
+             jQuery(this).find('#linktype' + j).attr('id','linktype' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#anchortitle' + j).attr('name','anchortitle' + i);
-             $(this).find('#anchortitle' + j).attr('id','anchortitle' + i);
</del><ins>+             jQuery(this).find('#anchortitle' + j).attr('name','anchortitle' + i);
+             jQuery(this).find('#anchortitle' + j).attr('id','anchortitle' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('#newwindow' + j).attr('name','newwindow' + i);
-             $(this).find('#newwindow' + j).attr('id','newwindow' + i);
</del><ins>+             jQuery(this).find('#newwindow' + j).attr('name','newwindow' + i);
+             jQuery(this).find('#newwindow' + j).attr('id','newwindow' + i);
</ins><span class="cx">              
</span><del>-             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('value', i);
-             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('onClick', 'removeitem(' + i + ')');
-             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('id','remove' + i);
</del><ins>+             jQuery(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('value', i);
+             jQuery(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('onClick', 'removeitem(' + i + ')');
+             jQuery(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('id','remove' + i);
</ins><span class="cx"> 
</span><del>-             $('#licount').attr('value',i);
</del><ins>+             jQuery('#licount').attr('value',i);
</ins><span class="cx"> 
</span><span class="cx">    });
</span><span class="cx">    
</span><span class="lines">@@ -210,14 +210,14 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         //Notification Message
</span><del>-        $('.maintitle').after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');
-        $('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ $(this).remove();});
</del><ins>+        jQuery('.maintitle').after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');
+        jQuery('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ jQuery(this).remove();});
</ins><span class="cx">         
</span><span class="cx">         //Appends HTML to the menu
</span><del>-        $('#custom-nav').append('&lt;li id=&quot;menu-' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;' + inputvaluevarname + '&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;' + additemtype + '&lt;/span&gt;&lt;a id=&quot;edit' + randomnumber + '&quot; onclick=&quot;edititem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove' + randomnumber + '&quot; onclick=&quot;removeitem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;' + inputvaluevarurl + '&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;' + inputvaluevarurl + '&quot;&gt;' + inputvaluevarname + '&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu' + randomnumber + '&quot; id=&quot;postmenu' + randomnumber + '&quot; value=&quot;' + inputitemid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent' + randomnumber + '&quot; id=&quot;parent' + randomnumber + '&quot; value=&quot;' + inputparentid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title' + randomnumber + '&quot; id=&quot;title' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl' + randomnumber + '&quot; id=&quot;linkurl' + randomnumber + '&quot; value=&quot;' + inputvaluevarurl + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description' + randomnumber + '&quot; id=&quot;description' + randomnumber + '&quot; value=&quot;' + inputdescription + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon' + randomnumber + '&quot; id=&quot;icon' + randomnumber + '&quot; value=&quot;' + inputicon + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position' + randomnumber + '&quot; id=&quot;position' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype' + randomnumber + '&quot; id=&quot;linktype' + randomnumber + '&quot; value=&quot;' + inputlinktype + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle' + randomnumber + '&quot; id=&quot;anchortitle' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow' + randomnumber + '&quot; id=&quot;newwindow' + randomnumber + '&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');
</del><ins>+        jQuery('#custom-nav').append('&lt;li id=&quot;menu-' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;' + inputvaluevarname + '&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;' + additemtype + '&lt;/span&gt;&lt;a id=&quot;edit' + randomnumber + '&quot; onclick=&quot;edititem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove' + randomnumber + '&quot; onclick=&quot;removeitem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;' + inputvaluevarurl + '&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;' + inputvaluevarurl + '&quot;&gt;' + inputvaluevarname + '&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu' + randomnumber + '&quot; id=&quot;postmenu' + randomnumber + '&quot; value=&quot;' + inputitemid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent' + randomnumber + '&quot; id=&quot;parent' + randomnumber + '&quot; value=&quot;' + inputparentid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title' + randomnumber + '&quot; id=&quot;title' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl' + randomnumber + '&quot; id=&quot;linkurl' + randomnumber + '&quot; value=&quot;' + inputvaluevarurl + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description' + randomnumber + '&quot; id=&quot;description' + randomnumber + '&quot; value=&quot;' + inputdescription + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon' + randomnumber + '&quot; id=&quot;icon' + randomnumber + '&quot; value=&quot;' + inputicon + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position' + randomnumber + '&quot; id=&quot;position' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype' + randomnumber + '&quot; id=&quot;linktype' + randomnumber + '&quot; value=&quot;' + inputlinktype + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle' + randomnumber + '&quot; id=&quot;anchortitle' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow' + randomnumber + '&quot; id=&quot;newwindow' + randomnumber + '&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');
</ins><span class="cx"> 
</span><span class="cx">         //make menu item draggable
</span><del>-        $('#menu-' + randomnumber + '').draggable(
</del><ins>+        jQuery('#menu-' + randomnumber + '').draggable(
</ins><span class="cx">         {
</span><span class="cx">                 handle: ' &gt; dl',
</span><span class="cx">                 opacity: .8,
</span><span class="lines">@@ -227,13 +227,13 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         //make menu item droppable
</span><del>-        $('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({
</del><ins>+        jQuery('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({
</ins><span class="cx">                 accept: '#' + randomnumber + ', #custom-nav li',
</span><span class="cx">                 tolerance: 'pointer',
</span><span class="cx">                 drop: function(e, ui) 
</span><span class="cx">                 {
</span><del>-                        var li = $(this).parent();
-                        var child = !$(this).hasClass('dropzone');
</del><ins>+                        var li = jQuery(this).parent();
+                        var child = !jQuery(this).hasClass('dropzone');
</ins><span class="cx">                         //Append UL to first child
</span><span class="cx">                         if (child &amp;&amp; li.children('ul').length == 0) 
</span><span class="cx">                         {
</span><span class="lines">@@ -254,34 +254,34 @@
</span><span class="cx">                         var draggablevalue = ui.draggable.attr('value');
</span><span class="cx">                        var droppablevalue = li.attr('value');
</span><span class="cx">                        li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 
</span><del>-                $(this).parent().find(&quot;dt&quot;).removeAttr('style');
-                $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
</del><ins>+                jQuery(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                jQuery(this).parent().find(&quot;div:first&quot;).removeAttr('style');
</ins><span class="cx">                 
</span><span class="cx">                 },
</span><span class="cx">                 over: function() 
</span><span class="cx">                     {
</span><span class="cx">                             //Add child
</span><del>-                            if ($(this).attr('class') == 'dropzone ui-droppable') 
</del><ins>+                            if (jQuery(this).attr('class') == 'dropzone ui-droppable') 
</ins><span class="cx">                             {
</span><del>-                                    $(this).parent().find(&quot;div:first&quot;).css('background', 'none').css('height', '50px');
</del><ins>+                                    jQuery(this).parent().find(&quot;div:first&quot;).css('background', 'none').css('height', '50px');
</ins><span class="cx">                             }
</span><span class="cx">                             //Add above
</span><del>-                            else if ($(this).attr('class') == 'ui-droppable') 
</del><ins>+                            else if (jQuery(this).attr('class') == 'ui-droppable') 
</ins><span class="cx">                             {
</span><del>-                                    $(this).parent().find(&quot;dt:first&quot;).css('background', '#d8d8d8');
</del><ins>+                                    jQuery(this).parent().find(&quot;dt:first&quot;).css('background', '#d8d8d8');
</ins><span class="cx">                             }
</span><span class="cx">                             //do nothing
</span><span class="cx">                             else {
</span><span class="cx">                             
</span><span class="cx">                             }
</span><del>-                            var parentid = $(this).parent().attr('id');
</del><ins>+                            var parentid = jQuery(this).parent().attr('id');
</ins><span class="cx">                         
</span><span class="cx">                        },
</span><span class="cx">                     out: function() 
</span><span class="cx">                     {
</span><del>-                        $(this).parent().find(&quot;dt&quot;).removeAttr('style');
-                        $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
-                        $(this).filter('.dropzone').css({ borderColor: '' });
</del><ins>+                        jQuery(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                        jQuery(this).parent().find(&quot;div:first&quot;).removeAttr('style');
+                        jQuery(this).filter('.dropzone').css({ borderColor: '' });
</ins><span class="cx">                     }
</span><span class="cx">         });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdynamicfunctionsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/custom-navigation-dynamic-functions.js (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-dynamic-functions.js        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-admin/js/custom-navigation-dynamic-functions.js        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -1 +1 @@
</span><del>-function removeitem(c){var b=document.getElementById(&quot;menu-&quot;+c);if(b){var a=document.getElementById(&quot;menu-&quot;+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=$(&quot;#title&quot;+a).attr(&quot;value&quot;);itemURL=$(&quot;#linkurl&quot;+a).attr(&quot;value&quot;);itemAnchorTitle=$(&quot;#anchortitle&quot;+a).attr(&quot;value&quot;);itemNewWindow=$(&quot;#newwindow&quot;+a).attr(&quot;value&quot;);itemDesc=$(&quot;#description&quot;+a).attr(&quot;value&quot;);$(&quot;#dialog-confirm&quot;).dialog(&quot;option&quot;,&quot;itemID&quot;,a);$(&quot;#dialog-confirm&quot;).dialog(&quot;open&quot;);$(&quot;#edittitle&quot;).attr(&quot;value&quot;,itemTitle);$(&quot;#editlink&quot;).attr(&quot;value&quot;,itemURL);$(&quot;#editanchortitle&quot;).attr(&quot;value&quot;,itemAnchorTitle);$(&quot;#editnewwindow option[value='&quot;+itemNewWindow+&quot;']&quot;).attr(&quot;selected&quot;,&quot;selected&quot;);$(&quot;#editdescription&quot;).attr(&quot;value&quot;,itemDesc)}function updatepostdata(){var a=0;$(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(c){c=c+1;var b=$(this).attr(&quot;value&quot;);$(this).find(&quot;#position&quot;+b).attr(&quot;value&quot;,c);$(this).attr(&quot;id&quot;,&quot;menu-&quot;+c);$(this).attr(&quot;value&quot;,c);$(this).find(&quot;#dbid&quot;+b).attr(&quot;name&quot;,&quot;dbid&quot;+c);$(this).find(&quot;#dbid&quot;+b).attr(&quot;id&quot;,&quot;dbid&quot;+c);$(this).find(&quot;#postmenu&quot;+b).attr(&quot;name&quot;,&quot;postmenu&quot;+c);$(this).find(&quot;#postmenu&quot;+b).attr(&quot;id&quot;,&quot;postmenu&quot;+c);var d=$(this).find(&quot;#parent&quot;+b).parent().parent().parent().attr(&quot;value&quot;);$(this).find(&quot;#parent&quot;+b).attr(&quot;name&quot;,&quot;parent&quot;+c);$(this).find(&quot;#parent&quot;+b).attr(&quot;id&quot;,&quot;parent&quot;+c);if(d){}else{d=0}$(this).find(&quot;#parent&quot;+b).attr(&quot;value&quot;,d);$(this).find(&quot;#title&quot;+b).attr(&quot;name&quot;,&quot;title&quot;+c);$(this).find(&quot;#title&quot;+b).attr(&quot;id&quot;,&quot;title&quot;+c);$(this).find(&quot;#linkurl&quot;+b).attr(&quot;name&quot;,&quot;linkurl&quot;+c);$(this).find(&quot;#linkurl&quot;+b).attr(&quot;id&quot;,&quot;linkurl&quot;+c);$(this).find(&quot;#description&quot;+b).attr(&quot;name&quot;,&quot;description&quot;+c);$(this).find(&quot;#description&quot;+b).attr(&quot;id&quot;,&quot;description&quot;+c);$(this).find(&quot;#icon&quot;+b).attr(&quot;name&quot;,&quot;icon&quot;+c);$(this).find(&quot;#icon&quot;+b).attr(&quot;id&quot;,&quot;icon&quot;+c);$(this).find(&quot;#position&quot;+b).attr(&quot;name&quot;,&quot;position&quot;+c);$(this).find(&quot;#position&quot;+b).attr(&quot;id&quot;,&quot;position&quot;+c);$(this).find(&quot;#linktype&quot;+b).attr(&quot;name&quot;,&quot;linktype&quot;+c);$(this).find(&quot;#linktype&quot;+b).attr(&quot;id&quot;,&quot;linktype&quot;+c);$(this).find(&quot;#anchortitle&quot;+b).attr(&quot;name&quot;,&quot;anchortitle&quot;+c);$(this).find(&quot;#anchortitle&quot;+b).attr(&quot;id&quot;,&quot;anchortitle&quot;+c);$(this).find(&quot;#newwindow&quot;+b).attr(&quot;name&quot;,&quot;newwindow&quot;+c);$(this).find(&quot;#newwindow&quot;+b).attr(&quot;id&quot;,&quot;newwindow&quot;+c);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;value&quot;,c);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;onClick&quot;,&quot;removeitem(&quot;+c+&quot;)&quot;);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;id&quot;,&quot;remove&quot;+c);$(&quot;#licount&quot;).attr(&quot;value&quot;,c)})}function appendToList(b,s,d,n,h,l,e){var k=&quot;&quot;;var c=&quot;&quot;;var r=&quot;&quot;;var o=&quot;&quot;;var i=&quot;&quot;;var a=&quot;&quot;;if(s==&quot;Custom&quot;){k=document.getElementById(&quot;custom_menu_item_name&quot;).value;c=document.getElementById(&quot;custom_menu_item_url&quot;).value;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=document.getElementById(&quot;custom_menu_item_description&quot;).value}else{if(s==&quot;Page&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;page&quot;;i=htmlentities(e.toString())}else{if(s==&quot;Category&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;category&quot;;i=htmlentities(e.toString())}else{k=&quot;&quot;;k=&quot;&quot;;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=&quot;&quot;}}}var g=document.getElementById(&quot;custom-nav&quot;).getElementsByTagName(&quot;li&quot;).length;var p=g;var m=0;try{var q=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}}$(&quot;.maintitle&quot;).after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');$(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$(&quot;#custom-nav&quot;).append('&lt;li id=&quot;menu-'+p+'&quot; value=&quot;'+p+'&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;'+k+'&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;'+s+'&lt;/span&gt;&lt;a id=&quot;edit'+p+'&quot; onclick=&quot;edititem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;'+b+'/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove'+p+'&quot; onclick=&quot;removeitem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;'+b+'/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;'+c+'&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;'+b+'/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;'+c+'&quot;&gt;'+k+'&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu'+p+'&quot; id=&quot;postmenu'+p+'&quot; value=&quot;'+r+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent'+p+'&quot; id=&quot;parent'+p+'&quot; value=&quot;'+o+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title'+p+'&quot; id=&quot;title'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl'+p+'&quot; id=&quot;linkurl'+p+'&quot; value=&quot;'+c+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description'+p+'&quot; id=&quot;description'+p+'&quot; value=&quot;'+i+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon'+p+'&quot; id=&quot;icon'+p+'&quot; value=&quot;'+a+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position'+p+'&quot; id=&quot;position'+p+'&quot; value=&quot;'+p+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype'+p+'&quot; id=&quot;linktype'+p+'&quot; value=&quot;'+inputlinktype+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle'+p+'&quot; id=&quot;anchortitle'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow'+p+'&quot; id=&quot;newwindow'+p+'&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');$(&quot;#menu-&quot;+p+&quot;&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});$(&quot;#menu-&quot;+p+&quot; dl, #menu-&quot;+p+&quot; .dropzone&quot;).droppable({accept:&quot;#&quot;+p+&quot;, #custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(x,w){var t=$(this).parent();var y=!$(this).hasClass(&quot;dropzone&quot;);if(y&amp;&amp;t.children(&quot;ul&quot;).length==0){t.append(&quot;&lt;ul/&gt;&quot;)}if(y){t.children(&quot;ul&quot;).append(w.draggable)}else{t.before(w.draggable)}t.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var v=w.draggable.attr(&quot;value&quot;);var u=t.attr(&quot;value&quot;);t.find(&quot;#menu-&quot;+v).find(&quot;#parent&quot;+v).val(u);$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if($(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){$(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if($(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){$(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var t=$(this).parent().attr(&quot;id&quot;)},out:function(){$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);$(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})}});updatepostdata()};
</del><span class="cx">\ No newline at end of file
</span><ins>+function removeitem(c){var b=document.getElementById(&quot;menu-&quot;+c);if(b){var a=document.getElementById(&quot;menu-&quot;+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=jQuery(&quot;#title&quot;+a).attr(&quot;value&quot;);itemURL=jQuery(&quot;#linkurl&quot;+a).attr(&quot;value&quot;);itemAnchorTitle=jQuery(&quot;#anchortitle&quot;+a).attr(&quot;value&quot;);itemNewWindow=jQuery(&quot;#newwindow&quot;+a).attr(&quot;value&quot;);itemDesc=jQuery(&quot;#description&quot;+a).attr(&quot;value&quot;);jQuery(&quot;#dialog-confirm&quot;).dialog(&quot;option&quot;,&quot;itemID&quot;,a);jQuery(&quot;#dialog-confirm&quot;).dialog(&quot;open&quot;);jQuery(&quot;#edittitle&quot;).attr(&quot;value&quot;,itemTitle);jQuery(&quot;#editlink&quot;).attr(&quot;value&quot;,itemURL);jQuery(&quot;#editanchortitle&quot;).attr(&quot;value&quot;,itemAnchorTitle);jQuery(&quot;#editnewwindow option[value='&quot;+itemNewWindow+&quot;']&quot;).attr(&quot;selected&quot;,&quot;selected&quot;);jQuery(&quot;#editdescription&quot;).attr(&quot;value&quot;,itemDesc)}function updatepostdata(){var a=0;jQuery(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(c){c=c+1;var b=jQuery(this).attr(&quot;value&quot;);jQuery(this).find(&quot;#position&quot;+b).attr(&quot;value&quot;,c);jQuery(this).attr(&quot;id&quot;,&quot;menu-&quot;+c);jQuery(this).attr(&quot;value&quot;,c);jQuery(this).find(&quot;#dbid&quot;+b).attr(&quot;name&quot;,&quot;dbid&quot;+c);jQuery(this).find(&quot;#dbid&quot;+b).attr(&quot;id&quot;,&quot;dbid&quot;+c);jQuery(this).find(&quot;#postmenu&quot;+b).attr(&quot;name&quot;,&quot;postmenu&quot;+c);jQuery(this).find(&quot;#postmenu&quot;+b).attr(&quot;id&quot;,&quot;postmenu&quot;+c);var d=jQuery(this).find(&quot;#parent&quot;+b).parent().parent().parent().attr(&quot;value&quot;);jQuery(this).find(&quot;#parent&quot;+b).attr(&quot;name&quot;,&quot;parent&quot;+c);jQuery(this).find(&quot;#parent&quot;+b).attr(&quot;id&quot;,&quot;parent&quot;+c);if(d){}else{d=0}jQuery(this).find(&quot;#parent&quot;+b).attr(&quot;value&quot;,d);jQuery(this).find(&quot;#title&quot;+b).attr(&quot;name&quot;,&quot;title&quot;+c);jQuery(this).find(&quot;#title&quot;+b).attr(&quot;id&quot;,&quot;title&quot;+c);jQuery(this).find(&quot;#linkurl&quot;+b).attr(&quot;name&quot;,&quot;linkurl&quot;+c);jQuery(this).find(&quot;#linkurl&quot;+b).attr(&quot;id&quot;,&quot;linkurl&quot;+c);jQuery(this).find(&quot;#description&quot;+b).attr(&quot;name&quot;,&quot;description&quot;+c);jQuery(this).find(&quot;#description&quot;+b).attr(&quot;id&quot;,&quot;description&quot;+c);jQuery(this).find(&quot;#icon&quot;+b).attr(&quot;name&quot;,&quot;icon&quot;+c);jQuery(this).find(&quot;#icon&quot;+b).attr(&quot;id&quot;,&quot;icon&quot;+c);jQuery(this).find(&quot;#position&quot;+b).attr(&quot;name&quot;,&quot;position&quot;+c);jQuery(this).find(&quot;#position&quot;+b).attr(&quot;id&quot;,&quot;position&quot;+c);jQuery(this).find(&quot;#linktype&quot;+b).attr(&quot;name&quot;,&quot;linktype&quot;+c);jQuery(this).find(&quot;#linktype&quot;+b).attr(&quot;id&quot;,&quot;linktype&quot;+c);jQuery(this).find(&quot;#anchortitle&quot;+b).attr(&quot;name&quot;,&quot;anchortitle&quot;+c);jQuery(this).find(&quot;#anchortitle&quot;+b).attr(&quot;id&quot;,&quot;anchortitle&quot;+c);jQuery(this).find(&quot;#newwindow&quot;+b).attr(&quot;name&quot;,&quot;newwindow&quot;+c);jQuery(this).find(&quot;#newwindow&quot;+b).attr(&quot;id&quot;,&quot;newwindow&quot;+c);jQuery(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;value&quot;,c);jQuery(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;onClick&quot;,&quot;removeitem(&quot;+c+&quot;)&quot;);jQuery(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;id&quot;,&quot;remove&quot;+c);jQuery(&quot;#licount&quot;).attr(&quot;value&quot;,c)})}function appendToList(b,s,d,n,h,l,e){var k=&quot;&quot;;var c=&quot;&quot;;var r=&quot;&quot;;var o=&quot;&quot;;var i=&quot;&quot;;var a=&quot;&quot;;if(s==&quot;Custom&quot;){k=document.getElementById(&quot;custom_menu_item_name&quot;).value;c=document.getElementById(&quot;custom_menu_item_url&quot;).value;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=document.getElementById(&quot;custom_menu_item_description&quot;).value}else{if(s==&quot;Page&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;page&quot;;i=htmlentities(e.toString())}else{if(s==&quot;Category&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;category&quot;;i=htmlentities(e.toString())}else{k=&quot;&quot;;k=&quot;&quot;;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=&quot;&quot;}}}var g=document.getElementById(&quot;custom-nav&quot;).getElementsByTagName(&quot;li&quot;).length;var p=g;var m=0;try{var q=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}}jQuery(&quot;.maintitle&quot;).after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');jQuery(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});jQuery(&quot;#custom-nav&quot;).append('&lt;li id=&quot;menu-'+p+'&quot; value=&quot;'+p+'&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;'+k+'&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;'+s+'&lt;/span&gt;&lt;a id=&quot;edit'+p+'&quot; onclick=&quot;edititem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;'+b+'/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove'+p+'&quot; onclick=&quot;removeitem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;'+b+'/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;'+c+'&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;'+b+'/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;'+c+'&quot;&gt;'+k+'&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu'+p+'&quot; id=&quot;postmenu'+p+'&quot; value=&quot;'+r+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent'+p+'&quot; id=&quot;parent'+p+'&quot; value=&quot;'+o+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title'+p+'&quot; id=&quot;title'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl'+p+'&quot; id=&quot;linkurl'+p+'&quot; value=&quot;'+c+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description'+p+'&quot; id=&quot;description'+p+'&quot; value=&quot;'+i+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon'+p+'&quot; id=&quot;icon'+p+'&quot; value=&quot;'+a+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position'+p+'&quot; id=&quot;position'+p+'&quot; value=&quot;'+p+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype'+p+'&quot; id=&quot;linktype'+p+'&quot; value=&quot;'+inputlinktype+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle'+p+'&quot; id=&quot;anchortitle'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow'+p+'&quot; id=&quot;newwindow'+p+'&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');jQuery(&quot;#menu-&quot;+p+&quot;&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});jQuery(&quot;#menu-&quot;+p+&quot; dl, #menu-&quot;+p+&quot; .dropzone&quot;).droppable({accept:&quot;#&quot;+p+&quot;, #custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(x,w){var t=jQuery(this).parent();var y=!jQuery(this).hasClass(&quot;dropzone&quot;);if(y&amp;&amp;t.children(&quot;ul&quot;).length==0){t.append(&quot;&lt;ul/&gt;&quot;)}if(y){t.children(&quot;ul&quot;).append(w.draggable)}else{t.before(w.draggable)}t.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var v=w.draggable.attr(&quot;value&quot;);var u=t.attr(&quot;value&quot;);t.find(&quot;#menu-&quot;+v).find(&quot;#parent&quot;+v).val(u);jQuery(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);jQuery(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if(jQuery(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){jQuery(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if(jQuery(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){jQuery(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var t=jQuery(this).parent().attr(&quot;id&quot;)},out:function(){jQuery(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);jQuery(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);jQuery(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})}});updatepostdata()};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludescustomnavigationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/custom-navigation.php (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/custom-navigation.php        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-includes/custom-navigation.php        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -13,14 +13,14 @@
</span><span class="cx"> function wp_custom_navigation_get_menu_items( $menu_objects, $key = 'ID' ) {
</span><span class="cx">         $menu_items = array();
</span><span class="cx">         if ( !empty( $menu_objects ) &amp;&amp; !empty( $key ) ) {
</span><del>-                $args = array( 'orderby' =&gt; 'menu_order', 'post_type' =&gt; 'menu_item', 'post_status' =&gt; 'menu-category,menu-page,menu-custom' );
</del><ins>+                $args = array( 'orderby' =&gt; 'menu_order', 'post_type' =&gt; 'menu_item', 'post_status' =&gt; 'publish' );
</ins><span class="cx">                 if ( count( $menu_objects ) &gt; 1 )
</span><span class="cx">                         $args['include'] = implode( ',', $menu_objects );
</span><span class="cx">                 else
</span><span class="cx">                         $args['include'] = $menu_objects[0];
</span><del>-                $posts = new WP_Query( $args );
-                if ( ! empty( $posts-&gt;posts ) ) {
-                        foreach( $posts-&gt;posts as $post ) {
</del><ins>+                $posts = get_posts( $args );
+                if ( ! empty( $posts ) ) {
+                        foreach ( $posts as $post ) {
</ins><span class="cx">                                 $menu_items[ $post-&gt;$key ] = $post;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">         }
</span><span class="cx">         return $menu_items;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> function wp_custom_navigation_setup($override = false) {
</span><span class="cx">         
</span><span class="cx">         $nav_version = '1.1.0';
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (13265 => 13266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-02-20 23:41:47 UTC (rev 13265)
+++ trunk/wp-includes/script-loader.php        2010-02-20 23:58:00 UTC (rev 13266)
</span><span class="lines">@@ -403,9 +403,9 @@
</span><span class="cx">         $scripts-&gt;add( 'custom-navigation-ui-custom', '/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js', array('jquery'), '1.7.2' );
</span><span class="cx">         $scripts-&gt;add_data( 'custom-navigation-ui-custom', 'group', 1 );
</span><span class="cx">         
</span><del>-        $scripts-&gt;add( 'custom-navigation-default-items', '/wp-admin/js/custom-navigation-default-items.js', false, '1.0.0' );
-        $scripts-&gt;add( 'custom-navigation-dynamic-functions', '/wp-admin/js/custom-navigation-dynamic-functions.js', false, '1.0.0' );
-        $scripts-&gt;add( 'custom-navigation-php-functions', '/wp-admin/js/custom-navigation-php-functions.js', false, '1.0.0' );
</del><ins>+        $scripts-&gt;add( 'custom-navigation-default-items', &quot;/wp-admin/js/custom-navigation-default-items$suffix.js&quot;, false, '20100220' );
+        $scripts-&gt;add( 'custom-navigation-dynamic-functions', &quot;/wp-admin/js/custom-navigation-dynamic-functions$suffix.js&quot;, false, '20100220' );
+        $scripts-&gt;add( 'custom-navigation-php-functions', &quot;/wp-admin/js/custom-navigation-php-functions$suffix.js&quot;, false, '20100220' );
</ins><span class="cx">         
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>