WordPress.org

Make WordPress Core

Changeset 27480


Ignore:
Timestamp:
03/09/2014 06:23:18 AM (6 years ago)
Author:
wonderboymusic
Message:

Since audio and video shortcodes don't point at actual attachments, don't persist the library's selection. Move the media instructions in the block that scrolls.

See #27016.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r27479 r27480  
    12291229            // images that are not initially loaded still appear.
    12301230            library.observe( this.get('selection') );
    1231         },
    1232 
    1233         activate: function() {
    1234             this.updateSelection();
    1235             media.controller.Library.prototype.activate.apply( this, arguments );
    1236         },
    1237 
    1238         updateSelection: function() {
    1239             var selection = this.get('selection'),
    1240                 attachment;
    1241 
    1242             attachment = this.media.attachment;
    1243 
    1244             selection.reset( attachment ? [ attachment ] : [] );
    12451231        }
    12461232    });
     
    28172803                                attachment = selection.single();
    28182804
    2819                             controller.media.changeAttachment( attachment, state.display( attachment ) );
     2805                            controller.media.changeAttachment( attachment );
    28202806
    28212807                            state.trigger( 'replace', controller.media.toJSON() );
     
    28452831                                attachment = selection.single();
    28462832
    2847                             controller.media.setSource( attachment, state.display( attachment ) );
     2833                            controller.media.setSource( attachment );
    28482834
    28492835                            state.trigger( 'add-source', controller.media.toJSON() );
     
    29152901                    menu: 'audio-details'
    29162902                } ),
    2917 
    29182903
    29192904                new media.controller.MediaLibrary( {
  • trunk/src/wp-includes/js/mediaelement/wp-mediaelement.css

    r27478 r27480  
    2525
    2626.media-embed-details .instructions {
    27     padding: 16px;
     27    padding: 16px 0;
    2828    max-width: 600px;
    2929}
     
    3838
    3939.media-embed-details .embed-media-settings {
    40     top: 70px;
     40    top: 0;
    4141}
    4242
  • trunk/src/wp-includes/media-template.php

    r27478 r27480  
    665665        <?php $audio_types = wp_get_audio_extensions(); ?>
    666666        <div class="media-embed media-embed-details">
    667             <div class="instructions media-instructions">{{{ wp.media.view.l10n.audioDetailsText }}}</div>
    668667            <div class="embed-media-settings embed-audio-settings">
     668                <div class="instructions media-instructions">{{{ wp.media.view.l10n.audioDetailsText }}}</div>
    669669                <audio controls
    670670                    class="wp-audio-shortcode"
     
    732732        <?php $video_types = wp_get_video_extensions(); ?>
    733733        <div class="media-embed media-embed-details">
    734             <div class="instructions media-instructions">{{{ wp.media.view.l10n.videoDetailsText }}}</div>
    735734            <div class="embed-media-settings embed-video-settings">
     735                <div class="instructions media-instructions">{{{ wp.media.view.l10n.videoDetailsText }}}</div>
    736736                <div class="wp-video-holder">
    737737                <#
Note: See TracChangeset for help on using the changeset viewer.