Nav Menu enhancements. Whole item is clickable to add. Refactored CSS. Scrollbar when more than 7 menu items. props ptahdunbar. see #11817

git-svn-id: http://svn.automattic.com/wordpress/trunk@13395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-02-25 05:40:03 +00:00
parent 63a75fff93
commit 18c313559f
5 changed files with 80 additions and 96 deletions

View File

@ -1 +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;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;float:left;width:260px;margin:0;padding:0 0 0 5px;line-height:30px;border-bottom:1px solid #e3e3e3;}.list dt span{float:left;}.list dt img{cursor:pointer;float:right;margin:7px 5px 0 0;}#menus-container{clear:both;}#nav-container .inside{padding:0 10px 10px;}#menus-container .submit{padding:0;}#menu-settings-column .inside{padding:10px;overflow:auto;}#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;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;}#existing-pages li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-pages li ul li .title{margin-left:10px;}#existing-pages li ul li ul li .title{margin-left:20px;}#existing-pages li ul li ul li ul li .title{margin-left:30px;}#existing-pages li ul li ul li ul li ul li .title{margin-left:40px;}#existing-pages li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-pages li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}#existing-categories li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-categories li ul li .title{margin-left:10px;}#existing-categories li ul li ul li .title{margin-left:20px;}#existing-categories li ul li ul li ul li .title{margin-left:30px;}#existing-categories li ul li ul li ul li ul li .title{margin-left:40px;}#existing-categories li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-categories li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}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;}
.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;}

View File

