| 1 | Index: wp-includes/nav-menu-template.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/nav-menu-template.php (revision 13402) |
|---|
| 4 | +++ wp-includes/nav-menu-template.php (working copy) |
|---|
| 5 | @@ -149,10 +149,11 @@ |
|---|
| 6 | |
|---|
| 7 | case 'default': |
|---|
| 8 | $template_dir = get_bloginfo('url'); |
|---|
| 9 | + $menu_id = 'menu-item-' . $menu_item->ID; |
|---|
| 10 | ?> |
|---|
| 11 | <dl> |
|---|
| 12 | <dt> |
|---|
| 13 | - <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> |
|---|
| 14 | + <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> |
|---|
| 15 | </dt> |
|---|
| 16 | </dl> |
|---|
| 17 | <?php |
|---|
| 18 | Index: wp-includes/script-loader.php |
|---|
| 19 | =================================================================== |
|---|
| 20 | --- wp-includes/script-loader.php (revision 13402) |
|---|
| 21 | +++ wp-includes/script-loader.php (working copy) |
|---|
| 22 | @@ -398,7 +398,7 @@ |
|---|
| 23 | |
|---|
| 24 | // Custom Navigation |
|---|
| 25 | $scripts->add( 'nav-menu-default-items', "/wp-admin/js/nav-menu-default-items$suffix.js", false, '20100223' ); |
|---|
| 26 | - $scripts->add( 'nav-menu-dynamic-functions', "/wp-admin/js/nav-menu-dynamic-functions$suffix.js", false, '20100224b' ); |
|---|
| 27 | + $scripts->add( 'nav-menu-dynamic-functions', "/wp-admin/js/nav-menu-dynamic-functions$suffix.js", false, '20100225b' ); |
|---|
| 28 | $scripts->localize( 'nav-menu-dynamic-functions', 'navMenuL10n', array( |
|---|
| 29 | 'custom' => _x('Custom', 'menu nav item type'), |
|---|
| 30 | 'page' => _x('Page', 'menu nav item type'), |
|---|
| 31 | @@ -474,7 +474,7 @@ |
|---|
| 32 | $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' ); |
|---|
| 33 | $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' ); |
|---|
| 34 | $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' ); |
|---|
| 35 | - $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100225' ); |
|---|
| 36 | + $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100225b' ); |
|---|
| 37 | |
|---|
| 38 | foreach ( $rtl_styles as $rtl_style ) { |
|---|
| 39 | $styles->add_data( $rtl_style, 'rtl', true ); |
|---|
| 40 | Index: wp-admin/js/nav-menu-dynamic-functions.js |
|---|
| 41 | =================================================================== |
|---|
| 42 | --- wp-admin/js/nav-menu-dynamic-functions.js (revision 13402) |
|---|
| 43 | +++ wp-admin/js/nav-menu-dynamic-functions.js (working copy) |
|---|
| 44 | @@ -1 +1 @@ |
|---|
| 45 | -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()}; |
|---|
| 46 | \ No newline at end of file |
|---|
| 47 | +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:""})}})}; |
|---|
| 48 | \ No newline at end of file |
|---|
| 49 | Index: wp-admin/js/nav-menu-dynamic-functions.dev.js |
|---|
| 50 | =================================================================== |
|---|
| 51 | --- wp-admin/js/nav-menu-dynamic-functions.dev.js (revision 13402) |
|---|
| 52 | +++ wp-admin/js/nav-menu-dynamic-functions.dev.js (working copy) |
|---|
| 53 | @@ -8,17 +8,41 @@ |
|---|
| 54 | * @subpackage Administration |
|---|
| 55 | */ |
|---|
| 56 | |
|---|
| 57 | -/* |
|---|
| 58 | +jQuery(document).ready(function(){ |
|---|
| 59 | + |
|---|
| 60 | + // Clear the search textbox |
|---|
| 61 | + jQuery('.quick-search').click(function(){ |
|---|
| 62 | + jQuery(this).attr( 'value', '' ); |
|---|
| 63 | + }); |
|---|
| 64 | + |
|---|
| 65 | + // Show All |
|---|
| 66 | + jQuery('.show-all').click(function(){ |
|---|
| 67 | + jQuery(this).parent().siblings('.list-container').css( 'display','block' ); |
|---|
| 68 | + jQuery(this).siblings('.quick-search').attr( 'value', '' ); |
|---|
| 69 | + jQuery(this).parent().siblings('.list-container').find('dt').css( 'display', 'block' ); |
|---|
| 70 | + jQuery(this).hide(); |
|---|
| 71 | + jQuery(this).siblings('.hide-all').show(); |
|---|
| 72 | + }); |
|---|
| 73 | + |
|---|
| 74 | + // Hide All |
|---|
| 75 | + jQuery('.hide-all').click(function(){ |
|---|
| 76 | + jQuery(this).parent().siblings('.list-container').css( 'display','none' ); |
|---|
| 77 | + jQuery(this).siblings('.quick-search').attr( 'value', 'Search' ); |
|---|
| 78 | + jQuery(this).parent().siblings('.list-container').find('dt').css( 'display', 'none' ); |
|---|
| 79 | + jQuery(this).hide(); |
|---|
| 80 | + jQuery(this).siblings('.show-all').show(); |
|---|
| 81 | + }); |
|---|
| 82 | +}); |
|---|
| 83 | + |
|---|
| 84 | +/** |
|---|
| 85 | * Removes menu items from current menu |
|---|
| 86 | + * |
|---|
| 87 | * @param int o - the id of the menu li to remove. |
|---|
| 88 | -*/ |
|---|
| 89 | -function removeitem(o) |
|---|
| 90 | -{ |
|---|
| 91 | - |
|---|
| 92 | + */ |
|---|
| 93 | +function removeitem( o ) { |
|---|
| 94 | var todelete = document.getElementById('menu-' + o); |
|---|
| 95 | - |
|---|
| 96 | - if (todelete) |
|---|
| 97 | - { |
|---|
| 98 | + |
|---|
| 99 | + if ( todelete ) { |
|---|
| 100 | var parenttodelete = document.getElementById('menu-' + o).parentNode; |
|---|
| 101 | throwaway_node = parenttodelete.removeChild(todelete); |
|---|
| 102 | } |
|---|
| 103 | @@ -26,43 +50,40 @@ |
|---|
| 104 | updatepostdata(); |
|---|
| 105 | }; |
|---|
| 106 | |
|---|
| 107 | -/* |
|---|
| 108 | +/** |
|---|
| 109 | * Loads dialog window to edit menu items from current menu |
|---|
| 110 | + * |
|---|
| 111 | * @param int o - the id of the menu li to edit. |
|---|
| 112 | -*/ |
|---|
| 113 | -function edititem(o) |
|---|
| 114 | -{ |
|---|
| 115 | + */ |
|---|
| 116 | +function edititem( o ) { |
|---|
| 117 | + itemTitle = jQuery('#title' + o).val(); |
|---|
| 118 | + itemURL = jQuery('#linkurl' + o).val(); |
|---|
| 119 | + itemAnchorTitle = jQuery('#anchortitle' + o).val(); |
|---|
| 120 | + itemNewWindow = jQuery('#newwindow' + o).val(); |
|---|
| 121 | + itemDesc = jQuery('#description' + o).val(); |
|---|
| 122 | |
|---|
| 123 | - itemTitle = jQuery('#title' + o).val(); |
|---|
| 124 | - itemURL = jQuery('#linkurl' + o).val(); |
|---|
| 125 | - itemAnchorTitle = jQuery('#anchortitle' + o).val(); |
|---|
| 126 | - itemNewWindow = jQuery('#newwindow' + o).val(); |
|---|
| 127 | - itemDesc = jQuery('#description' + o).val(); |
|---|
| 128 | + jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o ) |
|---|
| 129 | |
|---|
| 130 | - jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o ) |
|---|
| 131 | + jQuery('#dialog-confirm').dialog('open'); |
|---|
| 132 | |
|---|
| 133 | - jQuery('#dialog-confirm').dialog('open'); |
|---|
| 134 | - |
|---|
| 135 | - jQuery('#edittitle').val( itemTitle ); |
|---|
| 136 | - if ( 'custom' == jQuery( '#linktype' + o ).val() ) { |
|---|
| 137 | - jQuery( '#editlink-wrap' ).css( 'display', 'inline' ); |
|---|
| 138 | - } else { |
|---|
| 139 | - jQuery( '#editlink-wrap' ).css( 'display', 'none' ); |
|---|
| 140 | - } |
|---|
| 141 | - jQuery('#editlink').val( itemURL ); |
|---|
| 142 | - jQuery('#editanchortitle').val( itemAnchorTitle ); |
|---|
| 143 | - jQuery("#editnewwindow option[value='" + itemNewWindow + "']").attr('selected', 'selected'); |
|---|
| 144 | - jQuery('#editdescription').val( itemDesc ); |
|---|
| 145 | - |
|---|
| 146 | + jQuery('#edittitle').val( itemTitle ); |
|---|
| 147 | + if ( 'custom' == jQuery( '#linktype' + o ).val() ) { |
|---|
| 148 | + jQuery( '#editlink-wrap' ).css( 'display', 'inline' ); |
|---|
| 149 | + } else { |
|---|
| 150 | + jQuery( '#editlink-wrap' ).css( 'display', 'none' ); |
|---|
| 151 | + } |
|---|
| 152 | + jQuery('#editlink').val( itemURL ); |
|---|
| 153 | + jQuery('#editanchortitle').val( itemAnchorTitle ); |
|---|
| 154 | + jQuery("#editnewwindow option[value='" + itemNewWindow + "']").attr('selected', 'selected'); |
|---|
| 155 | + jQuery('#editdescription').val( itemDesc ); |
|---|
| 156 | }; |
|---|
| 157 | |
|---|
| 158 | -/* |
|---|
| 159 | +/** |
|---|
| 160 | * Prepares menu items for POST |
|---|
| 161 | -*/ |
|---|
| 162 | -function updatepostdata() |
|---|
| 163 | -{ |
|---|
| 164 | - |
|---|
| 165 | + */ |
|---|
| 166 | +function updatepostdata() { |
|---|
| 167 | var i = 0; |
|---|
| 168 | + |
|---|
| 169 | jQuery("#custom-nav").find("li").each(function(i) { |
|---|
| 170 | i = i + 1; |
|---|
| 171 | var j = jQuery(this).attr('value'); |
|---|
| 172 | @@ -82,10 +103,9 @@ |
|---|
| 173 | jQuery(this).find('#parent' + j).attr('name','parent' + i); |
|---|
| 174 | jQuery(this).find('#parent' + j).attr('id','parent' + i); |
|---|
| 175 | if (p) { |
|---|
| 176 | - //Do nothing |
|---|
| 177 | - } |
|---|
| 178 | - else { |
|---|
| 179 | - //reset p to be top level |
|---|
| 180 | + // Do nothing |
|---|
| 181 | + } else { |
|---|
| 182 | + // reset p to be top level |
|---|
| 183 | p = 0; |
|---|
| 184 | } |
|---|
| 185 | |
|---|
| 186 | @@ -122,13 +142,12 @@ |
|---|
| 187 | jQuery('#li-count').attr('value',i); |
|---|
| 188 | |
|---|
| 189 | }); |
|---|
| 190 | - |
|---|
| 191 | - |
|---|
| 192 | - |
|---|
| 193 | }; |
|---|
| 194 | |
|---|
| 195 | /* |
|---|
| 196 | - * Adds item from Page, Category, or Custom options menu |
|---|
| 197 | + * Queues items in perperation for appendToList |
|---|
| 198 | + * |
|---|
| 199 | + * @param string id - The menu item's id |
|---|
| 200 | * @param string templatedir - directory of the add, edit, view images. |
|---|
| 201 | * @param string additemtype - Page, Category, or Custom. |
|---|
| 202 | * @param string itemtext - menu text. |
|---|
| 203 | @@ -137,8 +156,7 @@ |
|---|
| 204 | * @param int itemparentid - default 0. |
|---|
| 205 | * @param string itemdescription - the description of the menu item. |
|---|
| 206 | */ |
|---|
| 207 | -function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparentid,itemdescription) |
|---|
| 208 | -{ |
|---|
| 209 | +function updateQueue( templatedir, additemtype, itemtext, itemurl, itemid, itemparentid, itemdescription ) { |
|---|
| 210 | var inputvaluevarname = ''; |
|---|
| 211 | var inputvaluevarurl = ''; |
|---|
| 212 | var inputitemid = ''; |
|---|
| 213 | @@ -146,17 +164,14 @@ |
|---|
| 214 | var inputdescription = ''; |
|---|
| 215 | var inputicon = ''; |
|---|
| 216 | |
|---|
| 217 | - if (additemtype == navMenuL10n.custom) |
|---|
| 218 | - { |
|---|
| 219 | + if ( additemtype == navMenuL10n.custom ) { |
|---|
| 220 | inputvaluevarname = document.getElementById('custom-menu-item-name').value; |
|---|
| 221 | inputvaluevarurl = document.getElementById('custom-menu-item-url').value; |
|---|
| 222 | inputitemid = ''; |
|---|
| 223 | inputparentid = ''; |
|---|
| 224 | inputlinktype = 'custom'; |
|---|
| 225 | inputdescription = ''; |
|---|
| 226 | - } |
|---|
| 227 | - else if (additemtype == navMenuL10n.page) |
|---|
| 228 | - { |
|---|
| 229 | + } else if ( additemtype == navMenuL10n.page ) { |
|---|
| 230 | inputvaluevarname = htmlentities(itemtext.toString()); |
|---|
| 231 | inputvaluevarurl = itemurl.toString(); |
|---|
| 232 | inputitemid = itemid.toString(); |
|---|
| 233 | @@ -164,18 +179,14 @@ |
|---|
| 234 | inputlinktype = 'page'; |
|---|
| 235 | inputdescription = htmlentities(itemdescription.toString()); |
|---|
| 236 | |
|---|
| 237 | - } |
|---|
| 238 | - else if (additemtype == navMenuL10n.category) |
|---|
| 239 | - { |
|---|
| 240 | + } else if ( additemtype == navMenuL10n.category ) { |
|---|
| 241 | inputvaluevarname = htmlentities(itemtext.toString()); |
|---|
| 242 | inputvaluevarurl = itemurl.toString(); |
|---|
| 243 | inputitemid = itemid.toString(); |
|---|
| 244 | inputparentid = '0'; |
|---|
| 245 | inputlinktype = 'category'; |
|---|
| 246 | inputdescription = htmlentities(itemdescription.toString()); |
|---|
| 247 | - } |
|---|
| 248 | - else |
|---|
| 249 | - { |
|---|
| 250 | + } else { |
|---|
| 251 | inputvaluevarname = ''; |
|---|
| 252 | inputvaluevarname = ''; |
|---|
| 253 | inputitemid = ''; |
|---|
| 254 | @@ -184,45 +195,81 @@ |
|---|
| 255 | inputdescription = ''; |
|---|
| 256 | } |
|---|
| 257 | |
|---|
| 258 | - var count=document.getElementById('custom-nav').getElementsByTagName('li').length + 1; |
|---|
| 259 | - |
|---|
| 260 | + var count = document.getElementById('custom-nav').getElementsByTagName('li').length + 1; |
|---|
| 261 | var randomnumber = count; |
|---|
| 262 | - |
|---|
| 263 | var validatetest = 0; |
|---|
| 264 | |
|---|
| 265 | - try |
|---|
| 266 | - { |
|---|
| 267 | - var test=document.getElementById("menu-" + randomnumber.toString()).value; |
|---|
| 268 | + try { |
|---|
| 269 | + var test = document.getElementById( 'menu-' + randomnumber.toString() ).value; |
|---|
| 270 | } |
|---|
| 271 | - catch (err) |
|---|
| 272 | - { |
|---|
| 273 | + catch ( err ) { |
|---|
| 274 | validatetest = 1; |
|---|
| 275 | } |
|---|
| 276 | |
|---|
| 277 | - while (validatetest == 0) |
|---|
| 278 | - { |
|---|
| 279 | + while ( validatetest == 0 ) { |
|---|
| 280 | randomnumber = randomnumber + 1; |
|---|
| 281 | - |
|---|
| 282 | - try |
|---|
| 283 | - { |
|---|
| 284 | - var test2=document.getElementById("menu-" + randomnumber.toString()).value; |
|---|
| 285 | + try { |
|---|
| 286 | + var test2 = document.getElementById( 'menu-' + randomnumber.toString() ).value; |
|---|
| 287 | } |
|---|
| 288 | - catch (err) |
|---|
| 289 | - { |
|---|
| 290 | + catch ( err ) { |
|---|
| 291 | validatetest = 1; |
|---|
| 292 | } |
|---|
| 293 | } |
|---|
| 294 | + |
|---|
| 295 | + // Adds or removes the item from the queue |
|---|
| 296 | + if ( jQuery(menu_item_id = '#menu-item-' + inputitemid).attr('checked') ) { |
|---|
| 297 | + |
|---|
| 298 | + // Adds the item in the queue |
|---|
| 299 | + 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>'); |
|---|
| 300 | + } else { |
|---|
| 301 | + |
|---|
| 302 | + // Get the item in the queue |
|---|
| 303 | + for ( var i = 0; i < jQuery('#queue li input[name^="postmenu"]').length; i++ ) { |
|---|
| 304 | + if ( itemid == jQuery('#queue li input[name^="postmenu"]')[i].value ) { |
|---|
| 305 | + var menu_queue_id = jQuery('#queue li input[name^="postmenu"]')[i].name.substring( 8, jQuery('#queue li input[name^="postmenu"]')[i].name.length ); |
|---|
| 306 | + }; |
|---|
| 307 | + }; |
|---|
| 308 | + |
|---|
| 309 | + // Removes the item from the queue |
|---|
| 310 | + jQuery('#queue li#menu-' + menu_queue_id).remove(); |
|---|
| 311 | + }; |
|---|
| 312 | +}; |
|---|
| 313 | |
|---|
| 314 | - //Notification Message |
|---|
| 315 | +/* |
|---|
| 316 | + * Grabs items from the queue and adds them to the menu. |
|---|
| 317 | + * |
|---|
| 318 | + * @param string templatedir - directory of the add, edit, view images. |
|---|
| 319 | + * @param string additemtype - Page, Category, or Custom. |
|---|
| 320 | + * @param string itemtext - menu text. |
|---|
| 321 | + * @param string itemurl - url of the menu. |
|---|
| 322 | + * @param int itemid - menu id. |
|---|
| 323 | + * @param int itemparentid - default 0. |
|---|
| 324 | + * @param string itemdescription - the description of the menu item. |
|---|
| 325 | +*/ |
|---|
| 326 | +function addItemsToMenu( button ) { |
|---|
| 327 | + // Notification Message |
|---|
| 328 | jQuery('.maintitle').after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>'); |
|---|
| 329 | jQuery('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ jQuery(this).remove();}); |
|---|
| 330 | + |
|---|
| 331 | + // Grab items in queue |
|---|
| 332 | + var items = jQuery('#queue').children(); |
|---|
| 333 | + |
|---|
| 334 | + // Empty Queue |
|---|
| 335 | + jQuery('#queue').empty(); |
|---|
| 336 | + |
|---|
| 337 | + // Appends HTML to the menu |
|---|
| 338 | + jQuery('#custom-nav').append( items ); |
|---|
| 339 | + |
|---|
| 340 | + // Uncheck the checkboxes |
|---|
| 341 | + jQuery(button).offsetParent().find('.list-container input').attr('checked', false); |
|---|
| 342 | + |
|---|
| 343 | + updatepostdata(); |
|---|
| 344 | + dragAndDrop(); |
|---|
| 345 | +}; |
|---|
| 346 | |
|---|
| 347 | - //Appends HTML to the menu |
|---|
| 348 | - 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>'); |
|---|
| 349 | - |
|---|
| 350 | - //make menu item draggable |
|---|
| 351 | - jQuery('#menu-' + randomnumber + '').draggable( |
|---|
| 352 | - { |
|---|
| 353 | +function dragAndDrop() { |
|---|
| 354 | + // make menu item draggable |
|---|
| 355 | + jQuery('#custom-nav li').draggable({ |
|---|
| 356 | handle: ' > dl', |
|---|
| 357 | opacity: .8, |
|---|
| 358 | addClasses: false, |
|---|
| 359 | @@ -230,64 +277,54 @@ |
|---|
| 360 | zIndex: 100 |
|---|
| 361 | }); |
|---|
| 362 | |
|---|
| 363 | - //make menu item droppable |
|---|
| 364 | - jQuery('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({ |
|---|
| 365 | - accept: '#' + randomnumber + ', #custom-nav li', |
|---|
| 366 | + // make menu item droppable |
|---|
| 367 | + jQuery('#custom-nav li dl, #custom-nav li .dropzone').droppable({ |
|---|
| 368 | + accept: '#custom-nav li', |
|---|
| 369 | tolerance: 'pointer', |
|---|
| 370 | - drop: function(e, ui) |
|---|
| 371 | - { |
|---|
| 372 | + drop: function(e, ui) { |
|---|
| 373 | var li = jQuery(this).parent(); |
|---|
| 374 | var child = !jQuery(this).hasClass('dropzone'); |
|---|
| 375 | - //Append UL to first child |
|---|
| 376 | - if (child && li.children('ul').length == 0) |
|---|
| 377 | - { |
|---|
| 378 | - li.append('<ul/>'); |
|---|
| 379 | + |
|---|
| 380 | + // Append UL to first child |
|---|
| 381 | + if ( child && li.children('ul').length == 0 ) { |
|---|
| 382 | + li.append( '<ul/>' ); |
|---|
| 383 | } |
|---|
| 384 | - //Make it draggable |
|---|
| 385 | - if (child) |
|---|
| 386 | - { |
|---|
| 387 | - li.children('ul').append(ui.draggable); |
|---|
| 388 | + // Make it draggable |
|---|
| 389 | + if ( child ) { |
|---|
| 390 | + li.children('ul').append( ui.draggable ); |
|---|
| 391 | + } else { |
|---|
| 392 | + li.before( ui.draggable ); |
|---|
| 393 | } |
|---|
| 394 | - else |
|---|
| 395 | - { |
|---|
| 396 | - li.before(ui.draggable); |
|---|
| 397 | - } |
|---|
| 398 | |
|---|
| 399 | li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' }); |
|---|
| 400 | |
|---|
| 401 | var draggablevalue = ui.draggable.attr('value'); |
|---|
| 402 | - var droppablevalue = li.attr('value'); |
|---|
| 403 | - li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); |
|---|
| 404 | - jQuery(this).parent().find("dt").removeAttr('style'); |
|---|
| 405 | - jQuery(this).parent().find("div:first").removeAttr('style'); |
|---|
| 406 | + var droppablevalue = li.attr('value'); |
|---|
| 407 | + |
|---|
| 408 | + li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); |
|---|
| 409 | + jQuery(this).parent().find("dt").removeAttr('style'); |
|---|
| 410 | + jQuery(this).parent().find("div:first").removeAttr('style'); |
|---|
| 411 | |
|---|
| 412 | }, |
|---|
| 413 | - over: function() |
|---|
| 414 | - { |
|---|
| 415 | - //Add child |
|---|
| 416 | - if (jQuery(this).attr('class') == 'dropzone ui-droppable') |
|---|
| 417 | - { |
|---|
| 418 | + over: function() { |
|---|
| 419 | + // Add child |
|---|
| 420 | + if ( jQuery(this).attr('class') == 'dropzone ui-droppable' ) { |
|---|
| 421 | jQuery(this).parent().find("div:first").css('background', 'none').css('height', '50px'); |
|---|
| 422 | } |
|---|
| 423 | - //Add above |
|---|
| 424 | - else if (jQuery(this).attr('class') == 'ui-droppable') |
|---|
| 425 | - { |
|---|
| 426 | + // Add above |
|---|
| 427 | + else if ( jQuery(this).attr('class') == 'ui-droppable' ) { |
|---|
| 428 | jQuery(this).parent().find("dt:first").css('background', '#d8d8d8'); |
|---|
| 429 | + } else { |
|---|
| 430 | + // do nothing |
|---|
| 431 | } |
|---|
| 432 | - //do nothing |
|---|
| 433 | - else { |
|---|
| 434 | - |
|---|
| 435 | - } |
|---|
| 436 | var parentid = jQuery(this).parent().attr('id'); |
|---|
| 437 | |
|---|
| 438 | }, |
|---|
| 439 | - out: function() |
|---|
| 440 | - { |
|---|
| 441 | + out: function() { |
|---|
| 442 | jQuery(this).parent().find("dt").removeAttr('style'); |
|---|
| 443 | jQuery(this).parent().find("div:first").removeAttr('style'); |
|---|
| 444 | jQuery(this).filter('.dropzone').css({ borderColor: '' }); |
|---|
| 445 | } |
|---|
| 446 | - }); |
|---|
| 447 | - |
|---|
| 448 | - updatepostdata(); |
|---|
| 449 | -}; |
|---|
| 450 | \ No newline at end of file |
|---|
| 451 | + } |
|---|
| 452 | + ); |
|---|
| 453 | +} |
|---|
| 454 | \ No newline at end of file |
|---|
| 455 | Index: wp-admin/nav-menus.php |
|---|
| 456 | =================================================================== |
|---|
| 457 | --- wp-admin/nav-menus.php (revision 13402) |
|---|
| 458 | +++ wp-admin/nav-menus.php (working copy) |
|---|
| 459 | @@ -158,7 +158,6 @@ |
|---|
| 460 | <?php echo $messages_div; ?> |
|---|
| 461 | <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> |
|---|
| 462 | |
|---|
| 463 | - |
|---|
| 464 | <form onsubmit="updatepostdata()" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data"> |
|---|
| 465 | <?php if ( ! empty( $custom_menus ) && count( $custom_menus ) > 1 ) : ?> |
|---|
| 466 | <ul class="subsubsub"> |
|---|
| 467 | @@ -220,19 +219,9 @@ |
|---|
| 468 | <div class="inside"> |
|---|
| 469 | <?php |
|---|
| 470 | $pages_args = array( |
|---|
| 471 | - 'child_of' => 0, |
|---|
| 472 | - 'sort_order' => 'ASC', |
|---|
| 473 | - 'sort_column' => 'post_title', |
|---|
| 474 | - 'hierarchical' => 1, |
|---|
| 475 | - 'exclude' => '', |
|---|
| 476 | - 'include' => '', |
|---|
| 477 | - 'meta_key' => '', |
|---|
| 478 | - 'meta_value' => '', |
|---|
| 479 | - 'authors' => '', |
|---|
| 480 | - 'parent' => -1, |
|---|
| 481 | - 'exclude_tree' => '', |
|---|
| 482 | - 'number' => '', |
|---|
| 483 | - 'offset' => 0 |
|---|
| 484 | + 'child_of' => 0, 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'hierarchical' => 1, |
|---|
| 485 | + 'exclude' => '', 'include' => '', 'meta_key' => '', 'meta_value' => '', 'authors' => '', |
|---|
| 486 | + 'parent' => -1, 'exclude_tree' => '', 'number' => '', 'offset' => 0 |
|---|
| 487 | ); |
|---|
| 488 | $page_name = ''; |
|---|
| 489 | $pages_array = get_pages($pages_args); |
|---|
| 490 | @@ -246,32 +235,28 @@ |
|---|
| 491 | ?> |
|---|
| 492 | <script type="text/javascript" charset="<?php bloginfo('charset'); ?>"> |
|---|
| 493 | jQuery(document).ready(function(){ |
|---|
| 494 | - var posts = "<?php echo esc_js( $page_name ); ?>".split("|"); |
|---|
| 495 | - jQuery("#page-search").autocomplete(posts); |
|---|
| 496 | - jQuery("#page-search").result(function(event, data, formatted) { |
|---|
| 497 | - jQuery('#existing-pages').css('display','block'); |
|---|
| 498 | - jQuery("#existing-pages dt:contains('" + data + "')").css("display", "block"); |
|---|
| 499 | - jQuery('#show-pages').hide(); |
|---|
| 500 | - jQuery('#hide-pages').show(); |
|---|
| 501 | + var posts = "<?php echo esc_js( $page_name ); ?>".split('|'); |
|---|
| 502 | + jQuery('#add-pages .quick-search').autocomplete(posts); |
|---|
| 503 | + jQuery('#add-pages .quick-search').result(function(event, data, formatted) { |
|---|
| 504 | + jQuery('#add-pages .list-container').css('display','block'); |
|---|
| 505 | + jQuery("#add-pages .list-container dt:contains('" + data + "')").css('display','block'); |
|---|
| 506 | + jQuery('#add-pages .show-all').hide(); |
|---|
| 507 | + jQuery('#add-pages .hide-all').show(); |
|---|
| 508 | }); |
|---|
| 509 | - jQuery('#existing-pages').css('display','none'); |
|---|
| 510 | }); |
|---|
| 511 | </script> |
|---|
| 512 | - <input type="text" onfocus="jQuery('#page-search').attr('value','');" id="page-search" class="regular-text" value="<?php esc_attr_e('Search Pages'); ?>" /> |
|---|
| 513 | - |
|---|
| 514 | - <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> |
|---|
| 515 | - <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> |
|---|
| 516 | - |
|---|
| 517 | - <script type="text/javascript"> |
|---|
| 518 | - jQuery('#hide-pages').hide(); |
|---|
| 519 | - </script> |
|---|
| 520 | + <p style="margin: 0 0 1em;"> |
|---|
| 521 | + <input type="text" class="quick-search regular-text" value="<?php esc_attr_e('Search Pages'); ?>" /> |
|---|
| 522 | + <a class="show-all"><?php _e('View All'); ?></a> |
|---|
| 523 | + <a class="hide-all"><?php _e('Hide All'); ?></a> |
|---|
| 524 | + </p> |
|---|
| 525 | |
|---|
| 526 | - |
|---|
| 527 | <div id="existing-pages" class="list-container"> |
|---|
| 528 | <ul class="list"> |
|---|
| 529 | <?php $items_counter = wp_nav_menu_get_pages( 0,'default' ); ?> |
|---|
| 530 | </ul> |
|---|
| 531 | </div><!-- /.list-container--> |
|---|
| 532 | + <p class="submit"><a class="button" onclick="addItemsToMenu(this);">Add Page</a></p> |
|---|
| 533 | <br class="clear" /> |
|---|
| 534 | </div><!-- /.inside--> |
|---|
| 535 | </div><!--END #add-pages--> |
|---|
| 536 | @@ -305,32 +290,28 @@ |
|---|
| 537 | ?> |
|---|
| 538 | <script type="text/javascript" charset="<?php bloginfo('charset'); ?>"> |
|---|
| 539 | jQuery(document).ready(function(){ |
|---|
| 540 | - var categories = "<?php echo esc_js($cat_name); ?>".split("|"); |
|---|
| 541 | - jQuery("#cat-search").autocomplete(categories); |
|---|
| 542 | - jQuery("#cat-search").result(function(event, data, formatted) { |
|---|
| 543 | - jQuery('#existing-categories').css('display','block'); |
|---|
| 544 | - jQuery("#existing-categories dt:contains('" + data + "')").css("display", "block"); |
|---|
| 545 | - jQuery('#show-cats').hide(); |
|---|
| 546 | - jQuery('#hide-cats').show(); |
|---|
| 547 | + var categories = "<?php echo esc_js($cat_name); ?>".split('|'); |
|---|
| 548 | + jQuery('#add-categories .quick-search').autocomplete(categories); |
|---|
| 549 | + jQuery('#add-categories .quick-search').result(function(event, data, formatted) { |
|---|
| 550 | + jQuery('#add-categories .list-container').css('display','block'); |
|---|
| 551 | + jQuery("#add-categories .list-container dt:contains('" + data + "')").css('display','block'); |
|---|
| 552 | + jQuery('#add-categories .show-all').hide(); |
|---|
| 553 | + jQuery('#add-categories .hide-all').show(); |
|---|
| 554 | }); |
|---|
| 555 | - jQuery('#existing-categories').css('display','none'); |
|---|
| 556 | }); |
|---|
| 557 | </script> |
|---|
| 558 | + <p style="margin: 0 0 1em;"> |
|---|
| 559 | + <input type="text" class="quick-search regular-text" value="<?php esc_attr_e('Search Categories'); ?>" /> |
|---|
| 560 | + <a class="show-all"><?php _e('View All'); ?></a> |
|---|
| 561 | + <a class="hide-all"><?php _e('Hide All'); ?></a> |
|---|
| 562 | + </p> |
|---|
| 563 | |
|---|
| 564 | - <input type="text" onfocus="jQuery('#cat-search').attr('value','');" id="cat-search" class="regular-text" value="<?php esc_attr_e('Search Categories'); ?>" /> |
|---|
| 565 | - |
|---|
| 566 | - <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> |
|---|
| 567 | - <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> |
|---|
| 568 | - |
|---|
| 569 | - <script type="text/javascript"> |
|---|
| 570 | - jQuery('#hide-cats').hide(); |
|---|
| 571 | - </script> |
|---|
| 572 | - |
|---|
| 573 | - <div id="existing-categories" class="list-container"> |
|---|
| 574 | + <div id="existing-categories" class="list-container" style="display: none;"> |
|---|
| 575 | <ul class="list"> |
|---|
| 576 | <?php $items_counter = wp_nav_menu_get_categories( $items_counter, 'default' ); ?> |
|---|
| 577 | </ul> |
|---|
| 578 | </div><!-- /.list-container--> |
|---|
| 579 | + <p class="submit"><a class="button" onclick="addItemsToMenu(this);">Add Category</a></p> |
|---|
| 580 | <br class="clear" /> |
|---|
| 581 | </div><!-- /.inside--> |
|---|
| 582 | </div><!--END #add-categories--> |
|---|
| 583 | @@ -355,6 +336,9 @@ |
|---|
| 584 | } |
|---|
| 585 | ?> |
|---|
| 586 | </ul><!-- /#custom-nav--> |
|---|
| 587 | + |
|---|
| 588 | + <div id="queue" class="hide"> |
|---|
| 589 | + </div><!--/#queue--> |
|---|
| 590 | </div><!-- /.inside --> |
|---|
| 591 | <!-- /#nav-menu-canvas .postbox--> |
|---|
| 592 | </div> |
|---|
| 593 | @@ -389,7 +373,7 @@ |
|---|
| 594 | </span> |
|---|
| 595 | <span id="editdescription-wrap"> |
|---|
| 596 | <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> |
|---|
| 597 | -</div> |
|---|
| 598 | +</div><!-- /#dialog-confirm--> |
|---|
| 599 | |
|---|
| 600 | <?php |
|---|
| 601 | |
|---|
| 602 | Index: wp-admin/css/nav-menu.css |
|---|
| 603 | =================================================================== |
|---|
| 604 | --- wp-admin/css/nav-menu.css (revision 13402) |
|---|
| 605 | +++ wp-admin/css/nav-menu.css (working copy) |
|---|
| 606 | @@ -1 +1 @@ |
|---|
| 607 | -.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;} |
|---|
| 608 | \ No newline at end of file |
|---|
| 609 | +.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;} |
|---|
| 610 | \ No newline at end of file |
|---|
| 611 | Index: wp-admin/css/nav-menu.dev.css |
|---|
| 612 | =================================================================== |
|---|
| 613 | --- wp-admin/css/nav-menu.dev.css (revision 13402) |
|---|
| 614 | +++ wp-admin/css/nav-menu.dev.css (working copy) |
|---|
| 615 | @@ -32,18 +32,23 @@ |
|---|
| 616 | #custom-nav li ul li ul li ul li { opacity: .9;} |
|---|
| 617 | #custom-nav li ul li ul li ul li ul li { opacity: .95; } |
|---|
| 618 | |
|---|
| 619 | +.show-all, .hide-all { cursor: pointer; } |
|---|
| 620 | +.hide-all { display: none; } |
|---|
| 621 | +.quick-search { } |
|---|
| 622 | + |
|---|
| 623 | #add-custom-link .howto { font-size: 11px; } |
|---|
| 624 | #add-custom-link .widefat { width: 85%; margin-right: 5px; } |
|---|
| 625 | |
|---|
| 626 | -.list-container { max-height: 203px; overflow-y: auto; padding-left: 2px; padding-right: 5px; } |
|---|
| 627 | +.list-container { display: none; max-height: 200px; overflow-y: auto; padding: 10px; border: 1px solid #DFDFDF; margin-bottom: 10px; -moz-border-radius: 4px; } |
|---|
| 628 | |
|---|
| 629 | +.postbox p.submit { margin-bottom: 0; } |
|---|
| 630 | + |
|---|
| 631 | .list { zoom: 1; } |
|---|
| 632 | .list li { margin: 0; } |
|---|
| 633 | -.list dt { display: none; margin: 0; border-bottom: 1px solid #e3e3e3; overflow: hidden; } |
|---|
| 634 | -.list dt { background: url(../images/ico-add.png) no-repeat right; } |
|---|
| 635 | +.list dt { display: none; margin: 0; overflow: hidden; margin-bottom: 5px; } |
|---|
| 636 | |
|---|
| 637 | -.list li .title { cursor: pointer; display: block; width: 95%; padding: 5px 0px; } |
|---|
| 638 | -.list li .title { background: url(../images/ico-arrow.png) no-repeat 4px 13px; background-position: center left; padding-left: 5%; } |
|---|
| 639 | +.list li .title { cursor: pointer; display: block; } |
|---|
| 640 | +.list li .title input { margin-right: 3px; } |
|---|
| 641 | |
|---|
| 642 | /* Visually shows the menu item hierarchy. */ |
|---|
| 643 | .list li ul li .title { margin-left: 14px; } |
|---|