Changeset 34977 for trunk/src/wp-admin/js/post.js
- Timestamp:
- 10/09/2015 01:26:46 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/post.js
r34671 r34977 433 433 434 434 // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js 435 $('a', '#' + taxonomy + '-tabs').click( function(){ 435 $('a', '#' + taxonomy + '-tabs').click( function( e ) { 436 e.preventDefault(); 436 437 var t = $(this).attr('href'); 437 438 $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); … … 442 443 else 443 444 setUserSetting( settingName, 'pop' ); 444 return false;445 445 }); 446 446 … … 484 484 }); 485 485 486 $('#' + taxonomy + '-add-toggle').click( function() { 486 $('#' + taxonomy + '-add-toggle').click( function( e ) { 487 e.preventDefault(); 487 488 $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' ); 488 489 $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click(); 489 490 $('#new'+taxonomy).focus(); 490 return false;491 491 }); 492 492 … … 609 609 }; 610 610 611 $( '#visibility .edit-visibility').click( function () { 611 $( '#visibility .edit-visibility').click( function( e ) { 612 e.preventDefault(); 612 613 if ( $postVisibilitySelect.is(':hidden') ) { 613 614 updateVisibility(); … … 617 618 $(this).hide(); 618 619 } 619 return false;620 620 }); 621 621 … … 743 743 744 744 buttons.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <a class="cancel" href="#">'+postL10n.cancel+'</a>'); 745 buttons.children('.save').click( function() {745 buttons.children('.save').click( function( e ) { 746 746 var new_slug = e.children('input').val(); 747 e.preventDefault(); 747 748 if ( new_slug == $('#editable-post-name-full').text() ) { 748 749 buttons.children('.cancel').click(); 749 return false;750 return; 750 751 } 751 752 $.post(ajaxurl, { … … 769 770 $( '.edit-slug' ).focus(); 770 771 }); 771 return false;772 }); 773 774 buttons.children('.cancel').click(function() {772 }); 773 774 buttons.children('.cancel').click( function( e ) { 775 e.preventDefault(); 775 776 $('#view-post-btn').show(); 776 777 e.html(revert_e); … … 779 780 real_slug.val(revert_slug); 780 781 $( '.edit-slug' ).focus(); 781 return false;782 782 }); 783 783
Note: See TracChangeset
for help on using the changeset viewer.