diff --git a/wp-admin/css/nav-menu.css b/wp-admin/css/nav-menu.css index 371794e11b..5165a80929 100644 --- a/wp-admin/css/nav-menu.css +++ b/wp-admin/css/nav-menu.css @@ -1 +1 @@ -#nav-menus-frame{margin-left:300px;}#menu-settings-column{display:block;width:281px;margin-left:-300px;clear:both;float:left;}#menu-settings-column .inside{padding:0 10px;}#menu-settings-column .handlediv{background:url("../images/menu-bits.gif") no-repeat scroll 0 -110px;}#wpbody{position:relative;}#menu-management-liquid{float:left;min-width:100%;}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;}#menu-management .menu-edit{margin-bottom:20px;}#nav-menu-header,#post-body{border-color:#ccc;border-style:solid;}#nav-menu-header{background:url("../images/gray-grad.png") repeat-x scroll left top #dfdfdf;border-width:1px 1px 0 1px;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;-khtml-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;-khtml-border-top-right-radius:6px;border-top-right-radius:6px;}#post-body{background:#fff;padding:0 0 10px 10px;border-width:0 1px 1px 1px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;-khtml-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;-khtml-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}.post-body-plain{padding:10px 10px 0 0;}#menu-management .menu-add-new abbr{font-weight:bold;}#menu-management .nav-tabs{padding-left:30px;}#menu-management .nav-tab{background:#f4f4f4;font-weight:bold;border-color:#dfdfdf;}#menu-management .nav-tab-active{background:#ececec;border-color:#ccc;border-bottom-color:#ececec;}#menu-management #major-publishing-actions #delete-action{float:right;margin-right:10px;}#menu-name-label{margin-top:-2px;}#wpbody .open-label{display:inline-block;}#wpbody .open-label span{padding-right:10px;}.js .label-with-default-title{color:#aaa;font-style:italic;}#menu-management .inside{padding:0 10px;}.postbox .howto input{width:180px;float:right;}.customlinkdiv .howto input{width:210px;}#menu-container .submit{margin:0 0 10px;padding:0;}.submitdelete,.submitclose{font-size:11px;}#cancel-save{color:#f00;text-decoration:underline;font-size:11px;margin-left:20px;margin-top:5px;}#cancel-save:hover{background-color:#F00;color:#fff;}.list-controls{float:left;}.add-to-menu{float:right;}form.processing .add-to-menu{background:url("../images/wpspin_light.gif") no-repeat top center;display:block;height:20px;overflow:hidden;text-align:left;text-indent:-999em;width:20px;}.button-controls{margin:10px 0;}.show-all,.hide-all{cursor:pointer;}.hide-all{display:none;}#create-menu-name{width:159px;}#manage-menu .inside{padding:0;}#available-links dt{display:block;}#add-custom-link .howto{font-size:11px;}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px;}.menu-item-textbox{width:180px;}.howto span{margin-top:4px;display:block;float:left;}.quick-search{width:190px;}.list-wrap{display:none;clear:both;margin-bottom:10px;}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid #DFDFDF;-moz-border-radius:4px;}.postbox p.submit{margin-bottom:0;}.list li{display:none;margin:0;margin-bottom:5px;}.list li .menu-item-title{cursor:pointer;display:block;}.list li .menu-item-title input{margin-right:3px;margin-top:-3px;}.list li li .menu-item-title{margin-left:14px;}.list li li li .menu-item-title{margin-left:28px;}.list li li li li .menu-item-title{margin-left:42px;}.list li li li li li .menu-item-title{margin-left:56px;}.list li li li li li li .menu-item-title{margin-left:70px;}.list li li li li li li li .menu-item-title{margin-left:84px;}.list li li li li li li li li .menu-item-title{margin-left:98px;}.list li li li li li li li li li .menu-item-title{margin-left:112px;}#menu-container .inside{padding-bottom:10px;}.menu{padding-top:1em;}.menu ul{width:100%;}.menu li{margin:0;}.menu li dl{clear:both;line-height:1.5em;position:relative;}.menu li dl dt{background:url("../images/gray-grad.png") repeat-x scroll left top #DFDFDF;border:1px solid #E6E6E6;clear:both;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #FFF;font-weight:bold;overflow:hidden;}.menu li dl.menu-item-edit-inactive dt{border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-khtml-border-radius:6px;}.menu li dl.menu-item-edit-active dt{-moz-border-radius:6px 6px 0 0;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-khtml-border-top-right-radius:6px;-khtml-border-top-left-radius:6px;border-top-right-radius:6px;border-top-left-radius:6px;}.js .menu li dl dt{cursor:move;}.no-js .menu li dl{margin-top:13px;}.menu li.deleting dl dt{background-color:#faa;}.menu li .item-title{padding:7px 0;line-height:20px;display:block;margin-right:13em;}.menu li .sortable-placeholder{width:430px;}.menu li div.sortable-placeholder{background:#f5f5f5;border:1px dashed #bbb;margin:10px 0;padding-top:40px;}.menu li dl.sortable-placeholder{background:#f5f5f5;padding-bottom:40px;}.menu li li{margin-left:20px;}.dropzone{height:7px;margin:3px 0 3px 0;}.item-type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}.item-controls{font-size:11px;position:absolute;right:20px;top:-1px;}.item-controls a{text-decoration:none;}.item-controls a:hover{cursor:pointer;}.item-controls .item-order{padding-right:10px;}.item-controls .item-order a{font-weight:bold;}body.js .item-order{display:none;}.item-controls .menu-item-delete:hover{color:#f00;}.item-edit{background:url("../images/menu-bits.gif") no-repeat scroll 0 -105px;position:absolute;right:-20px;top:0;display:block;width:23px;height:36px;overflow:hidden;text-indent:-999em;border-bottom:1px solid #eee;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.menu-item-settings{background:#F9F9F9;width:400px;padding:10px 0 10px 10px;border:solid #E6E6E6;border-width:0 1px 1px 1px;-moz-border-radius:0 0 6px 6px;-webkit-border-bottom-right-radius:6px;-webkit-border-bottom-left-radius:6px;-khtml-border-bottom-right-radius:6px;-khtml-border-bottom-left-radius:6px;}.menu-item-settings.menu-item-edit-active{display:block;}.menu-item-settings.menu-item-edit-inactive{display:none;}.add-menu-item-pagelinks{margin:.5em auto;text-align:center;}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:11px;color:#777;font-style:italic;border:1px solid #dfdfdf;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-khtml-border-radius:6px;}.link-to-original a{padding-left:4px;font-style:normal;}.hidden-field{display:none;}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left;}.description-thin{width:190px;height:40px;}.description-wide{width:390px;}.menu-item-actions{padding-top:15px;line-height:25px;}.save-menu-item{padding-left:10px;float:right;}#cancel-save{cursor:pointer;}#cancel-save:hover{color:#fff!important;}#update-menu-item{color:#fff!important;}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important;}.major-publishing-actions{padding:5px 10px;border-bottom:1px solid #eee;}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;}.major-publishing-actions .delete-action{line-height:25px;vertical-align:middle;text-align:left;float:right;padding-right:15px;}.menu-name-label span{font-size:11px;font-style:normal;}.submitbox .submitclose{color:#21759B;border-bottom:1px solid #21759B;padding:1px 2px;text-decoration:none;}.submitbox .submitclose:hover{background:#21759B;color:#fff;}.menu-item-settings:after,.button-controls:after,#menu-item-url-wrap:after,#menu-item-name-wrap:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.menu-item-settings,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block;} \ No newline at end of file +#nav-menus-frame{margin-left:300px;}#menu-settings-column{display:block;width:281px;margin-left:-300px;clear:both;float:left;}#menu-settings-column .inside{padding:0 10px;}#menu-settings-column .handlediv{background:url("../images/menu-bits.gif") no-repeat scroll 0 -110px;}#wpbody{position:relative;}#menu-management-liquid{float:left;min-width:100%;}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;}#menu-management .menu-edit{margin-bottom:20px;}#nav-menu-header,#post-body{border-color:#ccc;border-style:solid;}#nav-menu-header{background:url("../images/gray-grad.png") repeat-x scroll left top #dfdfdf;border-width:1px 1px 0 1px;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;-khtml-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;-khtml-border-top-right-radius:6px;border-top-right-radius:6px;}#post-body{background:#fff;padding:0 0 10px 10px;border-width:0 1px 1px 1px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;-khtml-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;-khtml-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}.post-body-plain{padding:10px 10px 0 0;}#menu-management .menu-add-new abbr{font-weight:bold;}#menu-management .nav-tabs{padding-left:30px;}#menu-management .nav-tab{background:#f4f4f4;font-weight:bold;border-color:#dfdfdf;}#menu-management .nav-tab-active{background:#ececec;border-color:#ccc;border-bottom-color:#ececec;}#menu-management #major-publishing-actions #delete-action{float:right;margin-right:10px;}#menu-name-label{margin-top:-2px;}#wpbody .open-label{display:inline-block;}#wpbody .open-label span{padding-right:10px;}.js .label-with-default-title{color:#aaa;font-style:italic;}#menu-management .inside{padding:0 10px;}.postbox .howto input{width:180px;float:right;}.customlinkdiv .howto input{width:210px;}#menu-container .submit{margin:0 0 10px;padding:0;}.submitdelete,.submitclose{font-size:11px;}#cancel-save{color:#f00;text-decoration:underline;font-size:11px;margin-left:20px;margin-top:5px;}#cancel-save:hover{background-color:#F00;color:#fff;}.list-controls{float:left;}.add-to-menu{float:right;}.postbox img.waiting{display:none vertical-align:middle;}form.processing .postbox img.waiting{display:inline;}.button-controls{margin:10px 0;}.show-all,.hide-all{cursor:pointer;}.hide-all{display:none;}#create-menu-name{width:159px;}#manage-menu .inside{padding:0;}#available-links dt{display:block;}#add-custom-link .howto{font-size:11px;}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px;}.menu-item-textbox{width:180px;}.howto span{margin-top:4px;display:block;float:left;}.quick-search{width:190px;}.list-wrap{display:none;clear:both;margin-bottom:10px;}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid #DFDFDF;-moz-border-radius:4px;}.postbox p.submit{margin-bottom:0;}.list li{display:none;margin:0;margin-bottom:5px;}.list li .menu-item-title{cursor:pointer;display:block;}.list li .menu-item-title input{margin-right:3px;margin-top:-3px;}.list li li .menu-item-title{margin-left:14px;}.list li li li .menu-item-title{margin-left:28px;}.list li li li li .menu-item-title{margin-left:42px;}.list li li li li li .menu-item-title{margin-left:56px;}.list li li li li li li .menu-item-title{margin-left:70px;}.list li li li li li li li .menu-item-title{margin-left:84px;}.list li li li li li li li li .menu-item-title{margin-left:98px;}.list li li li li li li li li li .menu-item-title{margin-left:112px;}#menu-container .inside{padding-bottom:10px;}.menu{padding-top:1em;}.menu ul{width:100%;}.menu li{margin:0;}.menu li dl{clear:both;line-height:1.5em;position:relative;}.menu li dl dt{background:url("../images/gray-grad.png") repeat-x scroll left top #DFDFDF;border:1px solid #E6E6E6;clear:both;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #FFF;font-weight:bold;overflow:hidden;}.menu li dl.menu-item-edit-inactive dt{border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-khtml-border-radius:6px;}.menu li dl.menu-item-edit-active dt{-moz-border-radius:6px 6px 0 0;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-khtml-border-top-right-radius:6px;-khtml-border-top-left-radius:6px;border-top-right-radius:6px;border-top-left-radius:6px;}.js .menu li dl dt{cursor:move;}.no-js .menu li dl{margin-top:13px;}.menu li.deleting dl dt{background-color:#faa;}.menu li .item-title{padding:7px 0;line-height:20px;display:block;margin-right:13em;}.menu li .sortable-placeholder{width:430px;}.menu li div.sortable-placeholder{background:#f5f5f5;border:1px dashed #bbb;margin:10px 0;padding-top:40px;}.menu li dl.sortable-placeholder{background:#f5f5f5;padding-bottom:40px;}.menu li li{margin-left:20px;}.dropzone{height:7px;margin:3px 0 3px 0;}.item-type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}.item-controls{font-size:11px;position:absolute;right:20px;top:-1px;}.item-controls a{text-decoration:none;}.item-controls a:hover{cursor:pointer;}.item-controls .item-order{padding-right:10px;}.item-controls .item-order a{font-weight:bold;}body.js .item-order{display:none;}.item-controls .menu-item-delete:hover{color:#f00;}.item-edit{background:url("../images/menu-bits.gif") no-repeat scroll 0 -105px;position:absolute;right:-20px;top:0;display:block;width:23px;height:36px;overflow:hidden;text-indent:-999em;border-bottom:1px solid #eee;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.menu-item-settings{background:#F9F9F9;width:400px;padding:10px 0 10px 10px;border:solid #E6E6E6;border-width:0 1px 1px 1px;-moz-border-radius:0 0 6px 6px;-webkit-border-bottom-right-radius:6px;-webkit-border-bottom-left-radius:6px;-khtml-border-bottom-right-radius:6px;-khtml-border-bottom-left-radius:6px;}.menu-item-settings.menu-item-edit-active{display:block;}.menu-item-settings.menu-item-edit-inactive{display:none;}.add-menu-item-pagelinks{margin:.5em auto;text-align:center;}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:11px;color:#777;font-style:italic;border:1px solid #dfdfdf;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-khtml-border-radius:6px;}.link-to-original a{padding-left:4px;font-style:normal;}.hidden-field{display:none;}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left;}.description-thin{width:190px;height:40px;}.description-wide{width:390px;}.menu-item-actions{padding-top:15px;line-height:25px;}.save-menu-item{padding-left:10px;float:right;}#cancel-save{cursor:pointer;}#cancel-save:hover{color:#fff!important;}#update-menu-item{color:#fff!important;}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important;}.major-publishing-actions{padding:5px 10px;border-bottom:1px solid #eee;}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;}.major-publishing-actions .delete-action{line-height:25px;vertical-align:middle;text-align:left;float:right;padding-right:15px;}.menu-name-label span{font-size:11px;font-style:normal;}.submitbox .submitclose{color:#21759B;border-bottom:1px solid #21759B;padding:1px 2px;text-decoration:none;}.submitbox .submitclose:hover{background:#21759B;color:#fff;}.menu-item-settings:after,.button-controls:after,#menu-item-url-wrap:after,#menu-item-name-wrap:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.menu-item-settings,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block;} \ No newline at end of file diff --git a/wp-admin/css/nav-menu.dev.css b/wp-admin/css/nav-menu.dev.css index ae8e166585..6032abb616 100644 --- a/wp-admin/css/nav-menu.dev.css +++ b/wp-admin/css/nav-menu.dev.css @@ -148,14 +148,12 @@ float: right; } -form.processing .add-to-menu { - background: url("../images/wpspin_light.gif") no-repeat top center; - display:block; - height:20px; - overflow:hidden; - text-align:left; - text-indent:-999em; - width:20px; +.postbox img.waiting { + display: none + vertical-align: middle; +} +form.processing .postbox img.waiting { + display: inline; } .button-controls { margin: 10px 0; } diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 9d8b15d17a..6e1584c864 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -434,6 +434,7 @@ function wp_nav_menu_item_link_meta_box() {

