Ticket #22656: 22656.1.to.2.diff
File 22656.1.to.2.diff, 953 bytes (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
3071 3071 } 3072 3072 }, 3073 3073 3074 removeContent: function() { 3075 _.each(['attachments','uploader'], function( key ) { 3076 if ( this[ key ] ) { 3077 this[ key ].remove(); 3078 delete this[ key ]; 3079 } 3080 }, this ); 3081 }, 3082 3074 3083 createUploader: function() { 3075 if ( this.attachments ) { 3076 this.attachments.remove(); 3077 delete this.attachments; 3078 } 3084 this.removeContent(); 3079 3085 3080 3086 this.uploader = new media.view.UploaderInline({ 3081 3087 controller: this.controller … … 3085 3091 }, 3086 3092 3087 3093 createAttachments: function() { 3088 if ( this.uploader ) { 3089 this.uploader.remove(); 3090 delete this.uploader; 3091 } 3094 this.removeContent(); 3092 3095 3093 3096 this.attachments = new media.view.Attachments({ 3094 3097 controller: this.controller,