diff options
Diffstat (limited to 'src/js/media/models')
-rw-r--r-- | src/js/media/models/attachment.js | 12 | ||||
-rw-r--r-- | src/js/media/models/attachments.js | 38 | ||||
-rw-r--r-- | src/js/media/models/query.js | 10 | ||||
-rw-r--r-- | src/js/media/models/selection.js | 4 |
4 files changed, 32 insertions, 32 deletions
diff --git a/src/js/media/models/attachment.js b/src/js/media/models/attachment.js index 38f55187ad..cd29d2f98e 100644 --- a/src/js/media/models/attachment.js +++ b/src/js/media/models/attachment.js @@ -18,7 +18,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp * @param {wp.media.model.Attachment} model * @param {Object} [options={}] * - * @returns {Promise} + * @return {Promise} */ sync: function( method, model, options ) { // If the attachment does not yet have an `id`, return an instantly @@ -100,8 +100,8 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp * Convert date strings into Date objects. * * @param {Object} resp The raw response object, typically returned by fetch() - * @returns {Object} The modified response object, which is the attributes hash - * to be set on the model. + * @return {Object} The modified response object, which is the attributes hash + * to be set on the model. */ parse: function( resp ) { if ( ! resp ) { @@ -118,7 +118,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp * * @this Backbone.Model * - * @returns {Promise} + * @return {Promise} */ saveCompat: function( data, options ) { var model = this; @@ -143,7 +143,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp * @static * * @param {Object} attrs - * @returns {wp.media.model.Attachment} + * @return {wp.media.model.Attachment} */ create: function( attrs ) { var Attachments = wp.media.model.Attachments; @@ -158,7 +158,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp * @static * @param {string} id A string used to identify a model. * @param {Backbone.Model|undefined} attachment - * @returns {wp.media.model.Attachment} + * @return {wp.media.model.Attachment} */ get: _.memoize( function( id, attachment ) { var Attachments = wp.media.model.Attachments; diff --git a/src/js/media/models/attachments.js b/src/js/media/models/attachments.js index d0234e52f1..ed46588189 100644 --- a/src/js/media/models/attachments.js +++ b/src/js/media/models/attachments.js @@ -148,7 +148,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * Checks whether an attachment is valid. * * @param {wp.media.model.Attachment} attachment - * @returns {Boolean} + * @return {Boolean} */ validator: function( attachment ) { @@ -172,7 +172,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @param {wp.media.model.Attachment} attachment * @param {Object} options - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ validate: function( attachment, options ) { var valid = this.validator( attachment ), @@ -195,7 +195,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @fires wp.media.model.Attachments#reset * - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ validateAll: function( attachments, options ) { options = options || {}; @@ -214,7 +214,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * and replicate them on this collection. * * @param {wp.media.model.Attachments} The attachments collection to observe. - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ observe: function( attachments ) { this.observers = this.observers || []; @@ -229,7 +229,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * Stop replicating collection change events from another attachments collection. * * @param {wp.media.model.Attachments} The attachments collection to stop observing. - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ unobserve: function( attachments ) { if ( attachments ) { @@ -252,7 +252,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * @param {wp.media.model.Attachments} attachments * @param {Object} options * - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ _validateHandler: function( attachment, attachments, options ) { // If we're not mirroring this `attachments` collection, @@ -268,7 +268,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @param {wp.media.model.Attachments} attachments * @param {Object} options - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ _validateAllHandler: function( attachments, options ) { return this.validateAll( attachments, options ); @@ -278,7 +278,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * in the collection. * * @param {wp.media.model.Attachments} The attachments collection to mirror. - * @returns {wp.media.model.Attachments} Returns itself to allow chaining. + * @return {wp.media.model.Attachments} Returns itself to allow chaining. */ mirror: function( attachments ) { if ( this.mirroring && this.mirroring === attachments ) { @@ -316,7 +316,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * server persistence by itself. * * @param {object} options - * @returns {Promise} + * @return {Promise} */ more: function( options ) { var deferred = jQuery.Deferred(), @@ -349,7 +349,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * and forwards to its `hasMore` method. This collection class doesn't have * server persistence by itself. * - * @returns {boolean} + * @return {boolean} */ hasMore: function() { return this.mirroring ? this.mirroring.hasMore() : false; @@ -361,7 +361,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @param {Object|Array} resp The raw response Object/Array. * @param {Object} xhr - * @returns {Array} The array of model attributes to be added to the collection + * @return {Array} The array of model attributes to be added to the collection */ parse: function( resp, xhr ) { if ( ! _.isArray( resp ) ) { @@ -405,7 +405,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * If this collection is sorted by `menuOrder`, recalculates and saves * the menu order to the database. * - * @returns {undefined|Promise} + * @return {undefined|Promise} */ saveMenuOrder: function() { if ( 'menuOrder' !== this.props.get('orderby') ) { @@ -444,9 +444,9 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * @param {Backbone.Model} a * @param {Backbone.Model} b * @param {Object} options - * @returns {Number} -1 if the first model should come before the second, - * 0 if they are of the same rank and - * 1 if the first model should come after. + * @return {Number} -1 if the first model should come before the second, + * 0 if they are of the same rank and + * 1 if the first model should come after. */ comparator: function( a, b, options ) { var key = this.props.get('orderby'), @@ -480,7 +480,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @this wp.media.model.Attachments * - * @returns {Boolean} + * @return {Boolean} */ search: function( attachment ) { if ( ! this.props.get('search') ) { @@ -498,7 +498,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @this wp.media.model.Attachments * - * @returns {Boolean} + * @return {Boolean} */ type: function( attachment ) { var type = this.props.get('type'), atts = attachment.toJSON(), mime, found; @@ -525,7 +525,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @this wp.media.model.Attachments * - * @returns {Boolean} + * @return {Boolean} */ uploadedTo: function( attachment ) { var uploadedTo = this.props.get('uploadedTo'); @@ -541,7 +541,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen * * @this wp.media.model.Attachments * - * @returns {Boolean} + * @return {Boolean} */ status: function( attachment ) { var status = this.props.get('status'); diff --git a/src/js/media/models/query.js b/src/js/media/models/query.js index 560e54944d..90e36e6cc7 100644 --- a/src/js/media/models/query.js +++ b/src/js/media/models/query.js @@ -80,7 +80,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ * Whether there are more attachments that haven't been sync'd from the server * that match the collection's query. * - * @returns {boolean} + * @return {boolean} */ hasMore: function() { return this._hasMore; @@ -89,7 +89,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ * Fetch more attachments from the server for the collection. * * @param {object} [options={}] - * @returns {Promise} + * @return {Promise} */ more: function( options ) { var query = this; @@ -119,7 +119,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ * @param {String} method * @param {Backbone.Model} model * @param {Object} [options={}] - * @returns {Promise} + * @return {Promise} */ sync: function( method, model, options ) { var args, fallback; @@ -221,7 +221,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ * @param {Object} [props.author] * @param {Object} [options] * - * @returns {wp.media.model.Query} A new Attachments Query collection. + * @return {wp.media.model.Query} A new Attachments Query collection. */ get: (function(){ /** @@ -231,7 +231,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ var queries = []; /** - * @returns {Query} + * @return {Query} */ return function( props, options ) { var args = {}, diff --git a/src/js/media/models/selection.js b/src/js/media/models/selection.js index 894545f0fb..a2fc899c8b 100644 --- a/src/js/media/models/selection.js +++ b/src/js/media/models/selection.js @@ -37,7 +37,7 @@ Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{ * * @param {Array} models * @param {Object} options - * @returns {wp.media.model.Attachment[]} + * @return {wp.media.model.Attachment[]} */ add: function( models, options ) { if ( ! this.multiple ) { @@ -57,7 +57,7 @@ Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{ * @fires wp.media.model.Selection#selection:single * @fires wp.media.model.Selection#selection:unsingle * - * @returns {Backbone.Model} + * @return {Backbone.Model} */ single: function( model ) { var previous = this._single; |