Make WordPress Core

Ticket #28459: 28459.5.diff

File 28459.5.diff, 2.5 KB (added by ericlewis, 12 years ago)
  • src/wp-includes/js/media-views.js

    diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js
    index c1407d3..8569ae5 100644
    a b  
    21402140                        this.bindHandlers();
    21412141                },
    21422142
     2143                /**
     2144                 * Attach a selection collection to the frame.
     2145                 *
     2146                 * A selection is a collection of attachments used for a specific purpose
     2147                 * by a media frame. e.g. Selecting an attachment (or many) to insert into
     2148                 * post content.
     2149                 *
     2150                 * @see media.model.Selection
     2151                 */
    21432152                createSelection: function() {
    21442153                        var selection = this.options.selection;
    21452154
     
    21552164                        };
    21562165                },
    21572166
     2167                /**
     2168                 * Create the default states on the frame.
     2169                 */
    21582170                createStates: function() {
    21592171                        var options = this.options;
    21602172
     
    21742186                        ]);
    21752187                },
    21762188
     2189                /**
     2190                 * Bind region mode event callbacks.
     2191                 *
     2192                 * @see media.controller.Region.render
     2193                 */
    21772194                bindHandlers: function() {
    21782195                        this.on( 'router:create:browse', this.createRouter, this );
    21792196                        this.on( 'router:render:browse', this.browseRouter, this );
     
    21822199                        this.on( 'toolbar:create:select', this.createSelectToolbar, this );
    21832200                },
    21842201
    2185                 // Routers
    2186                 browseRouter: function( view ) {
    2187                         view.set({
     2202                /**
     2203                 * Render callback for the router region in the `browse` mode.
     2204                 *
     2205                 * @param {wp.media.view.Router} routerView
     2206                 */
     2207                browseRouter: function( routerView ) {
     2208                        routerView.set({
    21882209                                upload: {
    21892210                                        text:     l10n.uploadFilesTitle,
    21902211                                        priority: 20
     
    21972218                },
    21982219
    21992220                /**
    2200                  * Content
     2221                 * Render callback for the content region in the `browse` mode.
    22012222                 *
    2202                  * @param {Object} content
    2203                  * @this wp.media.controller.Region
     2223                 * @param {wp.media.controller.Region} contentRegion
    22042224                 */
    2205                 browseContent: function( content ) {
     2225                browseContent: function( contentRegion ) {
    22062226                        var state = this.state();
    22072227
    22082228                        this.$el.removeClass('hide-toolbar');
    22092229
    22102230                        // Browse our library of attachments.
    2211                         content.view = new media.view.AttachmentsBrowser({
     2231                        contentRegion.view = new media.view.AttachmentsBrowser({
    22122232                                controller: this,
    22132233                                collection: state.get('library'),
    22142234                                selection:  state.get('selection'),
     
    22272247                },
    22282248
    22292249                /**
    2230                  *
    2231                  * @this wp.media.controller.Region
     2250                 * Render callback for the content region in the `upload` mode.
    22322251                 */
    22332252                uploadContent: function() {
    2234                         this.$el.removeClass('hide-toolbar');
     2253                        this.$el.removeClass( 'hide-toolbar' );
    22352254                        this.content.set( new media.view.UploaderInline({
    22362255                                controller: this
    22372256                        }) );