Changeset 22044
- Timestamp:
- 09/27/2012 06:20:22 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r22022 r22044 1032 1032 if ( ! workflow ) { 1033 1033 workflow = wp.media({ 1034 title: title, 1034 1035 library: { 1035 1036 type: 'image' … … 1059 1060 }).prependTo( $element ); 1060 1061 }); 1061 workflow.modal.title( title );1062 1062 } 1063 1063 -
trunk/wp-admin/js/media-upload.js
r22036 r22044 104 104 105 105 workflow = workflows[ id ] = wp.media( _.defaults( options || {}, { 106 title: wp.media.view.l10n.insertMedia, 106 107 multiple: true 107 108 } ) ); -
trunk/wp-includes/js/media-views.js
r22040 r22044 20 20 media.controller.Workflow = Backbone.Model.extend({ 21 21 defaults: { 22 title: '', 22 23 multiple: false, 23 24 view: 'library', … … 194 195 initialize: function() { 195 196 this.controller = this.options.controller; 197 this.controller.on( 'change:title', this.render, this ); 196 198 197 199 _.defaults( this.options, { 198 title: '',199 200 container: document.body 200 201 }); … … 209 210 this.options.$content.detach(); 210 211 211 this.$el.html( this.template( this. options) );212 this.$el.html( this.template( this.controller.toJSON() ) ); 212 213 this.$('.media-modal-content').append( this.options.$content ); 213 214 return this; … … 242 243 // Set and render the content. 243 244 this.options.$content = ( $content instanceof Backbone.View ) ? $content.$el : $content; 244 return this.render();245 },246 247 title: function( title ) {248 this.options.title = title;249 245 return this.render(); 250 246 }
Note: See TracChangeset
for help on using the changeset viewer.