~canonical-sysadmins/wordpress/4.8.3

« back to all changes in this revision

Viewing changes to wp-admin/js/theme.js

  • Committer: Ryan Finnie
  • Date: 2015-08-31 16:09:47 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: ryan.finnie@canonical.com-20150831160947-1h6rfxby9z1ec62u
Merge WP4.3 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
        },
85
85
 
86
86
        // Defines search element container
87
 
        searchContainer: $( '#wpbody h2:first' ),
 
87
        searchContainer: $( '#wpbody h1:first' ),
88
88
 
89
89
        // Search input and view
90
90
        // for current theme collection
793
793
                return false;
794
794
        },
795
795
 
796
 
        collapse: function() {
 
796
        collapse: function( event ) {
 
797
                var $button = $( event.currentTarget );
 
798
                if ( 'true' === $button.attr( 'aria-expanded' ) ) {
 
799
                        $button.attr({ 'aria-expanded': 'false', 'aria-label': l10n.expandSidebar });
 
800
                } else {
 
801
                        $button.attr({ 'aria-expanded': 'true', 'aria-label': l10n.collapseSidebar });
 
802
                }
797
803
 
798
804
                this.$el.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
799
805
                return false;