Ticket #11817: ticket_11817_more_enhancements.diff
File ticket_11817_more_enhancements.diff, 52.0 KB (added by , 15 years ago) |
---|
-
wp-includes/nav-menu-template.php
149 149 150 150 case 'default': 151 151 $template_dir = get_bloginfo('url'); 152 $menu_id = 'menu-item-' . $menu_item->ID; 152 153 ?> 153 154 <dl> 154 155 <dt> 155 < a class="title" title="<?php esc_attr_e('Add to Menu'); ?>" onclick="appendToList('<?php echo esc_js( esc_url_raw( $template_dir ) ); ?>','<?php echo esc_js( $menu_item->append ); ?>','<?php echo esc_js( $menu_item->title ); ?>','<?php echo esc_js( $menu_item->link ); ?>','<?php echo esc_js( $menu_item->ID ); ?>','<?php echo esc_js( $menu_item->parent_item ); ?>','<?php echo esc_js( $menu_item->description ); ?>')" name="<?php echo esc_attr( $menu_item->title ); ?>" value="<?php echo esc_attr( $menu_item->link ); ?>"><?php echo $menu_item->title; ?></a>156 <label class="title"><input type="checkbox" id="<?php echo esc_attr($menu_id); ?>" onclick="updateQueue('<?php echo esc_js( esc_url_raw( $template_dir ) ); ?>','<?php echo esc_js( $menu_item->append ); ?>','<?php echo esc_js( $menu_item->title ); ?>','<?php echo esc_js( $menu_item->link ); ?>','<?php echo esc_js( $menu_item->ID ); ?>','<?php echo esc_js( $menu_item->parent_item ); ?>','<?php echo esc_js( $menu_item->description ); ?>')" name="<?php echo esc_attr( $menu_item->title ); ?>" value="<?php echo esc_attr( $menu_item->link ); ?>" /><?php echo $menu_item->title; ?></label> 156 157 </dt> 157 158 </dl> 158 159 <?php -
wp-includes/script-loader.php
398 398 399 399 // Custom Navigation 400 400 $scripts->add( 'nav-menu-default-items', "/wp-admin/js/nav-menu-default-items$suffix.js", false, '20100223' ); 401 $scripts->add( 'nav-menu-dynamic-functions', "/wp-admin/js/nav-menu-dynamic-functions$suffix.js", false, '2010022 4b' );401 $scripts->add( 'nav-menu-dynamic-functions', "/wp-admin/js/nav-menu-dynamic-functions$suffix.js", false, '20100225b' ); 402 402 $scripts->localize( 'nav-menu-dynamic-functions', 'navMenuL10n', array( 403 403 'custom' => _x('Custom', 'menu nav item type'), 404 404 'page' => _x('Page', 'menu nav item type'), … … 474 474 $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' ); 475 475 $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' ); 476 476 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' ); 477 $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100225 ' );477 $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100225b' ); 478 478 479 479 foreach ( $rtl_styles as $rtl_style ) { 480 480 $styles->add_data( $rtl_style, 'rtl', true ); -
wp-admin/js/nav-menu-dynamic-functions.js
1 function removeitem(c){var b=document.getElementById("menu-"+c);if(b){var a=document.getElementById("menu-"+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=jQuery("#title"+a).attr("value");itemURL=jQuery("#linkurl"+a).attr("value");itemAnchorTitle=jQuery("#anchortitle"+a).attr("value");itemNewWindow=jQuery("#newwindow"+a).attr("value");itemDesc=jQuery("#description"+a).attr("value");jQuery("#dialog-confirm").dialog("option","itemID",a);jQuery("#dialog-confirm").dialog("open");jQuery("#edittitle").attr("value",itemTitle);jQuery("#editlink").attr("value",itemURL);jQuery("#editanchortitle").attr("value",itemAnchorTitle);jQuery("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");jQuery("#editdescription").attr("value",itemDesc)}function updatepostdata(){var a=0;jQuery("#custom-nav").find("li").each(function(c){c=c+1;var b=jQuery(this).attr("value");jQuery(this).find("#position"+b).attr("value",c);jQuery(this).attr("id","menu-"+c);jQuery(this).attr("value",c);jQuery(this).find("#dbid"+b).attr("name","dbid"+c);jQuery(this).find("#dbid"+b).attr("id","dbid"+c);jQuery(this).find("#postmenu"+b).attr("name","postmenu"+c);jQuery(this).find("#postmenu"+b).attr("id","postmenu"+c);var d=jQuery(this).find("#parent"+b).parent().parent().parent().attr("value");jQuery(this).find("#parent"+b).attr("name","parent"+c);jQuery(this).find("#parent"+b).attr("id","parent"+c);if(d){}else{d=0}jQuery(this).find("#parent"+b).attr("value",d);jQuery(this).find("#title"+b).attr("name","title"+c);jQuery(this).find("#title"+b).attr("id","title"+c);jQuery(this).find("#linkurl"+b).attr("name","linkurl"+c);jQuery(this).find("#linkurl"+b).attr("id","linkurl"+c);jQuery(this).find("#description"+b).attr("name","description"+c);jQuery(this).find("#description"+b).attr("id","description"+c);jQuery(this).find("#icon"+b).attr("name","icon"+c);jQuery(this).find("#icon"+b).attr("id","icon"+c);jQuery(this).find("#position"+b).attr("name","position"+c);jQuery(this).find("#position"+b).attr("id","position"+c);jQuery(this).find("#linktype"+b).attr("name","linktype"+c);jQuery(this).find("#linktype"+b).attr("id","linktype"+c);jQuery(this).find("#anchortitle"+b).attr("name","anchortitle"+c);jQuery(this).find("#anchortitle"+b).attr("id","anchortitle"+c);jQuery(this).find("#newwindow"+b).attr("name","newwindow"+c);jQuery(this).find("#newwindow"+b).attr("id","newwindow"+c);jQuery(this).find("dl > dt > span > #remove"+b).attr("value",c);jQuery(this).find("dl > dt > span > #remove"+b).attr("onClick","removeitem("+c+")");jQuery(this).find("dl > dt > span > #remove"+b).attr("id","remove"+c);jQuery("#li-count").attr("value",c)})}function appendToList(b,s,d,n,h,l,e){var k="";var c="";var r="";var o="";var i="";var a="";if(s==navMenuL10n.custom){k=document.getElementById("custom-menu-item-name").value;c=document.getElementById("custom-menu-item-url").value;r="";o="";inputlinktype="custom";i=""}else{if(s==navMenuL10n.page){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="page";i=htmlentities(e.toString())}else{if(s==navMenuL10n.category){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="category";i=htmlentities(e.toString())}else{k="";k="";r="";o="";inputlinktype="custom";i=""}}}var g=document.getElementById("custom-nav").getElementsByTagName("li").length+1;var p=g;var m=0;try{var q=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}}jQuery(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');jQuery("#message").animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});jQuery("#custom-nav").append('<li id="menu-'+p+'" value="'+p+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+k+'</span><span class="controls"><span class="type">'+s+'</span><a id="edit'+p+'" onclick="edititem('+p+')" value="'+p+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+b+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+p+'" onclick="removeitem('+p+')" value="'+p+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+b+'/wp-admin/images/ico-close.png" /></a> <a href="'+c+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+b+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+c+'">'+k+'</a><input type="hidden" name="postmenu'+p+'" id="postmenu'+p+'" value="'+r+'" /><input type="hidden" name="parent'+p+'" id="parent'+p+'" value="'+o+'" /><input type="hidden" name="title'+p+'" id="title'+p+'" value="'+k+'" /><input type="hidden" name="linkurl'+p+'" id="linkurl'+p+'" value="'+c+'" /><input type="hidden" name="description'+p+'" id="description'+p+'" value="'+i+'" /><input type="hidden" name="icon'+p+'" id="icon'+p+'" value="'+a+'" /><input type="hidden" name="position'+p+'" id="position'+p+'" value="'+p+'" /><input type="hidden" name="linktype'+p+'" id="linktype'+p+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+p+'" id="anchortitle'+p+'" value="'+k+'" /><input type="hidden" name="newwindow'+p+'" id="newwindow'+p+'" value="0" /></li>');jQuery("#menu-"+p+"").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});jQuery("#menu-"+p+" dl, #menu-"+p+" .dropzone").droppable({accept:"#"+p+", #custom-nav li",tolerance:"pointer",drop:function(x,w){var t=jQuery(this).parent();var y=!jQuery(this).hasClass("dropzone");if(y&&t.children("ul").length==0){t.append("<ul/>")}if(y){t.children("ul").append(w.draggable)}else{t.before(w.draggable)}t.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var v=w.draggable.attr("value");var u=t.attr("value");t.find("#menu-"+v).find("#parent"+v).val(u);jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style")},over:function(){if(jQuery(this).attr("class")=="dropzone ui-droppable"){jQuery(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(jQuery(this).attr("class")=="ui-droppable"){jQuery(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var t=jQuery(this).parent().attr("id")},out:function(){jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style");jQuery(this).filter(".dropzone").css({borderColor:""})}});updatepostdata()};2 No newline at end of file 1 jQuery(document).ready(function(){jQuery(".quick-search").click(function(){jQuery(this).attr("value","")});jQuery(".show-all").click(function(){jQuery(this).parent().siblings(".list-container").css("display","block");jQuery(this).siblings(".quick-search").attr("value","");jQuery(this).parent().siblings(".list-container").find("dt").css("display","block");jQuery(this).hide();jQuery(this).siblings(".hide-all").show()});jQuery(".hide-all").click(function(){jQuery(this).parent().siblings(".list-container").css("display","none");jQuery(this).siblings(".quick-search").attr("value","Search");jQuery(this).parent().siblings(".list-container").find("dt").css("display","none");jQuery(this).hide();jQuery(this).siblings(".show-all").show()})});function removeitem(o){var todelete=document.getElementById("menu-"+o);if(todelete){var parenttodelete=document.getElementById("menu-"+o).parentNode;throwaway_node=parenttodelete.removeChild(todelete)}updatepostdata()}function edititem(o){itemTitle=jQuery("#title"+o).val();itemURL=jQuery("#linkurl"+o).val();itemAnchorTitle=jQuery("#anchortitle"+o).val();itemNewWindow=jQuery("#newwindow"+o).val();itemDesc=jQuery("#description"+o).val();jQuery("#dialog-confirm").dialog("option","itemID",o);jQuery("#dialog-confirm").dialog("open");jQuery("#edittitle").val(itemTitle);if("custom"==jQuery("#linktype"+o).val()){jQuery("#editlink-wrap").css("display","inline")}else{jQuery("#editlink-wrap").css("display","none")}jQuery("#editlink").val(itemURL);jQuery("#editanchortitle").val(itemAnchorTitle);jQuery("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");jQuery("#editdescription").val(itemDesc)}function updatepostdata(){var i=0;jQuery("#custom-nav").find("li").each(function(i){i=i+1;var j=jQuery(this).attr("value");jQuery(this).find("#position"+j).attr("value",i);jQuery(this).attr("id","menu-"+i);jQuery(this).attr("value",i);jQuery(this).find("#dbid"+j).attr("name","dbid"+i);jQuery(this).find("#dbid"+j).attr("id","dbid"+i);jQuery(this).find("#postmenu"+j).attr("name","postmenu"+i);jQuery(this).find("#postmenu"+j).attr("id","postmenu"+i);var p=jQuery(this).find("#parent"+j).parent().parent().parent().attr("value");jQuery(this).find("#parent"+j).attr("name","parent"+i);jQuery(this).find("#parent"+j).attr("id","parent"+i);if(p){}else{p=0}jQuery(this).find("#parent"+j).attr("value",p);jQuery(this).find("#title"+j).attr("name","title"+i);jQuery(this).find("#title"+j).attr("id","title"+i);jQuery(this).find("#linkurl"+j).attr("name","linkurl"+i);jQuery(this).find("#linkurl"+j).attr("id","linkurl"+i);jQuery(this).find("#description"+j).attr("name","description"+i);jQuery(this).find("#description"+j).attr("id","description"+i);jQuery(this).find("#icon"+j).attr("name","icon"+i);jQuery(this).find("#icon"+j).attr("id","icon"+i);jQuery(this).find("#position"+j).attr("name","position"+i);jQuery(this).find("#position"+j).attr("id","position"+i);jQuery(this).find("#linktype"+j).attr("name","linktype"+i);jQuery(this).find("#linktype"+j).attr("id","linktype"+i);jQuery(this).find("#anchortitle"+j).attr("name","anchortitle"+i);jQuery(this).find("#anchortitle"+j).attr("id","anchortitle"+i);jQuery(this).find("#newwindow"+j).attr("name","newwindow"+i);jQuery(this).find("#newwindow"+j).attr("id","newwindow"+i);jQuery(this).find("dl > dt > span > #remove"+j).attr("value",i);jQuery(this).find("dl > dt > span > #remove"+j).attr("onClick","removeitem("+i+")");jQuery(this).find("dl > dt > span > #remove"+j).attr("id","remove"+i);jQuery("#li-count").attr("value",i)})}function updateQueue(templatedir,additemtype,itemtext,itemurl,itemid,itemparentid,itemdescription){var inputvaluevarname="";var inputvaluevarurl="";var inputitemid="";var inputparentid="";var inputdescription="";var inputicon="";if(additemtype==navMenuL10n.custom){inputvaluevarname=document.getElementById("custom-menu-item-name").value;inputvaluevarurl=document.getElementById("custom-menu-item-url").value;inputitemid="";inputparentid="";inputlinktype="custom";inputdescription=""}else{if(additemtype==navMenuL10n.page){inputvaluevarname=htmlentities(itemtext.toString());inputvaluevarurl=itemurl.toString();inputitemid=itemid.toString();inputparentid="0";inputlinktype="page";inputdescription=htmlentities(itemdescription.toString())}else{if(additemtype==navMenuL10n.category){inputvaluevarname=htmlentities(itemtext.toString());inputvaluevarurl=itemurl.toString();inputitemid=itemid.toString();inputparentid="0";inputlinktype="category";inputdescription=htmlentities(itemdescription.toString())}else{inputvaluevarname="";inputvaluevarname="";inputitemid="";inputparentid="";inputlinktype="custom";inputdescription=""}}}var count=document.getElementById("custom-nav").getElementsByTagName("li").length+1;var randomnumber=count;var validatetest=0;try{var test=document.getElementById("menu-"+randomnumber.toString()).value}catch(err){validatetest=1}while(validatetest==0){randomnumber=randomnumber+1;try{var test2=document.getElementById("menu-"+randomnumber.toString()).value}catch(err){validatetest=1}}if(jQuery(menu_item_id="#menu-item-"+inputitemid).attr("checked")){jQuery("#queue").append('<li id="menu-'+randomnumber+'" value="'+randomnumber+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+inputvaluevarname+'</span><span class="controls"><span class="type">'+additemtype+'</span><a id="edit'+randomnumber+'" onclick="edititem('+randomnumber+')" value="'+randomnumber+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+templatedir+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+randomnumber+'" onclick="removeitem('+randomnumber+')" value="'+randomnumber+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+templatedir+'/wp-admin/images/ico-close.png" /></a> <a href="'+inputvaluevarurl+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+templatedir+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+inputvaluevarurl+'">'+inputvaluevarname+'</a><input type="hidden" name="postmenu'+randomnumber+'" id="postmenu'+randomnumber+'" value="'+inputitemid+'" /><input type="hidden" name="parent'+randomnumber+'" id="parent'+randomnumber+'" value="'+inputparentid+'" /><input type="hidden" name="title'+randomnumber+'" id="title'+randomnumber+'" value="'+inputvaluevarname+'" /><input type="hidden" name="linkurl'+randomnumber+'" id="linkurl'+randomnumber+'" value="'+inputvaluevarurl+'" /><input type="hidden" name="description'+randomnumber+'" id="description'+randomnumber+'" value="'+inputdescription+'" /><input type="hidden" name="icon'+randomnumber+'" id="icon'+randomnumber+'" value="'+inputicon+'" /><input type="hidden" name="position'+randomnumber+'" id="position'+randomnumber+'" value="'+randomnumber+'" /><input type="hidden" name="linktype'+randomnumber+'" id="linktype'+randomnumber+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+randomnumber+'" id="anchortitle'+randomnumber+'" value="'+inputvaluevarname+'" /><input type="hidden" name="newwindow'+randomnumber+'" id="newwindow'+randomnumber+'" value="0" /></li>')}else{for(var i=0;i<jQuery('#queue li input[name^="postmenu"]').length;i++){if(itemid==jQuery('#queue li input[name^="postmenu"]')[i].value){var menu_queue_id=jQuery('#queue li input[name^="postmenu"]')[i].name.substring(8,jQuery('#queue li input[name^="postmenu"]')[i].name.length)}}jQuery("#queue li#menu-"+menu_queue_id).remove()}}function addItemsToMenu(button){jQuery(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');jQuery("#message").animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});var items=jQuery("#queue").children();jQuery("#queue").empty();jQuery("#custom-nav").append(items);jQuery(button).offsetParent().find(".list-container input").attr("checked",false);updatepostdata();dragAndDrop()}function dragAndDrop(){jQuery("#custom-nav li").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});jQuery("#custom-nav li dl, #custom-nav li .dropzone").droppable({accept:"#custom-nav li",tolerance:"pointer",drop:function(e,ui){var li=jQuery(this).parent();var child=!jQuery(this).hasClass("dropzone");if(child&&li.children("ul").length==0){li.append("<ul/>")}if(child){li.children("ul").append(ui.draggable)}else{li.before(ui.draggable)}li.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var draggablevalue=ui.draggable.attr("value");var droppablevalue=li.attr("value");li.find("#menu-"+draggablevalue).find("#parent"+draggablevalue).val(droppablevalue);jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style")},over:function(){if(jQuery(this).attr("class")=="dropzone ui-droppable"){jQuery(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(jQuery(this).attr("class")=="ui-droppable"){jQuery(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var parentid=jQuery(this).parent().attr("id")},out:function(){jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style");jQuery(this).filter(".dropzone").css({borderColor:""})}})}; 2 No newline at end of file -
wp-admin/js/nav-menu-dynamic-functions.dev.js
8 8 * @subpackage Administration 9 9 */ 10 10 11 /* 11 jQuery(document).ready(function(){ 12 13 // Clear the search textbox 14 jQuery('.quick-search').click(function(){ 15 jQuery(this).attr( 'value', '' ); 16 }); 17 18 // Show All 19 jQuery('.show-all').click(function(){ 20 jQuery(this).parent().siblings('.list-container').css( 'display','block' ); 21 jQuery(this).siblings('.quick-search').attr( 'value', '' ); 22 jQuery(this).parent().siblings('.list-container').find('dt').css( 'display', 'block' ); 23 jQuery(this).hide(); 24 jQuery(this).siblings('.hide-all').show(); 25 }); 26 27 // Hide All 28 jQuery('.hide-all').click(function(){ 29 jQuery(this).parent().siblings('.list-container').css( 'display','none' ); 30 jQuery(this).siblings('.quick-search').attr( 'value', 'Search' ); 31 jQuery(this).parent().siblings('.list-container').find('dt').css( 'display', 'none' ); 32 jQuery(this).hide(); 33 jQuery(this).siblings('.show-all').show(); 34 }); 35 }); 36 37 /** 12 38 * Removes menu items from current menu 39 * 13 40 * @param int o - the id of the menu li to remove. 14 */ 15 function removeitem(o) 16 { 17 41 */ 42 function removeitem( o ) { 18 43 var todelete = document.getElementById('menu-' + o); 19 20 if (todelete) 21 { 44 45 if ( todelete ) { 22 46 var parenttodelete = document.getElementById('menu-' + o).parentNode; 23 47 throwaway_node = parenttodelete.removeChild(todelete); 24 48 } … … 26 50 updatepostdata(); 27 51 }; 28 52 29 /* 53 /** 30 54 * Loads dialog window to edit menu items from current menu 55 * 31 56 * @param int o - the id of the menu li to edit. 32 */ 33 function edititem(o) 34 { 57 */ 58 function edititem( o ) { 59 itemTitle = jQuery('#title' + o).val(); 60 itemURL = jQuery('#linkurl' + o).val(); 61 itemAnchorTitle = jQuery('#anchortitle' + o).val(); 62 itemNewWindow = jQuery('#newwindow' + o).val(); 63 itemDesc = jQuery('#description' + o).val(); 35 64 36 itemTitle = jQuery('#title' + o).val(); 37 itemURL = jQuery('#linkurl' + o).val(); 38 itemAnchorTitle = jQuery('#anchortitle' + o).val(); 39 itemNewWindow = jQuery('#newwindow' + o).val(); 40 itemDesc = jQuery('#description' + o).val(); 65 jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o ) 41 66 42 jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o )67 jQuery('#dialog-confirm').dialog('open'); 43 68 44 jQuery('#dialog-confirm').dialog('open'); 45 46 jQuery('#edittitle').val( itemTitle ); 47 if ( 'custom' == jQuery( '#linktype' + o ).val() ) { 48 jQuery( '#editlink-wrap' ).css( 'display', 'inline' ); 49 } else { 50 jQuery( '#editlink-wrap' ).css( 'display', 'none' ); 51 } 52 jQuery('#editlink').val( itemURL ); 53 jQuery('#editanchortitle').val( itemAnchorTitle ); 54 jQuery("#editnewwindow option[value='" + itemNewWindow + "']").attr('selected', 'selected'); 55 jQuery('#editdescription').val( itemDesc ); 56 69 jQuery('#edittitle').val( itemTitle ); 70 if ( 'custom' == jQuery( '#linktype' + o ).val() ) { 71 jQuery( '#editlink-wrap' ).css( 'display', 'inline' ); 72 } else { 73 jQuery( '#editlink-wrap' ).css( 'display', 'none' ); 74 } 75 jQuery('#editlink').val( itemURL ); 76 jQuery('#editanchortitle').val( itemAnchorTitle ); 77 jQuery("#editnewwindow option[value='" + itemNewWindow + "']").attr('selected', 'selected'); 78 jQuery('#editdescription').val( itemDesc ); 57 79 }; 58 80 59 /* 81 /** 60 82 * Prepares menu items for POST 61 */ 62 function updatepostdata() 63 { 64 83 */ 84 function updatepostdata() { 65 85 var i = 0; 86 66 87 jQuery("#custom-nav").find("li").each(function(i) { 67 88 i = i + 1; 68 89 var j = jQuery(this).attr('value'); … … 82 103 jQuery(this).find('#parent' + j).attr('name','parent' + i); 83 104 jQuery(this).find('#parent' + j).attr('id','parent' + i); 84 105 if (p) { 85 //Do nothing 86 } 87 else { 88 //reset p to be top level 106 // Do nothing 107 } else { 108 // reset p to be top level 89 109 p = 0; 90 110 } 91 111 … … 122 142 jQuery('#li-count').attr('value',i); 123 143 124 144 }); 125 126 127 128 145 }; 129 146 130 147 /* 131 * Adds item from Page, Category, or Custom options menu 148 * Queues items in perperation for appendToList 149 * 150 * @param string id - The menu item's id 132 151 * @param string templatedir - directory of the add, edit, view images. 133 152 * @param string additemtype - Page, Category, or Custom. 134 153 * @param string itemtext - menu text. … … 137 156 * @param int itemparentid - default 0. 138 157 * @param string itemdescription - the description of the menu item. 139 158 */ 140 function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparentid,itemdescription) 141 { 159 function updateQueue( templatedir, additemtype, itemtext, itemurl, itemid, itemparentid, itemdescription ) { 142 160 var inputvaluevarname = ''; 143 161 var inputvaluevarurl = ''; 144 162 var inputitemid = ''; … … 146 164 var inputdescription = ''; 147 165 var inputicon = ''; 148 166 149 if (additemtype == navMenuL10n.custom) 150 { 167 if ( additemtype == navMenuL10n.custom ) { 151 168 inputvaluevarname = document.getElementById('custom-menu-item-name').value; 152 169 inputvaluevarurl = document.getElementById('custom-menu-item-url').value; 153 170 inputitemid = ''; 154 171 inputparentid = ''; 155 172 inputlinktype = 'custom'; 156 173 inputdescription = ''; 157 } 158 else if (additemtype == navMenuL10n.page) 159 { 174 } else if ( additemtype == navMenuL10n.page ) { 160 175 inputvaluevarname = htmlentities(itemtext.toString()); 161 176 inputvaluevarurl = itemurl.toString(); 162 177 inputitemid = itemid.toString(); … … 164 179 inputlinktype = 'page'; 165 180 inputdescription = htmlentities(itemdescription.toString()); 166 181 167 } 168 else if (additemtype == navMenuL10n.category) 169 { 182 } else if ( additemtype == navMenuL10n.category ) { 170 183 inputvaluevarname = htmlentities(itemtext.toString()); 171 184 inputvaluevarurl = itemurl.toString(); 172 185 inputitemid = itemid.toString(); 173 186 inputparentid = '0'; 174 187 inputlinktype = 'category'; 175 188 inputdescription = htmlentities(itemdescription.toString()); 176 } 177 else 178 { 189 } else { 179 190 inputvaluevarname = ''; 180 191 inputvaluevarname = ''; 181 192 inputitemid = ''; … … 184 195 inputdescription = ''; 185 196 } 186 197 187 var count=document.getElementById('custom-nav').getElementsByTagName('li').length + 1; 188 198 var count = document.getElementById('custom-nav').getElementsByTagName('li').length + 1; 189 199 var randomnumber = count; 190 191 200 var validatetest = 0; 192 201 193 try 194 { 195 var test=document.getElementById("menu-" + randomnumber.toString()).value; 202 try { 203 var test = document.getElementById( 'menu-' + randomnumber.toString() ).value; 196 204 } 197 catch (err) 198 { 205 catch ( err ) { 199 206 validatetest = 1; 200 207 } 201 208 202 while (validatetest == 0) 203 { 209 while ( validatetest == 0 ) { 204 210 randomnumber = randomnumber + 1; 205 206 try 207 { 208 var test2=document.getElementById("menu-" + randomnumber.toString()).value; 211 try { 212 var test2 = document.getElementById( 'menu-' + randomnumber.toString() ).value; 209 213 } 210 catch (err) 211 { 214 catch ( err ) { 212 215 validatetest = 1; 213 216 } 214 217 } 218 219 // Adds or removes the item from the queue 220 if ( jQuery(menu_item_id = '#menu-item-' + inputitemid).attr('checked') ) { 221 222 // Adds the item in the queue 223 jQuery('#queue').append('<li id="menu-' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">' + inputvaluevarname + '</span><span class="controls"><span class="type">' + additemtype + '</span><a id="edit' + randomnumber + '" onclick="edititem(' + randomnumber + ')" value="' + randomnumber +'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="' + templatedir + '/wp-admin/images/ico-edit.png" /></a> <a id="remove' + randomnumber + '" onclick="removeitem(' + randomnumber + ')" value="' + randomnumber +'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="' + templatedir + '/wp-admin/images/ico-close.png" /></a> <a href="' + inputvaluevarurl + '" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="' + templatedir + '/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="' + inputvaluevarurl + '">' + inputvaluevarname + '</a><input type="hidden" name="postmenu' + randomnumber + '" id="postmenu' + randomnumber + '" value="' + inputitemid + '" /><input type="hidden" name="parent' + randomnumber + '" id="parent' + randomnumber + '" value="' + inputparentid + '" /><input type="hidden" name="title' + randomnumber + '" id="title' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="linkurl' + randomnumber + '" id="linkurl' + randomnumber + '" value="' + inputvaluevarurl + '" /><input type="hidden" name="description' + randomnumber + '" id="description' + randomnumber + '" value="' + inputdescription + '" /><input type="hidden" name="icon' + randomnumber + '" id="icon' + randomnumber + '" value="' + inputicon + '" /><input type="hidden" name="position' + randomnumber + '" id="position' + randomnumber + '" value="' + randomnumber + '" /><input type="hidden" name="linktype' + randomnumber + '" id="linktype' + randomnumber + '" value="' + inputlinktype + '" /><input type="hidden" name="anchortitle' + randomnumber + '" id="anchortitle' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="newwindow' + randomnumber + '" id="newwindow' + randomnumber + '" value="0" /></li>'); 224 } else { 225 226 // Get the item in the queue 227 for ( var i = 0; i < jQuery('#queue li input[name^="postmenu"]').length; i++ ) { 228 if ( itemid == jQuery('#queue li input[name^="postmenu"]')[i].value ) { 229 var menu_queue_id = jQuery('#queue li input[name^="postmenu"]')[i].name.substring( 8, jQuery('#queue li input[name^="postmenu"]')[i].name.length ); 230 }; 231 }; 232 233 // Removes the item from the queue 234 jQuery('#queue li#menu-' + menu_queue_id).remove(); 235 }; 236 }; 215 237 216 //Notification Message 238 /* 239 * Grabs items from the queue and adds them to the menu. 240 * 241 * @param string templatedir - directory of the add, edit, view images. 242 * @param string additemtype - Page, Category, or Custom. 243 * @param string itemtext - menu text. 244 * @param string itemurl - url of the menu. 245 * @param int itemid - menu id. 246 * @param int itemparentid - default 0. 247 * @param string itemdescription - the description of the menu item. 248 */ 249 function addItemsToMenu( button ) { 250 // Notification Message 217 251 jQuery('.maintitle').after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>'); 218 252 jQuery('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ jQuery(this).remove();}); 253 254 // Grab items in queue 255 var items = jQuery('#queue').children(); 256 257 // Empty Queue 258 jQuery('#queue').empty(); 259 260 // Appends HTML to the menu 261 jQuery('#custom-nav').append( items ); 262 263 // Uncheck the checkboxes 264 jQuery(button).offsetParent().find('.list-container input').attr('checked', false); 265 266 updatepostdata(); 267 dragAndDrop(); 268 }; 219 269 220 //Appends HTML to the menu 221 jQuery('#custom-nav').append('<li id="menu-' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">' + inputvaluevarname + '</span><span class="controls"><span class="type">' + additemtype + '</span><a id="edit' + randomnumber + '" onclick="edititem(' + randomnumber + ')" value="' + randomnumber +'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="' + templatedir + '/wp-admin/images/ico-edit.png" /></a> <a id="remove' + randomnumber + '" onclick="removeitem(' + randomnumber + ')" value="' + randomnumber +'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="' + templatedir + '/wp-admin/images/ico-close.png" /></a> <a href="' + inputvaluevarurl + '" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="' + templatedir + '/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="' + inputvaluevarurl + '">' + inputvaluevarname + '</a><input type="hidden" name="postmenu' + randomnumber + '" id="postmenu' + randomnumber + '" value="' + inputitemid + '" /><input type="hidden" name="parent' + randomnumber + '" id="parent' + randomnumber + '" value="' + inputparentid + '" /><input type="hidden" name="title' + randomnumber + '" id="title' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="linkurl' + randomnumber + '" id="linkurl' + randomnumber + '" value="' + inputvaluevarurl + '" /><input type="hidden" name="description' + randomnumber + '" id="description' + randomnumber + '" value="' + inputdescription + '" /><input type="hidden" name="icon' + randomnumber + '" id="icon' + randomnumber + '" value="' + inputicon + '" /><input type="hidden" name="position' + randomnumber + '" id="position' + randomnumber + '" value="' + randomnumber + '" /><input type="hidden" name="linktype' + randomnumber + '" id="linktype' + randomnumber + '" value="' + inputlinktype + '" /><input type="hidden" name="anchortitle' + randomnumber + '" id="anchortitle' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="newwindow' + randomnumber + '" id="newwindow' + randomnumber + '" value="0" /></li>'); 222 223 //make menu item draggable 224 jQuery('#menu-' + randomnumber + '').draggable( 225 { 270 function dragAndDrop() { 271 // make menu item draggable 272 jQuery('#custom-nav li').draggable({ 226 273 handle: ' > dl', 227 274 opacity: .8, 228 275 addClasses: false, … … 230 277 zIndex: 100 231 278 }); 232 279 233 // make menu item droppable234 jQuery('# menu-' + randomnumber + ' dl, #menu-' + randomnumber + '.dropzone').droppable({235 accept: '# ' + randomnumber + ', #custom-nav li',280 // make menu item droppable 281 jQuery('#custom-nav li dl, #custom-nav li .dropzone').droppable({ 282 accept: '#custom-nav li', 236 283 tolerance: 'pointer', 237 drop: function(e, ui) 238 { 284 drop: function(e, ui) { 239 285 var li = jQuery(this).parent(); 240 286 var child = !jQuery(this).hasClass('dropzone'); 241 //Append UL to first child242 if (child && li.children('ul').length == 0)243 {244 li.append( '<ul/>');287 288 // Append UL to first child 289 if ( child && li.children('ul').length == 0 ) { 290 li.append( '<ul/>' ); 245 291 } 246 //Make it draggable 247 if (child) 248 { 249 li.children('ul').append(ui.draggable); 292 // Make it draggable 293 if ( child ) { 294 li.children('ul').append( ui.draggable ); 295 } else { 296 li.before( ui.draggable ); 250 297 } 251 else252 {253 li.before(ui.draggable);254 }255 298 256 299 li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' }); 257 300 258 301 var draggablevalue = ui.draggable.attr('value'); 259 var droppablevalue = li.attr('value'); 260 li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 261 jQuery(this).parent().find("dt").removeAttr('style'); 262 jQuery(this).parent().find("div:first").removeAttr('style'); 302 var droppablevalue = li.attr('value'); 303 304 li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 305 jQuery(this).parent().find("dt").removeAttr('style'); 306 jQuery(this).parent().find("div:first").removeAttr('style'); 263 307 264 308 }, 265 over: function() 266 { 267 //Add child 268 if (jQuery(this).attr('class') == 'dropzone ui-droppable') 269 { 309 over: function() { 310 // Add child 311 if ( jQuery(this).attr('class') == 'dropzone ui-droppable' ) { 270 312 jQuery(this).parent().find("div:first").css('background', 'none').css('height', '50px'); 271 313 } 272 //Add above 273 else if (jQuery(this).attr('class') == 'ui-droppable') 274 { 314 // Add above 315 else if ( jQuery(this).attr('class') == 'ui-droppable' ) { 275 316 jQuery(this).parent().find("dt:first").css('background', '#d8d8d8'); 317 } else { 318 // do nothing 276 319 } 277 //do nothing278 else {279 280 }281 320 var parentid = jQuery(this).parent().attr('id'); 282 321 283 322 }, 284 out: function() 285 { 323 out: function() { 286 324 jQuery(this).parent().find("dt").removeAttr('style'); 287 325 jQuery(this).parent().find("div:first").removeAttr('style'); 288 326 jQuery(this).filter('.dropzone').css({ borderColor: '' }); 289 327 } 290 }); 291 292 updatepostdata(); 293 }; 294 No newline at end of file 328 } 329 ); 330 } 331 No newline at end of file -
wp-admin/nav-menus.php
158 158 <?php echo $messages_div; ?> 159 159 <div class="hide-if-js error"><p><?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?></p></div> 160 160 161 162 161 <form onsubmit="updatepostdata()" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data"> 163 162 <?php if ( ! empty( $custom_menus ) && count( $custom_menus ) > 1 ) : ?> 164 163 <ul class="subsubsub"> … … 220 219 <div class="inside"> 221 220 <?php 222 221 $pages_args = array( 223 'child_of' => 0, 224 'sort_order' => 'ASC', 225 'sort_column' => 'post_title', 226 'hierarchical' => 1, 227 'exclude' => '', 228 'include' => '', 229 'meta_key' => '', 230 'meta_value' => '', 231 'authors' => '', 232 'parent' => -1, 233 'exclude_tree' => '', 234 'number' => '', 235 'offset' => 0 222 'child_of' => 0, 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 1, 223 'exclude' => '', 'include' => '', 'meta_key' => '', 'meta_value' => '', 'authors' => '', 224 'parent' => -1, 'exclude_tree' => '', 'number' => '', 'offset' => 0 236 225 ); 237 226 $page_name = ''; 238 227 $pages_array = get_pages($pages_args); … … 246 235 ?> 247 236 <script type="text/javascript" charset="<?php bloginfo('charset'); ?>"> 248 237 jQuery(document).ready(function(){ 249 var posts = "<?php echo esc_js( $page_name ); ?>".split( "|");250 jQuery( "#page-search").autocomplete(posts);251 jQuery( "#page-search").result(function(event, data, formatted) {252 jQuery('# existing-pages').css('display','block');253 jQuery("# existing-pages dt:contains('" + data + "')").css("display", "block");254 jQuery('# show-pages').hide();255 jQuery('# hide-pages').show();238 var posts = "<?php echo esc_js( $page_name ); ?>".split('|'); 239 jQuery('#add-pages .quick-search').autocomplete(posts); 240 jQuery('#add-pages .quick-search').result(function(event, data, formatted) { 241 jQuery('#add-pages .list-container').css('display','block'); 242 jQuery("#add-pages .list-container dt:contains('" + data + "')").css('display','block'); 243 jQuery('#add-pages .show-all').hide(); 244 jQuery('#add-pages .hide-all').show(); 256 245 }); 257 jQuery('#existing-pages').css('display','none');258 246 }); 259 247 </script> 260 <input type="text" onfocus="jQuery('#page-search').attr('value','');" id="page-search" class="regular-text" value="<?php esc_attr_e('Search Pages'); ?>" /> 261 262 <a id="show-pages" style="cursor:pointer;" onclick="jQuery('#existing-pages').css('display','block');jQuery('#page-search').attr('value','');jQuery('#existing-pages dt').css('display','block');jQuery('#show-pages').hide();jQuery('#hide-pages').show();"><?php _e('View All'); ?></a> 263 <a id="hide-pages" style="cursor:pointer;" onclick="jQuery('#existing-pages').css('display','none');jQuery('#page-search').attr('value','Search Pages');jQuery('#existing-pages dt').css('display','none');jQuery('#show-pages').show();jQuery('#hide-pages').hide();"><?php _e('Hide All'); ?></a> 264 265 <script type="text/javascript"> 266 jQuery('#hide-pages').hide(); 267 </script> 248 <p style="margin: 0 0 1em;"> 249 <input type="text" class="quick-search regular-text" value="<?php esc_attr_e('Search Pages'); ?>" /> 250 <a class="show-all"><?php _e('View All'); ?></a> 251 <a class="hide-all"><?php _e('Hide All'); ?></a> 252 </p> 268 253 269 270 254 <div id="existing-pages" class="list-container"> 271 255 <ul class="list"> 272 256 <?php $items_counter = wp_nav_menu_get_pages( 0,'default' ); ?> 273 257 </ul> 274 258 </div><!-- /.list-container--> 259 <p class="submit"><a class="button" onclick="addItemsToMenu(this);">Add Page</a></p> 275 260 <br class="clear" /> 276 261 </div><!-- /.inside--> 277 262 </div><!--END #add-pages--> … … 305 290 ?> 306 291 <script type="text/javascript" charset="<?php bloginfo('charset'); ?>"> 307 292 jQuery(document).ready(function(){ 308 var categories = "<?php echo esc_js($cat_name); ?>".split( "|");309 jQuery( "#cat-search").autocomplete(categories);310 jQuery( "#cat-search").result(function(event, data, formatted) {311 jQuery('# existing-categories').css('display','block');312 jQuery("# existing-categories dt:contains('" + data + "')").css("display", "block");313 jQuery('# show-cats').hide();314 jQuery('# hide-cats').show();293 var categories = "<?php echo esc_js($cat_name); ?>".split('|'); 294 jQuery('#add-categories .quick-search').autocomplete(categories); 295 jQuery('#add-categories .quick-search').result(function(event, data, formatted) { 296 jQuery('#add-categories .list-container').css('display','block'); 297 jQuery("#add-categories .list-container dt:contains('" + data + "')").css('display','block'); 298 jQuery('#add-categories .show-all').hide(); 299 jQuery('#add-categories .hide-all').show(); 315 300 }); 316 jQuery('#existing-categories').css('display','none');317 301 }); 318 302 </script> 303 <p style="margin: 0 0 1em;"> 304 <input type="text" class="quick-search regular-text" value="<?php esc_attr_e('Search Categories'); ?>" /> 305 <a class="show-all"><?php _e('View All'); ?></a> 306 <a class="hide-all"><?php _e('Hide All'); ?></a> 307 </p> 319 308 320 <input type="text" onfocus="jQuery('#cat-search').attr('value','');" id="cat-search" class="regular-text" value="<?php esc_attr_e('Search Categories'); ?>" /> 321 322 <a id="show-cats" style="cursor:pointer;" onclick="jQuery('#existing-categories').css('display','block');jQuery('#cat-search').attr('value','');jQuery('#existing-categories dt').css('display','block');jQuery('#show-cats').hide();jQuery('#hide-cats').show();"><?php _e('View All'); ?></a> 323 <a id="hide-cats" style="cursor:pointer;" onclick="jQuery('#existing-categories').css('display','none');jQuery('#cat-search').attr('value','Search Categories');jQuery('#existing-categories dt').css('display','none');jQuery('#show-cats').show();jQuery('#hide-cats').hide();"><?php _e('Hide All'); ?></a> 324 325 <script type="text/javascript"> 326 jQuery('#hide-cats').hide(); 327 </script> 328 329 <div id="existing-categories" class="list-container"> 309 <div id="existing-categories" class="list-container" style="display: none;"> 330 310 <ul class="list"> 331 311 <?php $items_counter = wp_nav_menu_get_categories( $items_counter, 'default' ); ?> 332 312 </ul> 333 313 </div><!-- /.list-container--> 314 <p class="submit"><a class="button" onclick="addItemsToMenu(this);">Add Category</a></p> 334 315 <br class="clear" /> 335 316 </div><!-- /.inside--> 336 317 </div><!--END #add-categories--> … … 355 336 } 356 337 ?> 357 338 </ul><!-- /#custom-nav--> 339 340 <div id="queue" class="hide"> 341 </div><!--/#queue--> 358 342 </div><!-- /.inside --> 359 343 <!-- /#nav-menu-canvas .postbox--> 360 344 </div> … … 389 373 </span> 390 374 <span id="editdescription-wrap"> 391 375 <input id="editdescription" type="text" name="editdescription" value="" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> /><label class="editlabel" for="editdescription" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> ><?php _e('Description'); ?></label><br /></span> 392 </div> 376 </div><!-- /#dialog-confirm--> 393 377 394 378 <?php 395 379 -
wp-admin/css/nav-menu.css
1 .maintitle{margin:0 0 20px 0!important;}.logo{vertical-align:middle;margin:0 10px 0 0;}h2.heading{margin:32px 0 10px 0;}.checkboxes{float:right;margin:10px 12px 0 0;}#menus-container{clear:both;}#nav-container .inside{padding:0 10px 10px;}#menus-container .submit{padding:0;}#menu-settings-column .inside{padding:10px;}#custom-nav ul{width:100%;}#custom-nav li{margin:0;}.ui-draggable-dragging{width:500px;}#custom-nav li dl dt{-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border:1px solid #E6E6E6;position:relative;padding-left:10px;background-color:#f1f1f1;height:35px;line-height:35px;}#custom-nav li dl dt:hover{cursor:move;}#custom-nav li dl dt .controls{position:absolute;right:15px;top:-1px;}#custom-nav li dl dt img{vertical-align:middle;}#custom-nav li .title{background:url(../images/ico-arrow.png) no-repeat 4px 5px;background-position:center left;padding-left:15px;}#custom-nav li ul li{margin-left:20px;opacity:.7;}#custom-nav li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li ul li{opacity:.95;} #add-custom-link .howto{font-size:11px;}#add-custom-link .widefat{width:85%;margin-right:5px;}.list-container{max-height:203px;overflow-y:auto;padding-left:2px;padding-right:5px;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;margin:0;border-bottom:1px solid #e3e3e3;overflow:hidden;}.list dt{background:url(../images/ico-add.png) no-repeat right;}.list li .title{cursor:pointer;display:block;width:95%;padding:5px 0;}.list li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;background-position:center left;padding-left:5%;}.list li ul li .title{margin-left:14px;}.list li ul li ul li .title{margin-left:28px;}.list li ul li ul li ul li .title{margin-left:42px;}.list li ul li ul li ul li ul li .title{margin-left:56px;}.list li ul li ul li ul li ul li ul li .title{margin-left:70px;}.list li ul li ul li ul li ul li ul li ul li .title{margin-left:84px;}.list li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:98px;}.list li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:112px;}img.remove,img.edit{cursor:pointer;margin:0 5px 0 0;}.dropzone{height:7px;margin:3px 0 3px 0;}.hide{display:none;}.type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}#menu_select{width:170px;}#dialog-confirm label{padding-left:10px;}.ui-dialog{background:#fff;border:1px solid #555;-moz-box-shadow:0 4px 30px #000;}.ui-dialog-titlebar{color:#CFCFCF;font-family:"Lucida Grande",Verdana,Arial,sans-serif;padding:6px 10px 6px;background-color:#222!important;border:none!important;-moz-border-radius:none!important;}#dialog-confirm{height:168px!important;padding:20px 10px 10px;}#dialog-confirm input{margin:0 0 15px 0;width:280px;}#dialog-confirm select{margin:0 0 15px 0;}.ui-dialog-buttonpane{padding:10px;}.ui-dialog-buttonpane button{margin:0 10px 0 0;background:#F2F2F2;text-shadow:0 1px 0 #FFF;border-color:#BBB;color:#464646;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:14px;padding:2px 8px;text-decoration:none;}.ui-dialog-buttonpane button:hover{color:#000;border-color:#666;}.ui-icon{display:none;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);-moz-border-radius:8px;-webkit-border-radius:8px;}2 No newline at end of file 1 .maintitle{margin:0 0 20px 0!important;}.logo{vertical-align:middle;margin:0 10px 0 0;}h2.heading{margin:32px 0 10px 0;}.checkboxes{float:right;margin:10px 12px 0 0;}#menus-container{clear:both;}#nav-container .inside{padding:0 10px 10px;}#menus-container .submit{padding:0;}#menu-settings-column .inside{padding:10px;}#custom-nav ul{width:100%;}#custom-nav li{margin:0;}.ui-draggable-dragging{width:500px;}#custom-nav li dl dt{-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border:1px solid #E6E6E6;position:relative;padding-left:10px;background-color:#f1f1f1;height:35px;line-height:35px;}#custom-nav li dl dt:hover{cursor:move;}#custom-nav li dl dt .controls{position:absolute;right:15px;top:-1px;}#custom-nav li dl dt img{vertical-align:middle;}#custom-nav li .title{background:url(../images/ico-arrow.png) no-repeat 4px 5px;background-position:center left;padding-left:15px;}#custom-nav li ul li{margin-left:20px;opacity:.7;}#custom-nav li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li ul li{opacity:.95;}.show-all,.hide-all{cursor:pointer;}.hide-all{display:none;}#add-custom-link .howto{font-size:11px;}#add-custom-link .widefat{width:85%;margin-right:5px;}.list-container{display:none;max-height:200px;overflow-y:auto;padding:10px;border:1px solid #DFDFDF;margin-bottom:10px;-moz-border-radius:4px;}.postbox p.submit{margin-bottom:0;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;margin:0;overflow:hidden;margin-bottom:5px;}.list li .title{cursor:pointer;display:block;}.list li .title input{margin-right:3px;}.list li ul li .title{margin-left:14px;}.list li ul li ul li .title{margin-left:28px;}.list li ul li ul li ul li .title{margin-left:42px;}.list li ul li ul li ul li ul li .title{margin-left:56px;}.list li ul li ul li ul li ul li ul li .title{margin-left:70px;}.list li ul li ul li ul li ul li ul li ul li .title{margin-left:84px;}.list li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:98px;}.list li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:112px;}img.remove,img.edit{cursor:pointer;margin:0 5px 0 0;}.dropzone{height:7px;margin:3px 0 3px 0;}.hide{display:none;}.type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}#menu_select{width:170px;}#dialog-confirm label{padding-left:10px;}.ui-dialog{background:#fff;border:1px solid #555;-moz-box-shadow:0 4px 30px #000;}.ui-dialog-titlebar{color:#CFCFCF;font-family:"Lucida Grande",Verdana,Arial,sans-serif;padding:6px 10px 6px;background-color:#222!important;border:none!important;-moz-border-radius:none!important;}#dialog-confirm{height:168px!important;padding:20px 10px 10px;}#dialog-confirm input{margin:0 0 15px 0;width:280px;}#dialog-confirm select{margin:0 0 15px 0;}.ui-dialog-buttonpane{padding:10px;}.ui-dialog-buttonpane button{margin:0 10px 0 0;background:#F2F2F2;text-shadow:0 1px 0 #FFF;border-color:#BBB;color:#464646;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:14px;padding:2px 8px;text-decoration:none;}.ui-dialog-buttonpane button:hover{color:#000;border-color:#666;}.ui-icon{display:none;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);-moz-border-radius:8px;-webkit-border-radius:8px;} 2 No newline at end of file -
wp-admin/css/nav-menu.dev.css
32 32 #custom-nav li ul li ul li ul li { opacity: .9;} 33 33 #custom-nav li ul li ul li ul li ul li { opacity: .95; } 34 34 35 .show-all, .hide-all { cursor: pointer; } 36 .hide-all { display: none; } 37 .quick-search { } 38 35 39 #add-custom-link .howto { font-size: 11px; } 36 40 #add-custom-link .widefat { width: 85%; margin-right: 5px; } 37 41 38 .list-container { max-height: 203px; overflow-y: auto; padding-left: 2px; padding-right: 5px; }42 .list-container { display: none; max-height: 200px; overflow-y: auto; padding: 10px; border: 1px solid #DFDFDF; margin-bottom: 10px; -moz-border-radius: 4px; } 39 43 44 .postbox p.submit { margin-bottom: 0; } 45 40 46 .list { zoom: 1; } 41 47 .list li { margin: 0; } 42 .list dt { display: none; margin: 0; border-bottom: 1px solid #e3e3e3; overflow: hidden; } 43 .list dt { background: url(../images/ico-add.png) no-repeat right; } 48 .list dt { display: none; margin: 0; overflow: hidden; margin-bottom: 5px; } 44 49 45 .list li .title { cursor: pointer; display: block; width: 95%; padding: 5px 0px;}46 .list li .title { background: url(../images/ico-arrow.png) no-repeat 4px 13px; background-position: center left; padding-left: 5%; }50 .list li .title { cursor: pointer; display: block; } 51 .list li .title input { margin-right: 3px; } 47 52 48 53 /* Visually shows the menu item hierarchy. */ 49 54 .list li ul li .title { margin-left: 14px; }