<!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>[13651] trunk/wp-admin/js: Menu editor fixes.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13651">13651</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-03-10 20:27:42 +0000 (Wed, 10 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Menu editor fixes. Props yoavf. fixes <a href="http://trac.wordpress.org/ticket/12545">#12545</a> <a href="http://trac.wordpress.org/ticket/12566">#12566</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjsnavmenudefaultitemsdevjs">trunk/wp-admin/js/nav-menu-default-items.dev.js</a></li>
<li><a href="#trunkwpadminjsnavmenudefaultitemsjs">trunk/wp-admin/js/nav-menu-default-items.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsnavmenudefaultitemsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu-default-items.dev.js (13650 => 13651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu-default-items.dev.js        2010-03-10 20:10:32 UTC (rev 13650)
+++ trunk/wp-admin/js/nav-menu-default-items.dev.js        2010-03-10 20:27:42 UTC (rev 13651)
</span><span class="lines">@@ -83,8 +83,8 @@
</span><span class="cx">                 var item_type = jQuery(this).parent().siblings('.item-type').val();
</span><span class="cx">                 var item_title = jQuery(this).parent().siblings('.item-title').val();
</span><span class="cx">                 var item_url = jQuery(this).parent().siblings('.item-url').val();
</span><del>-                var item_id = jQuery(this).parent().siblings('.item-id').val();
-                var item_parent_id = jQuery(this).parent().siblings('.item-parent-id').val();
</del><ins>+                var item_id = jQuery(this).parent().siblings('.item-dbid').val();
+                var item_parent_id = jQuery(this).parent().siblings('.item-parent').val();
</ins><span class="cx">                 var item_description = jQuery(this).parent().siblings('.item-description').val();
</span><span class="cx">                 
</span><span class="cx">                 return wp_update_queue( $(this), item_type, item_title, item_url, item_id, item_parent_id, item_description );
</span></span></pre></div>
<a id="trunkwpadminjsnavmenudefaultitemsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu-default-items.js (13650 => 13651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu-default-items.js        2010-03-10 20:10:32 UTC (rev 13650)
+++ trunk/wp-admin/js/nav-menu-default-items.js        2010-03-10 20:27:42 UTC (rev 13651)
</span><span class="lines">@@ -1 +1 @@
</span><del>-jQuery(document).ready(function($){wp_drag_and_drop();wp_update_post_data();$("#save_menu").click(function(){return wp_update_post_data()});$(".quick-search").click(function(){$(this).attr("value","")});$(".quick-search-submit").click(function(){$(this).siblings(".quick-search").search()});$("#menu-container .item-edit").click(function(){return wp_edit_menu_item($(this).attr("value"))});$("#menu-container .item-delete").live("click",function(){return wp_remove_menu_item($(this).attr("value"))});$("#update-menu-item").click(function(){wp_update_menu_item();tb_remove();var id=$("#edit-item-id").val();$("#menu-"+id+" dt:first").animate({backgroundColor:"#FFFF33"},{duration:"normal",complete:function(){jQuery(this).css("backgroundColor","")}})});$("#cancel-save").click(function(){return tb_remove()});$(".show-all").click(function(){$(this).offsetParent().find("#add-buttons-actions").attr("style","margin-bottom: 10px;");$(this).offsetParent().find(".list-wrap").css("display","block");$(this).siblings(".quick-search").attr("value","");$(this).offsetParent().find(".list-wrap li").css("display","block");$(this).hide();$(this).siblings(".hide-all").show()});$(".hide-all").click(function(){$(this).offsetParent().find("#add-buttons-actions").attr("style","margin-bottom: 0px;");$(this).offsetParent().find(".list-wrap").css("display","none");$(this).siblings(".quick-search").attr("value","Search");$(this).offsetParent().find(".list-wrap li").css("display","none");$(this).hide();$(this).siblings(".show-all").show()});$(".list input").click(function(){var item_type=jQuery(this).parent().siblings(".item-type").val();var item_title=jQuery(this).parent().siblings(".item-title").val();var item_url=jQuery(this).parent().siblings(".item-url").val();var item_id=jQuery(this).parent().siblings(".item-id").val();var item_parent_id=jQuery(this).parent().siblings(".item-parent-id").val();var item_description=jQuery(this).parent().siblings(".item-description").val();return wp_update_queue($(this),item_type,item_title,item_url,item_id,item_parent_id,item_description)});$(".enqueue a").click(function(){return wp_add_queued_items_to_menu(this)});$("#add-custom-link .add-to-menu a").click(function(){var link_url=$(this).offsetParent().find("#menu-item-url").val();var link_name=$(this).offsetParent().find("#menu-item-name").val();wp_add_queued_items_to_menu(this);if("http://"==link_url||"Menu Item"==link_name){return}params={action:"add-menu-link",link_url:link_url,link_name:link_name,};$.post(ajaxurl,params,function(response){if(null==response||"-1"==response){return false}params.link_id=response;wp_add_item_to_menu("Custom",params.link_name,params.link_url,params.link_id,0,"")},"json")})});
</del><span class="cx">\ No newline at end of file
</span><ins>+jQuery(document).ready(function(a){wp_drag_and_drop();wp_update_post_data();a("#save_menu").click(function(){return wp_update_post_data()});a(".quick-search").click(function(){a(this).attr("value","")});a(".quick-search-submit").click(function(){a(this).siblings(".quick-search").search()});a("#menu-container .item-edit").click(function(){return wp_edit_menu_item(a(this).attr("value"))});a("#menu-container .item-delete").live("click",function(){return wp_remove_menu_item(a(this).attr("value"))});a("#update-menu-item").click(function(){wp_update_menu_item();tb_remove();var b=a("#edit-item-id").val();a("#menu-"+b+" dt:first").animate({backgroundColor:"#FFFF33"},{duration:"normal",complete:function(){jQuery(this).css("backgroundColor","")}})});a("#cancel-save").click(function(){return tb_remove()});a(".show-all").click(function(){a(this).offsetParent().find("#add-buttons-actions").attr("style","margin-bottom: 10px;");a(this).offsetParent().find(".list-wrap").css("display","block");a(this).siblings(".quick-search").attr("value","");a(this).offsetParent().find(".list-wrap li").css("display","block");a(this).hide();a(this).siblings(".hide-all").show()});a(".hide-all").click(function(){a(this).offsetParent().find("#add-buttons-actions").attr("style","margin-bottom: 0px;");a(this).offsetParent().find(".list-wrap").css("display","none");a(this).siblings(".quick-search").attr("value","Search");a(this).offsetParent().find(".list-wrap li").css("display","none");a(this).hide();a(this).siblings(".show-all").show()});a(".list input").click(function(){var d=jQuery(this).parent().siblings(".item-type").val();var g=jQuery(this).parent().siblings(".item-title").val();var c=jQuery(this).parent().siblings(".item-url").val();var e=jQuery(this).parent().siblings(".item-dbid").val();var b=jQuery(this).parent().siblings(".item-parent").val();var f=jQuery(this).parent().siblings(".item-description").val();return wp_update_queue(a(this),d,g,c,e,b,f)});a(".enqueue a").click(function(){return wp_add_queued_items_to_menu(this)});a("#add-custom-link .add-to-menu a").click(function(){var b=a(this).offsetParent().find("#menu-item-url").val();var c=a(this).offsetParent().find("#menu-item-name").val();wp_add_queued_items_to_menu(this);if("http://"==b||"Menu Item"==c){return}params={action:"add-menu-link",link_url:b,link_name:c,};a.post(ajaxurl,params,function(d){if(null==d||"-1"==d){return false}params.link_id=d;wp_add_item_to_menu("Custom",params.link_name,params.link_url,params.link_id,0,"")},"json")})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>