+

@@ -622,6 +623,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) { +

@@ -789,6 +791,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { +

diff --git a/wp-admin/js/nav-menu.dev.js b/wp-admin/js/nav-menu.dev.js index 226956635f..e5bede045a 100644 --- a/wp-admin/js/nav-menu.dev.js +++ b/wp-admin/js/nav-menu.dev.js @@ -240,6 +240,9 @@ var WPNavMenuHandler = function () { $(formEL).bind('submit', function(e) { return that.eventSubmitMetaForm.call(that, this, e); }); + $(formEL).find('input:submit').click(function() { + $(this).siblings('img.waiting').show(); + }); }, attachTabsPanelListeners : function() { @@ -484,9 +487,7 @@ var WPNavMenuHandler = function () { processMethod = function(){}, re = new RegExp('menu-item\\[(\[^\\]\]*)'); - thisForm.className = thisForm.className + ' processing', that = this; - params['action'] = ''; while ( i-- ) { @@ -533,7 +534,7 @@ var WPNavMenuHandler = function () { $.post( ajaxurl, params, function(menuMarkup) { processMethod.call(that, menuMarkup, params); - thisForm.className = thisForm.className.replace(/processing/g, ''); + $(thisForm).find('img.waiting').hide(); }); return false; diff --git a/wp-admin/js/nav-menu.js b/wp-admin/js/nav-menu.js index a05d07b30e..2ee27cebd4 100644 --- a/wp-admin/js/nav-menu.js +++ b/wp-admin/js/nav-menu.js @@ -1 +1 @@ -var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=getParentWrapper(u.target,"inside"),p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");q.className=q.className+" processing",that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http://"!=u[t].value)){r.action="add-menu-item";x=that.processAddMenuItemResponse;v=z.exec(u[t].name);p="undefined"==typeof v[1]?0:parseInt(v[1],10);y=b(p);for(s in y){r["menu-item["+p+"]["+s+"]"]=y[s]}u[t].checked=false}else{if(""==r.action&&""!=u[t].value&&u[t].className&&-1!=u[t].className.search(/quick-search\b[^-]/)){r.action="menu-quick-search";r.q=u[t].value;r["response-format"]="markup";r.type=u[t].name;x=that.processQuickSearchQueryResponse}}}r.menu=q.elements.menu.value;r["menu-settings-column-nonce"]=q.elements["menu-settings-column-nonce"].value;h.post(ajaxurl,r,function(A){x.call(that,A,r);q.className=q.className.replace(/processing/g,"")});return false},makeListItemDraggable:function(p){h(p).draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName("div"),p=q.length,s=document.createElement("div");while(p--){if(q[p].className&&-1!=q[p].className.indexOf("dropzone")&&(r==q[p].parentNode)){return q[p]}}s.className="dropzone";r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+"-dummy-list-item"),s,r,t=document.createElement("ul");t.innerHTML=p;r=t.getElementsByTagName("li");s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h("#custom-menu-item-name").val("").blur();h("#custom-menu-item-url").val("http://")},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement("ul"),p=document.getElementById("nav-menu-meta"),u,x,r,z,v,w=new RegExp("menu-item\\[([^\\]]*)"),s;r=w.exec(t);if(r&&r[1]){v=r[1];while(p.elements["menu-item["+v+"][menu-item-type]"]){v--}if(v!=r[1]){t=t.replace(new RegExp("menu-item\\["+r[1]+"\\]","g"),"menu-item["+v+"]")}}q.innerHTML=t;x=q.getElementsByTagName("li");if(x[0]&&y.object_type){s=document.getElementById(y.object_type+"-search-checklist");if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&&r[2]){s=document.getElementById(r[2]+"-search-checklist");if(s){u=x.length;if(!u){z=document.createElement("li");z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName("input"),q,p=0;for(q=0;q dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName("div"),p=q.length,s=document.createElement("div");while(p--){if(q[p].className&&-1!=q[p].className.indexOf("dropzone")&&(r==q[p].parentNode)){return q[p]}}s.className="dropzone";r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+"-dummy-list-item"),s,r,t=document.createElement("ul");t.innerHTML=p;r=t.getElementsByTagName("li");s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h("#custom-menu-item-name").val("").blur();h("#custom-menu-item-url").val("http://")},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement("ul"),p=document.getElementById("nav-menu-meta"),u,x,r,z,v,w=new RegExp("menu-item\\[([^\\]]*)"),s;r=w.exec(t);if(r&&r[1]){v=r[1];while(p.elements["menu-item["+v+"][menu-item-type]"]){v--}if(v!=r[1]){t=t.replace(new RegExp("menu-item\\["+r[1]+"\\]","g"),"menu-item["+v+"]")}}q.innerHTML=t;x=q.getElementsByTagName("li");if(x[0]&&y.object_type){s=document.getElementById(y.object_type+"-search-checklist");if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&&r[2]){s=document.getElementById(r[2]+"-search-checklist");if(s){u=x.length;if(!u){z=document.createElement("li");z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName("input"),q,p=0;for(q=0;q'; $output .= ''; // Menu item hidden fields