=fixedLeft)?true:false}});tabs.each(function(){tabsWidth+=$(this).outerWidth(true)});if(tabsWidth<=fixed.width()-fluid.css("padding-left").slice(0,-2)-fluid.css("padding-right").slice(0,-2)){return}fluid.css({"margin-right":(-1*tabsWidth)+"px",padding:0});arrowLeft=$('');arrowRight=$('');fixed.wrap('').parent().prepend(arrowLeft).append(arrowRight);resetMenuTabs();$(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){resetMenuTabs();resizing=false},1000)});$.each([{arrow:arrowLeft,next:"next",last:"first",operator:"+="},{arrow:arrowRight,next:"prev",last:"last",operator:"-="}],function(){var that=this;this.arrow.mousedown(function(){var last=tabs[that.last](),fn=function(){if(!last.isTabVisible()){fluid.animate({"margin-left":that.operator+"90px"},300,"linear",fn)}};fn()}).mouseup(function(){var tab,next;fluid.stop(true);tab=tabs[that.last]();while((next=tab[that.next]())&&next.length&&!next.isTabVisible()){tab=next}tab.makeTabVisible()})})},eventOnClickEditLink:function(clickedEl){var settings,item,matchedSection=/#(.*)$/.exec(clickedEl.href);if(matchedSection&&matchedSection[1]){settings=$("#"+matchedSection[1]);item=settings.parent();if(0!=item.length){if(item.hasClass("menu-item-edit-inactive")){if(!settings.data("menu-item-data")){settings.data("menu-item-data",settings.getItemData())}settings.slideDown("fast");item.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{settings.slideUp("fast");item.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(clickedEl){var settings=$(clickedEl).closest(".menu-item-settings");settings.setItemData(settings.data("menu-item-data"));return false},eventOnClickMenuSave:function(clickedEl){var locs="";$("#nav-menu-theme-locations select").each(function(){locs+=''});$("#update-nav-menu").append(locs);api.menuList.find(".menu-item-data-position").val(function(index){return index+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(clickedEl){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(clickedEl){var itemID=parseInt(clickedEl.id.replace("delete-",""),10);api.removeMenuItem($("#menu-item-"+itemID));api.registerChange();return false},processQuickSearchQueryResponse:function(resp,req,panel){var i,matched,newID,takenIDs={},form=document.getElementById("nav-menu-meta"),pattern=new RegExp("menu-item\\[([^\\]]*)","g"),items=resp.match(/.*<\/li>/g);if(!items){$(".categorychecklist",panel).html(""+navMenuL10n.noResultsFound+"
");$("img.waiting",panel).hide();return}i=items.length;while(i--){matched=pattern.exec(items[i]);if(matched&&matched[1]){newID=matched[1];while(form.elements["menu-item["+newID+"][menu-item-type]"]||takenIDs[newID]){newID--}takenIDs[newID]=true;if(newID!=matched[1]){items[i]=items[i].replace(new RegExp("menu-item\\["+matched[1]+"\\]","g"),"menu-item["+newID+"]")}}}$(".categorychecklist",panel).html(items.join(""));$("img.waiting",panel).hide()},removeMenuItem:function(el){var children=el.childMenuItems();el.addClass("deleting").animate({opacity:0,height:0},350,function(){var ins=$("#menu-instructions");el.remove();children.shiftDepthClass(-1).updateParentMenuItemDBId();if(!ins.siblings().length){ins.removeClass("menu-instructions-inactive")}})},depthToPx:function(depth){return depth*api.options.menuItemDepthPerLevel},pxToDepth:function(px){return Math.floor(px/api.options.menuItemDepthPerLevel)}};$(document).ready(function(){wpNavMenu.init()})})(jQuery);
\ No newline at end of file
+var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.negateIfRTL*a.pxToDepth(s.left-i);if(r>e||s.topo){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length0?0:s;r[d]=s+"px";k.animate(r,100,"linear")}if(t>f){m.add(e).hide()}else{m.add(e).show()}}b.fn.extend({makeTabVisible:function(){var v=this.eq(0),w,u,s={},r=0;if(!v.length){return this}w=v.offset().left;u=w+v.outerWidth();if(u>p){r=p-u}else{if(w=g)?true:false}});n.each(function(){f+=b(this).outerWidth(true)});j.padding=0;j[q]=(-1*f)+"px";k.css(j);m=b('');e=b('');i.wrap('').parent().prepend(m).append(e);c();b(window).resize(function(){if(l){clearTimeout(l)}l=setTimeout(c,200)});b.each([{arrow:m,next:"next",last:"first",operator:"+="},{arrow:e,next:"prev",last:"last",operator:"-="}],function(){var r=this;this.arrow.mousedown(function(){var u=Math.abs(parseInt(k.css(d))),s=u,t={};if("-="==r.operator){s=Math.abs(f-i.width())-u}if(!s){return}t[d]=r.operator+s+"px";k.animate(t,s*o,"linear")}).mouseup(function(){var t,s;k.stop(true);t=n[r.last]();while((s=t[r.next]())&&s.length&&!s.isTabVisible()){t=s}t.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(e){var f="",c=b("#menu-name"),d=c.val();if(!d||d==c.attr("title")||!d.replace(/\s+/,"")){c.parent().addClass("form-invalid");return false}b("#nav-menu-theme-locations select").each(function(){f+=''});b("#update-nav-menu").append(f);a.menuList.find(".menu-item-data-position").val(function(g){return g+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/.*<\/li>/g);if(!k){b(".categorychecklist",c).html(""+navMenuL10n.noResultsFound+"
");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery);
\ No newline at end of file
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 23536fd990..30e17b1dc9 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -385,7 +385,7 @@ function wp_default_scripts( &$scripts ) {
) );
// Custom Navigation
- $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100529' );
+ $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100603' );
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
'custom' => _x('Custom', 'menu nav item type'),
'thickbox' => _x('Edit Menu Item', 'Thickbox Title'),
@@ -463,7 +463,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
- $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100602' );
+ $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100603' );
foreach ( $rtl_styles as $rtl_style ) {
$styles->add_data( $rtl_style, 'rtl', true );