Ticket #48305: 48305.2.diff
File 48305.2.diff, 15.0 KB (added by , 5 years ago) |
---|
-
js/media/controllers/region.js
77 77 * @fires Region#create 78 78 * @fires Region#render 79 79 * 80 * @returns {wp.media.controller.Region} Returns itself to allow chaining 80 * @returns {wp.media.controller.Region} Returns itself to allow chaining. 81 81 */ 82 82 render: function( mode ) { 83 83 // If the mode isn't active, activate it. -
js/media/controllers/state-machine.js
65 65 * @fires wp.media.controller.State#deactivate 66 66 * @fires wp.media.controller.State#activate 67 67 * 68 * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining 68 * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. 69 69 */ 70 70 setState: function( id ) { 71 71 var previous = this.state(); -
js/media/models/attachments.js
172 172 * 173 173 * @param {wp.media.model.Attachment} attachment 174 174 * @param {Object} options 175 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 175 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 176 176 */ 177 177 validate: function( attachment, options ) { 178 178 var valid = this.validator( attachment ), … … 195 195 * 196 196 * @fires wp.media.model.Attachments#reset 197 197 * 198 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 198 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 199 199 */ 200 200 validateAll: function( attachments, options ) { 201 201 options = options || {}; … … 229 229 * Stop replicating collection change events from another attachments collection. 230 230 * 231 231 * @param {wp.media.model.Attachments} The attachments collection to stop observing. 232 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 232 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 233 233 */ 234 234 unobserve: function( attachments ) { 235 235 if ( attachments ) { … … 252 252 * @param {wp.media.model.Attachments} attachments 253 253 * @param {Object} options 254 254 * 255 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 255 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 256 256 */ 257 257 _validateHandler: function( attachment, attachments, options ) { 258 258 // If we're not mirroring this `attachments` collection, … … 268 268 * 269 269 * @param {wp.media.model.Attachments} attachments 270 270 * @param {Object} options 271 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 271 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 272 272 */ 273 273 _validateAllHandler: function( attachments, options ) { 274 274 return this.validateAll( attachments, options ); … … 278 278 * in the collection. 279 279 * 280 280 * @param {wp.media.model.Attachments} The attachments collection to mirror. 281 * @returns {wp.media.model.Attachments} Returns itself to allow chaining 281 * @returns {wp.media.model.Attachments} Returns itself to allow chaining. 282 282 */ 283 283 mirror: function( attachments ) { 284 284 if ( this.mirroring && this.mirroring === attachments ) { -
js/media/views/attachment-compat.js
28 28 this.listenTo( this.model, 'change:compat', this.render ); 29 29 }, 30 30 /** 31 * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining 31 * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining. 32 32 */ 33 33 dispose: function() { 34 34 if ( this.$(':focus').length ) { … … 40 40 return View.prototype.dispose.apply( this, arguments ); 41 41 }, 42 42 /** 43 * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining 43 * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining. 44 44 */ 45 45 render: function() { 46 46 var compat = this.model.get('compat'); -
js/media/views/attachment.js
69 69 this.listenTo( this.controller.states, 'attachment:compat:waiting attachment:compat:ready', this.updateSave ); 70 70 }, 71 71 /** 72 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 72 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 73 73 */ 74 74 dispose: function() { 75 75 var selection = this.options.selection; … … 87 87 return this; 88 88 }, 89 89 /** 90 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 90 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 91 91 */ 92 92 render: function() { 93 93 var options = _.defaults( this.model.toJSON(), { … … 434 434 }, 435 435 /** 436 436 * @param {string} status 437 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 437 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 438 438 */ 439 439 updateSave: function( status ) { 440 440 var save = this._save = this._save || { status: 'ready' }; … … 529 529 * 530 530 * @param {Backbone.Model} model 531 531 * @param {string} value 532 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 532 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 533 533 */ 534 534 /** 535 535 * @function _syncTitle … … 538 538 * 539 539 * @param {Backbone.Model} model 540 540 * @param {string} value 541 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 541 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 542 542 */ 543 543 /** 544 544 * @function _syncArtist … … 547 547 * 548 548 * @param {Backbone.Model} model 549 549 * @param {string} value 550 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 550 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 551 551 */ 552 552 /** 553 553 * @function _syncAlbum … … 556 556 * 557 557 * @param {Backbone.Model} model 558 558 * @param {string} value 559 * @returns {wp.media.view.Attachment} Returns itself to allow chaining 559 * @returns {wp.media.view.Attachment} Returns itself to allow chaining. 560 560 */ 561 561 Attachment.prototype[ method ] = function( model, value ) { 562 562 var $setting = this.$('[data-setting="' + setting + '"]'); -
js/media/views/button.js
47 47 this.listenTo( this.model, 'change', this.render ); 48 48 }, 49 49 /** 50 * @returns {wp.media.view.Button} Returns itself to allow chaining 50 * @returns {wp.media.view.Button} Returns itself to allow chaining. 51 51 */ 52 52 render: function() { 53 53 var classes = [ 'button', this.className ], -
js/media/views/frame.js
80 80 /** 81 81 * Reset all states on the frame to their defaults. 82 82 * 83 * @returns {wp.media.view.Frame} Returns itself to allow chaining 83 * @returns {wp.media.view.Frame} Returns itself to allow chaining. 84 84 */ 85 85 reset: function() { 86 86 this.states.invoke( 'trigger', 'reset' ); -
js/media/views/iframe.js
11 11 var Iframe = wp.media.View.extend(/** @lends wp.media.view.Iframe.prototype */{ 12 12 className: 'media-iframe', 13 13 /** 14 * @returns {wp.media.view.Iframe} Returns itself to allow chaining 14 * @returns {wp.media.view.Iframe} Returns itself to allow chaining. 15 15 */ 16 16 render: function() { 17 17 this.views.detach(); -
js/media/views/media-frame.js
143 143 }, 144 144 145 145 /** 146 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 146 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 147 147 */ 148 148 render: function() { 149 149 // Activate the default state if no active state exists. … … 316 316 * @memberOf wp.media.view.MediaFrame 317 317 * @instance 318 318 * 319 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 319 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 320 320 */ 321 321 /** 322 322 * @function close … … 323 323 * @memberOf wp.media.view.MediaFrame 324 324 * @instance 325 325 * 326 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 326 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 327 327 */ 328 328 /** 329 329 * @function attach … … 330 330 * @memberOf wp.media.view.MediaFrame 331 331 * @instance 332 332 * 333 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 333 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 334 334 */ 335 335 /** 336 336 * @function detach … … 337 337 * @memberOf wp.media.view.MediaFrame 338 338 * @instance 339 339 * 340 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 340 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 341 341 */ 342 342 /** 343 343 * @function escape … … 344 344 * @memberOf wp.media.view.MediaFrame 345 345 * @instance 346 346 * 347 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining 347 * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining. 348 348 */ 349 349 MediaFrame.prototype[ method ] = function() { 350 350 if ( this.modal ) { -
js/media/views/modal.js
47 47 }, 48 48 49 49 /** 50 * @returns {wp.media.view.Modal} Returns itself to allow chaining 50 * @returns {wp.media.view.Modal} Returns itself to allow chaining. 51 51 */ 52 52 attach: function() { 53 53 if ( this.views.attached ) { … … 68 68 }, 69 69 70 70 /** 71 * @returns {wp.media.view.Modal} Returns itself to allow chaining 71 * @returns {wp.media.view.Modal} Returns itself to allow chaining. 72 72 */ 73 73 detach: function() { 74 74 if ( this.$el.is(':visible') ) { … … 81 81 }, 82 82 83 83 /** 84 * @returns {wp.media.view.Modal} Returns itself to allow chaining 84 * @returns {wp.media.view.Modal} Returns itself to allow chaining. 85 85 */ 86 86 open: function() { 87 87 var $el = this.$el, -
js/media/views/priority-list.js
25 25 * @param {string} id 26 26 * @param {wp.media.View|Object} view 27 27 * @param {Object} options 28 * @returns {wp.media.view.PriorityList} Returns itself to allow chaining 28 * @returns {wp.media.view.PriorityList} Returns itself to allow chaining. 29 29 */ 30 30 set: function( id, view, options ) { 31 31 var priority, views, index; -
js/media/views/search.js
24 24 }, 25 25 26 26 /** 27 * @returns {wp.media.view.Search} Returns itself to allow chaining 27 * @returns {wp.media.view.Search} Returns itself to allow chaining. 28 28 */ 29 29 render: function() { 30 30 this.el.value = this.model.escape('search'); -
js/media/views/settings.js
31 31 }, this.options ); 32 32 }, 33 33 /** 34 * @returns {wp.media.view.Settings} Returns itself to allow chaining 34 * @returns {wp.media.view.Settings} Returns itself to allow chaining. 35 35 */ 36 36 render: function() { 37 37 View.prototype.render.apply( this, arguments ); -
js/media/views/settings/attachment-display.js
42 42 Settings.prototype.dispose.apply( this, arguments ); 43 43 }, 44 44 /** 45 * @returns {wp.media.view.AttachmentDisplay} Returns itself to allow chaining 45 * @returns {wp.media.view.AttachmentDisplay} Returns itself to allow chaining. 46 46 */ 47 47 render: function() { 48 48 var attachment = this.options.attachment; -
js/media/views/toolbar.js
74 74 * @param {string} id 75 75 * @param {Backbone.View|Object} view 76 76 * @param {Object} [options={}] 77 * @returns {wp.media.view.Toolbar} Returns itself to allow chaining 77 * @returns {wp.media.view.Toolbar} Returns itself to allow chaining. 78 78 */ 79 79 set: function( id, view, options ) { 80 80 var list; … … 116 116 /** 117 117 * @param {string} id 118 118 * @param {Object} options 119 * @returns {wp.media.view.Toolbar} Returns itself to allow chaining 119 * @returns {wp.media.view.Toolbar} Returns itself to allow chaining. 120 120 */ 121 121 unset: function( id, options ) { 122 122 delete this._views[ id ]; -
js/media/views/uploader/inline.js
60 60 return data; 61 61 }, 62 62 /** 63 * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining 63 * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining. 64 64 */ 65 65 dispose: function() { 66 66 if ( this.disposing ) { … … 77 77 return this.remove(); 78 78 }, 79 79 /** 80 * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining 80 * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining. 81 81 */ 82 82 remove: function() { 83 83 /** -
js/media/views/view.js
28 28 * before Backbone 0.9.8 came out. Figure out if Backbone core takes 29 29 * care of this in Backbone.View now. 30 30 * 31 * @returns {wp.media.View} Returns itself to allow chaining 31 * @returns {wp.media.View} Returns itself to allow chaining. 32 32 */ 33 33 dispose: function() { 34 34 // Undelegating events, removing events from the model, and … … 52 52 return this; 53 53 }, 54 54 /** 55 * @returns {wp.media.View} Returns itself to allow chaining 55 * @returns {wp.media.View} Returns itself to allow chaining. 56 56 */ 57 57 remove: function() { 58 58 this.dispose();