Ticket #33060: 33060.patch
File 33060.patch, 3.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/post.js
607 607 $( '#visibility .edit-visibility').click( function () { 608 608 if ( $postVisibilitySelect.is(':hidden') ) { 609 609 updateVisibility(); 610 $postVisibilitySelect.slideDown('fast').find('input[type="radio"]').first().focus(); 610 $postVisibilitySelect.slideDown( 'fast', function() { 611 $postVisibilitySelect.find( 'input[type="radio"]' ).first().focus(); 612 }) 611 613 $(this).hide(); 612 614 } 613 615 return false; … … 614 616 }); 615 617 616 618 $postVisibilitySelect.find('.cancel-post-visibility').click( function( event ) { 619 // Move focus back to the Edit link. 620 $( '#visibility .edit-visibility' ).show().focus(); 617 621 $postVisibilitySelect.slideUp('fast'); 618 622 $('#visibility-radio-' + $('#hidden-post-visibility').val()).prop('checked', true); 619 623 $('#post_password').val($('#hidden-post-password').val()); 620 624 $('#sticky').prop('checked', $('#hidden-post-sticky').prop('checked')); 621 625 $('#post-visibility-display').html(visibility); 622 $('#visibility .edit-visibility').show().focus();623 626 updateText(); 624 627 event.preventDefault(); 625 628 }); 626 629 627 630 $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // crazyhorse - multiple ok cancels 631 // Move focus back to the Edit link. 632 $( '#visibility .edit-visibility' ).show().focus(); 628 633 $postVisibilitySelect.slideUp('fast'); 629 $('#visibility .edit-visibility').show();630 634 updateText(); 631 635 632 636 if ( $postVisibilitySelect.find('input:radio:checked').val() != 'public' ) { … … 657 662 }); 658 663 659 664 $timestampdiv.find('.cancel-timestamp').click( function( event ) { 660 $timestampdiv.slideUp('fast').siblings('a.edit-timestamp').show().focus(); 665 // Move focus back to the Edit link. 666 $timestampdiv.siblings( 'a.edit-timestamp' ).show().focus(); 667 $timestampdiv.slideUp( 'fast' ); 661 668 $('#mm').val($('#hidden_mm').val()); 662 669 $('#jj').val($('#hidden_jj').val()); 663 670 $('#aa').val($('#hidden_aa').val()); … … 669 676 670 677 $timestampdiv.find('.save-timestamp').click( function( event ) { // crazyhorse - multiple ok cancels 671 678 if ( updateText() ) { 679 // Move focus back to the Edit link. 680 $timestampdiv.siblings( 'a.edit-timestamp' ).show().focus(); 672 681 $timestampdiv.slideUp('fast'); 673 $timestampdiv.siblings('a.edit-timestamp').show();674 682 } 675 683 event.preventDefault(); 676 684 }); … … 690 698 691 699 $postStatusSelect.siblings('a.edit-post-status').click( function( event ) { 692 700 if ( $postStatusSelect.is( ':hidden' ) ) { 693 $postStatusSelect.slideDown('fast').find('select').focus(); 701 $postStatusSelect.slideDown( 'fast', function() { 702 $postStatusSelect.find( 'select' ).focus() 703 }); 694 704 $(this).hide(); 695 705 } 696 706 event.preventDefault(); … … 697 707 }); 698 708 699 709 $postStatusSelect.find('.save-post-status').click( function( event ) { 700 $postStatusSelect.slideUp('fast').siblings('a.edit-post-status').show(); 710 // Move focus back to the Edit link. 711 $postStatusSelect.siblings( 'a.edit-post-status' ).show().focus(); 712 $postStatusSelect.slideUp( 'fast' ); 701 713 updateText(); 702 714 event.preventDefault(); 703 715 }); 704 716 705 717 $postStatusSelect.find('.cancel-post-status').click( function( event ) { 706 $('#post-status-select').slideUp('fast').siblings( 'a.edit-post-status' ).show().focus(); 718 // Move focus back to the Edit link. 719 $postStatusSelect.siblings( 'a.edit-post-status' ).show().focus(); 720 $postStatusSelect.slideUp( 'fast' ); 707 721 $('#post_status').val( $('#hidden_post_status').val() ); 708 722 updateText(); 709 723 event.preventDefault();