wp.media.collection should be its own civilized instantiable class, not a wrapper/factory. The class shall contain no reference to specific instances, and shall not try to grab static properties of itself. self, meet this.

See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27313 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-02-27 19:21:04 +00:00
parent 1a78a56e98
commit 7092b31e2f
2 changed files with 180 additions and 271 deletions
+5 -5
View File
@@ -432,32 +432,32 @@ function wp_print_media_templates() {
</label>
<#
var playlist = 'playlist-edit' === data.controller.id, emptyModel = 'undefined' === typeof data.model.style;
var playlist = 'playlist-edit' === data.controller.id, emptyModel = _.isEmpty(data.model);
#>
<label class="setting">
<span><?php _e( 'Show Tracklist' ); ?></span>
<input type="checkbox" data-setting="_tracklist" <# if ( playlist && emptyModel ) { #>
<input type="checkbox" data-setting="tracklist" <# if ( playlist && emptyModel ) { #>
checked="checked"
<# } #> />
</label>
<label class="setting">
<span><?php _e( 'Show Track Numbers' ); ?></span>
<input type="checkbox" data-setting="_tracknumbers" <# if ( playlist && emptyModel ) { #>
<input type="checkbox" data-setting="tracknumbers" <# if ( playlist && emptyModel ) { #>
checked="checked"
<# } #> />
</label>
<label class="setting">
<span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
<input type="checkbox" data-setting="_artists" <# if ( playlist && emptyModel ) { #>
<input type="checkbox" data-setting="artists" <# if ( playlist && emptyModel ) { #>
checked="checked"
<# } #> />
</label>
<label class="setting">
<span><?php _e( 'Show Images' ); ?></span>
<input type="checkbox" data-setting="_images" <# if ( emptyModel ) { #>
<input type="checkbox" data-setting="images" <# if ( emptyModel ) { #>
checked="checked"
<# } #> />
</label>