When creating a new playlist, we don't know from the model what "type" it is right away (there is no longer a `video-playlist` shortcode) - we need to check the controller's library's prop for `type` when deciding what settings to display in the modal.
See #27535. Built from https://develop.svn.wordpress.org/trunk@27812 git-svn-id: http://core.svn.wordpress.org/trunk@27646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
045e837577
commit
eec578abcd
|
@ -517,20 +517,21 @@ function wp_print_media_templates() {
|
|||
<script type="text/html" id="tmpl-playlist-settings">
|
||||
<h3><?php _e( 'Playlist Settings' ); ?></h3>
|
||||
|
||||
<# var emptyModel = _.isEmpty( data.model ); #>
|
||||
<# var emptyModel = _.isEmpty( data.model ),
|
||||
isVideo = 'video' === data.controller.get('library').props.get('type'); #>
|
||||
|
||||
<label class="setting">
|
||||
<input type="checkbox" data-setting="tracklist" <# if ( emptyModel ) { #>
|
||||
checked="checked"
|
||||
<# } #> />
|
||||
<# if ( 'audio' === data.model.type ) { #>
|
||||
<span><?php _e( 'Show Tracklist' ); ?></span>
|
||||
<# } else { #>
|
||||
<# if ( isVideo ) { #>
|
||||
<span><?php _e( 'Show Video List' ); ?></span>
|
||||
<# } else { #>
|
||||
<span><?php _e( 'Show Tracklist' ); ?></span>
|
||||
<# } #>
|
||||
</label>
|
||||
|
||||
<# if ( 'audio' === data.model.type ) { #>
|
||||
<# if ( ! isVideo ) { #>
|
||||
<label class="setting">
|
||||
<input type="checkbox" data-setting="artists" <# if ( emptyModel ) { #>
|
||||
checked="checked"
|
||||
|
|
Loading…
Reference in New Issue