Changeset 13390
- Timestamp:
- 02/24/2010 10:52:29 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js
r13377 r13390 34 34 { 35 35 36 itemTitle = jQuery('#title' + o). attr('value');37 itemURL = jQuery('#linkurl' + o). attr('value');38 itemAnchorTitle = jQuery('#anchortitle' + o). attr('value');39 itemNewWindow = jQuery('#newwindow' + o). attr('value');40 itemDesc = jQuery('#description' + o). attr('value');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(); 41 41 42 42 jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o ) … … 44 44 jQuery('#dialog-confirm').dialog('open'); 45 45 46 jQuery('#edittitle').attr('value', itemTitle); 47 jQuery('#editlink').attr('value', itemURL); 48 jQuery('#editanchortitle').attr('value', itemAnchorTitle); 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 ); 49 54 jQuery("#editnewwindow option[value='" + itemNewWindow + "']").attr('selected', 'selected'); 50 jQuery('#editdescription'). attr('value', itemDesc);55 jQuery('#editdescription').val( itemDesc ); 51 56 52 57 }; -
trunk/wp-admin/nav-menus.php
r13383 r13390 107 107 $parent_id = isset( $_POST['parent'.$k] )? $_POST['parent'.$k] : 0; 108 108 $custom_title = isset( $_POST['title'.$k] )? $_POST['title'.$k] : ''; 109 $custom_linkurl = isset( $_POST['linkurl'.$k] )? $_POST['linkurl'.$k] : '';109 $custom_linkurl = ( isset( $_POST['linkurl'.$k] ) && 'custom' == $_POST['linktype'.$k] ) ? $_POST['linkurl'.$k] : ''; 110 110 $custom_description = isset( $_POST['description'.$k] )? $_POST['description'.$k] : ''; 111 111 // doesn't seem to be used by UI … … 377 377 378 378 <div id="dialog-confirm" style="display:none;" title="<?php esc_attr_e('Edit Menu Item'); ?>"> 379 <input id="edittitle" type="text" name="edittitle" value="" /><label class="editlabel" for="edittitle"><?php _e('Menu Title'); ?></label><br /> 380 <input id="editlink" type="text" name="editlink" value="" /><label class="editlabel" for="editlink"><?php _e('URL'); ?></label><br /> 381 <input id="editanchortitle" type="text" name="editanchortitle" value="" /><label class="editlabel" for="editanchortitle"><?php _e('Link Title'); ?></label><br /> 379 <span id="edittitle-wrap"><input id="edittitle" type="text" name="edittitle" value="" /><label class="editlabel" for="edittitle"><?php _e('Menu Title'); ?></label><br /></span> 380 <span id="editlink-wrap"><input id="editlink" type="text" name="editlink" value="" /><label class="editlabel" for="editlink"><?php _e('URL'); ?></label><br /></span> 381 <span id="editanchortitle-wrap"><input id="editanchortitle" type="text" name="editanchortitle" value="" /><label class="editlabel" for="editanchortitle"><?php _e('Link Title'); ?></label><br /></span> 382 <span id="editnewwindow-wrap"> 382 383 <select id="editnewwindow" name="editnewwindow"> 383 384 <option value="1"><?php _e('Yes'); ?></option> 384 385 <option value="0"><?php _e('No'); ?></option> 385 386 </select><label class="editlabel" for="editnewwindow"><?php _e('Open Link in a new window'); ?></label> 386 <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 /> 387 </span> 388 <span id="editdescription-wrap"> 389 <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> 387 390 </div> 388 391
Note: See TracChangeset
for help on using the changeset viewer.