@ -13,66 +13,55 @@
h2.heading { margin: 32px 0 10px 0; }
.checkboxes { float: right; margin: 10px 12px 0 0; }
.list { zoom: 1; }
.list li { margin: 0; }
.list dt { display:none; float: left; width: 260px; margin: 0; padding: 0 0 0 5px; line-height: 30px; border-bottom: 1px solid #e3e3e3; }
.list dt span { float: left; }
.list dt img { cursor: pointer; float: right; margin: 7px 5px 0 0 }
#menus-container { clear: both; }
#nav-container .inside { padding: 0px 10px 10px; }
#menus-container .submit { padding: 0px; }
#menu-settings-column .inside { padding: 10px; overflow: auto; }
#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 { -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 dl dt a {}
#custom-nav li .title { background:url(../images/ico-arrow.png) no-repeat 4px 5px; padding-left:15px; }
#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; }
#existing-pages li .title { background:url(../images/ico-arrow.png) no-repeat 4px 13px; padding-left:15px; }
#existing-pages li ul li .title { margin-left:10px; }
#existing-pages li ul li ul li .title { margin-left:20px; }
#existing-pages li ul li ul li ul li .title { margin-left:30px; }
#existing-pages li ul li ul li ul li ul li .title { margin-left:40px; }
#existing-pages li ul li ul li ul li ul li ul li .title { margin-left:50px; }
#existing-pages li ul li ul li ul li ul li ul li ul li .title { margin-left:60px; }
#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title { margin-left:70px; }
#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title { margin-left:80px; }
#add-custom-link .howto { font-size: 11px; }
#add-custom-link .widefat { width: 85%; margin-right: 5px; }
#existing-categories li .title { background:url(../images/ico-arrow.png) no-repeat 4px 13px; padding-left:15px; }
#existing-categories li ul li .title { margin-left:10px; }
#existing-categories li ul li ul li .title { margin-left:20px; }
#existing-categories li ul li ul li ul li .title { margin-left:30px; }
#existing-categories li ul li ul li ul li ul li .title { margin-left:40px; }
#existing-categories li ul li ul li ul li ul li ul li .title { margin-left:50px; }
#existing-categories li ul li ul li ul li ul li ul li ul li .title { margin-left:60px; }
#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title { margin-left:70px; }
#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title { margin-left:80px; }
.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 0px; }
.list li .title { background: url(../images/ico-arrow.png) no-repeat 4px 13px; background-position: center left; padding-left: 5%; }
/* Visually shows the menu item hierarchy. */
.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; }
#custom-nav li dl { }
.hide { display: none; }
.type { text-transform: uppercase; font-size: 11px; color: #999999; padding-right: 10px; }
#menu_select { width: 170px; }
#dialog-confirm label { padding-left: 10px; }
/* EDIT LINK BOX */
@ -83,9 +72,7 @@ img.remove, img.edit { cursor: pointer; margin: 0 5px 0 0; }
#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 #FFFFFF; border-color: #BBBBBB; 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; }
/* Overlays */

View File

@ -180,12 +180,36 @@ if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
<h3 class="hndle"><?php esc_html_e('Add Menu'); ?></h3>
<div class="inside">
<span>
<input id="add-menu-name" name="add-menu-name" type="text" value="" />
<input id="add-menu-name" name="add-menu-name" type="text" class="regular-text" value="" />
<input id="add-menu" type="submit" value="<?php esc_attr_e('Add Menu'); ?>" name="add-menu" class="button" />
</span>
</div><!-- /.inside-->
</div><!--END #add-menu-->
<div id="add-custom-link" class="postbox">
<div class="handlediv" title="Click to toggle"><br /></div>
<h3 class="hndle"><?php esc_html_e('Add a Custom Link'); ?></h3>
<div class="inside">
<p class="howto"><label for="custom-menu-item-url"><input id="custom-menu-item-url" type="text" class="widefat code" value="http://" /><?php _e('URL'); ?></label></p>
<?php $template_dir = get_bloginfo('url'); ?>
<input type="hidden" id="template-dir" value="<?php echo esc_attr($template_dir); ?>" />
<p class="howto"><label for="custom-menu-item-name"><input id="custom-menu-item-name" type="text" class="widefat regular-text" value="<?php echo esc_attr( __('Menu Item') ); ?>" /><?php _e('Text'); ?></label></p>
<label class="howto" for="custom_menu_item_description" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?>>
<input id="custom_menu_item_description" type="text" class="widefat regular-text" value="<?php esc_attr_e('A description'); ?>" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> onfocus="jQuery('#custom_menu_item_description').attr('value','');" />
<?php _e('Description'); ?>
</label>
<?php if ( 'no' != $advanced_option_descriptions ) { echo '<br />'; } ?>
<a class="addtomenu button" onclick="appendToList('<?php echo $template_dir; ?>','<?php echo esc_js( _x('Custom', 'menu nav item type') ); ?>','','','','0','');jQuery('#custom-menu-item-name').attr('value','<?php echo esc_js( __('Menu Item') ); ?>');jQuery('#custom_menu_item_description').attr('value','<?php echo esc_js( __('A description') ); ?>');"><?php _e('Add Link'); ?></a>
<br class="clear" />
</div><!-- /.inside-->
</div><!-- /#add-custom-link-->
<div id="add-pages" class="postbox">
<div class="handlediv" title="Click to toggle"><br /></div>
<h3 class="hndle"><?php esc_html_e('Add an Existing Page'); ?></h3>
@ -229,7 +253,7 @@ if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
jQuery('#existing-pages').css('display','none');
});
</script>
<input type="text" onfocus="jQuery('#page-search').attr('value','');" id="page-search" value="<?php esc_attr_e('Search Pages'); ?>" />
<input type="text" onfocus="jQuery('#page-search').attr('value','');" id="page-search" class="regular-text" value="<?php esc_attr_e('Search Pages'); ?>" />
<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>
<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>
@ -238,10 +262,13 @@ if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
jQuery('#hide-pages').hide();
</script>
<ul id="existing-pages" class="list">
<div id="existing-pages" class="list-container">
<ul class="list">
<?php $items_counter = wp_nav_menu_get_pages( 0,'default' ); ?>
</ul>
<div class="fix"></div>
</div><!-- /.list-container-->
<br class="clear" />
</div><!-- /.inside-->
</div><!--END #add-pages-->
@ -286,7 +313,7 @@ if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
});
</script>
<input type="text" onfocus="jQuery('#cat-search').attr('value','');" id="cat-search" value="<?php esc_attr_e('Search Categories'); ?>" />
<input type="text" onfocus="jQuery('#cat-search').attr('value','');" id="cat-search" class="regular-text" value="<?php esc_attr_e('Search Categories'); ?>" />
<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>
<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>
@ -295,43 +322,14 @@ if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
jQuery('#hide-cats').hide();
</script>
<ul id="existing-categories" class="list">
<div id="existing-categories" class="list-container">
<ul class="list">
<?php $items_counter = wp_nav_menu_get_categories( $items_counter, 'default' ); ?>
</ul>
<div class="fix"></div>
</div><!-- /.list-container-->
<br class="clear" />
</div><!-- /.inside-->
</div><!--END #add-categories-->
<div id="add-external-link" class="postbox">
<div class="handlediv" title="Click to toggle"><br /></div>
<h3 class="hndle"><?php esc_html_e('Add a Custom Link'); ?></h3>
<div class="inside">
<label class="howto" for="custom-menu-item-url">
<input id="custom-menu-item-url" type="text" value="http://" />
<?php _e('URL'); ?>
</label><br />
<?php $template_dir = get_bloginfo('url'); ?>
<input type="hidden" id="template-dir" value="<?php echo esc_attr($template_dir); ?>" />
<label class="howto" for="custom-menu-item-name">
<input id="custom-menu-item-name" type="text" value="<?php echo esc_attr( __('Menu Item') ); ?>" onfocus="jQuery('#custom-menu-item-name').attr('value','');" />
<?php _e('Menu Text'); ?>
</label><br />
<label class="howto" for="custom_menu_item_description" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?>>
<input id="custom_menu_item_description" type="text" value="<?php esc_attr_e('A description'); ?>" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> onfocus="jQuery('#custom_menu_item_description').attr('value','');" />
<?php _e('Description'); ?>
</label>
<?php if ( 'no' != $advanced_option_descriptions ) { echo '<br />'; } ?>
<a class="addtomenu button" onclick="appendToList('<?php echo $template_dir; ?>','<?php echo esc_js( _x('Custom', 'menu nav item type') ); ?>','','','','0','');jQuery('#custom-menu-item-name').attr('value','<?php echo esc_js( __('Menu Item') ); ?>');jQuery('#custom_menu_item_description').attr('value','<?php echo esc_js( __('A description') ); ?>');"><?php _e('Add to menu'); ?></a>
<div class="fix"></div>
</div><!-- /.inside-->
</div><!-- /#add-external-link-->
</div><!-- /#side-sortables-->
</div><!-- /#menu-settings-column -->

View File

@ -152,8 +152,7 @@ function wp_print_nav_menu_item($menu_item, $context, $args = array() ) {
?>
<dl>
<dt>
<span class="title"><?php echo $menu_item->title; ?></span>
<a 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 ); ?>"><img alt="<?php esc_attr_e('Add to Custom Menu'); ?>" title="<?php esc_attr_e('Add to Custom Menu'); ?>" src="<?php echo admin_url('images/ico-add.png'); ?>" /></a>
<a class="title" title="<?php esc_attr_e('Add to Custom 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>
</dt>
</dl>
<?php

View File

@ -474,7 +474,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
$styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100224' );
$styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100225' );
foreach ( $rtl_styles as $rtl_style ) {
$styles->add_data( $rtl_style, 'rtl', true );