diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js
index c1407d3..8569ae5 100644
|
a
|
b
|
|
| 2140 | 2140 | this.bindHandlers(); |
| 2141 | 2141 | }, |
| 2142 | 2142 | |
| | 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 | */ |
| 2143 | 2152 | createSelection: function() { |
| 2144 | 2153 | var selection = this.options.selection; |
| 2145 | 2154 | |
| … |
… |
|
| 2155 | 2164 | }; |
| 2156 | 2165 | }, |
| 2157 | 2166 | |
| | 2167 | /** |
| | 2168 | * Create the default states on the frame. |
| | 2169 | */ |
| 2158 | 2170 | createStates: function() { |
| 2159 | 2171 | var options = this.options; |
| 2160 | 2172 | |
| … |
… |
|
| 2174 | 2186 | ]); |
| 2175 | 2187 | }, |
| 2176 | 2188 | |
| | 2189 | /** |
| | 2190 | * Bind region mode event callbacks. |
| | 2191 | * |
| | 2192 | * @see media.controller.Region.render |
| | 2193 | */ |
| 2177 | 2194 | bindHandlers: function() { |
| 2178 | 2195 | this.on( 'router:create:browse', this.createRouter, this ); |
| 2179 | 2196 | this.on( 'router:render:browse', this.browseRouter, this ); |
| … |
… |
|
| 2182 | 2199 | this.on( 'toolbar:create:select', this.createSelectToolbar, this ); |
| 2183 | 2200 | }, |
| 2184 | 2201 | |
| 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({ |
| 2188 | 2209 | upload: { |
| 2189 | 2210 | text: l10n.uploadFilesTitle, |
| 2190 | 2211 | priority: 20 |
| … |
… |
|
| 2197 | 2218 | }, |
| 2198 | 2219 | |
| 2199 | 2220 | /** |
| 2200 | | * Content |
| | 2221 | * Render callback for the content region in the `browse` mode. |
| 2201 | 2222 | * |
| 2202 | | * @param {Object} content |
| 2203 | | * @this wp.media.controller.Region |
| | 2223 | * @param {wp.media.controller.Region} contentRegion |
| 2204 | 2224 | */ |
| 2205 | | browseContent: function( content ) { |
| | 2225 | browseContent: function( contentRegion ) { |
| 2206 | 2226 | var state = this.state(); |
| 2207 | 2227 | |
| 2208 | 2228 | this.$el.removeClass('hide-toolbar'); |
| 2209 | 2229 | |
| 2210 | 2230 | // Browse our library of attachments. |
| 2211 | | content.view = new media.view.AttachmentsBrowser({ |
| | 2231 | contentRegion.view = new media.view.AttachmentsBrowser({ |
| 2212 | 2232 | controller: this, |
| 2213 | 2233 | collection: state.get('library'), |
| 2214 | 2234 | selection: state.get('selection'), |
| … |
… |
|
| 2227 | 2247 | }, |
| 2228 | 2248 | |
| 2229 | 2249 | /** |
| 2230 | | * |
| 2231 | | * @this wp.media.controller.Region |
| | 2250 | * Render callback for the content region in the `upload` mode. |
| 2232 | 2251 | */ |
| 2233 | 2252 | uploadContent: function() { |
| 2234 | | this.$el.removeClass('hide-toolbar'); |
| | 2253 | this.$el.removeClass( 'hide-toolbar' ); |
| 2235 | 2254 | this.content.set( new media.view.UploaderInline({ |
| 2236 | 2255 | controller: this |
| 2237 | 2256 | }) ); |