Make WordPress Core

Changeset 22804


Ignore:
Timestamp:
11/22/2012 01:43:31 AM (12 years ago)
Author:
koopersmith
Message:

Media: Convert the attachments browser to use internal views. see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22802 r22804  
    21932193            delete this.options.views;
    21942194
    2195             // if ( ! this.options.silent )
     2195            if ( ! this.options.silent )
    21962196                this.render();
    21972197        },
     
    28952895            });
    28962896
     2897            this.views.add( this.toolbar );
     2898
    28972899            filters = this.options.filters;
    28982900            if ( 'uploaded' === filters )
     
    29432945                AttachmentView: this.options.AttachmentView
    29442946            });
    2945         },
    2946 
    2947         dispose: function() {
    2948             this.toolbar.destroy();
    2949             this.attachments.destroy();
    2950             media.View.prototype.dispose.apply( this, arguments );
    2951         },
    2952 
    2953         render: function() {
    2954             this.toolbar.$el.detach();
    2955             this.attachments.$el.detach();
    2956             this.$el.html([ this.toolbar.render().el, this.attachments.render().el ]);
    2957             return this;
     2947
     2948            this.views.add( this.attachments );
    29582949        }
    29592950    });
Note: See TracChangeset for help on using the changeset viewer.