Load default settings state when creating a new playlist in the media modal. Add a few missing inline `@this` annotations in `media-editor.js`.
See #26631. Built from https://develop.svn.wordpress.org/trunk@27242 git-svn-id: http://core.svn.wordpress.org/trunk@27099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
700ba14371
commit
c0379aaafc
|
@ -583,7 +583,7 @@
|
||||||
style: 'light',
|
style: 'light',
|
||||||
tracklist: false,
|
tracklist: false,
|
||||||
tracknumbers: false,
|
tracknumbers: false,
|
||||||
images: false
|
images: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -812,10 +812,16 @@
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
workflow.state('playlist-edit').on( 'update', function( selection ) {
|
workflow.state('playlist-edit').on( 'update', function( selection ) {
|
||||||
|
/**
|
||||||
|
* @this wp.media.editor
|
||||||
|
*/
|
||||||
this.insert( wp.media.playlist.shortcode( selection ).string() );
|
this.insert( wp.media.playlist.shortcode( selection ).string() );
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
workflow.state('video-playlist-edit').on( 'update', function( selection ) {
|
workflow.state('video-playlist-edit').on( 'update', function( selection ) {
|
||||||
|
/**
|
||||||
|
* @this wp.media.editor
|
||||||
|
*/
|
||||||
this.insert( wp.media['video-playlist'].shortcode( selection ).string() );
|
this.insert( wp.media['video-playlist'].shortcode( selection ).string() );
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -431,24 +431,35 @@ function wp_print_media_templates() {
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<#
|
||||||
|
var playlist = 'playlist-edit' === data.controller.id, emptyModel = 'undefined' === typeof data.model.style;
|
||||||
|
#>
|
||||||
<label class="setting">
|
<label class="setting">
|
||||||
<span><?php _e( 'Show Tracklist' ); ?></span>
|
<span><?php _e( 'Show Tracklist' ); ?></span>
|
||||||
<input type="checkbox" data-setting="_tracklist" />
|
<input type="checkbox" data-setting="_tracklist" <# if ( playlist && emptyModel ) { #>
|
||||||
|
checked="checked"
|
||||||
|
<# } #> />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="setting">
|
<label class="setting">
|
||||||
<span><?php _e( 'Show Track Numbers' ); ?></span>
|
<span><?php _e( 'Show Track Numbers' ); ?></span>
|
||||||
<input type="checkbox" data-setting="_tracknumbers" />
|
<input type="checkbox" data-setting="_tracknumbers" <# if ( playlist && emptyModel ) { #>
|
||||||
|
checked="checked"
|
||||||
|
<# } #> />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="setting">
|
<label class="setting">
|
||||||
<span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
|
<span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
|
||||||
<input type="checkbox" data-setting="_artists" />
|
<input type="checkbox" data-setting="_artists" <# if ( playlist && emptyModel ) { #>
|
||||||
|
checked="checked"
|
||||||
|
<# } #> />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="setting">
|
<label class="setting">
|
||||||
<span><?php _e( 'Show Images' ); ?></span>
|
<span><?php _e( 'Show Images' ); ?></span>
|
||||||
<input type="checkbox" data-setting="_images" />
|
<input type="checkbox" data-setting="_images" <# if ( emptyModel ) { #>
|
||||||
|
checked="checked"
|
||||||
|
<# } #> />
|
||||||
</label>
|
</label>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue