Make WordPress Core

Changeset 45561


Ignore:
Timestamp:
06/22/2019 01:01:22 PM (5 years ago)
Author:
atimmer
Message:

Docs: Improve JSDoc for media/views/attachment/details.js.

Props maartenleenders, boblinthorst, dfangstrom.
Fixes #47588.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/attachment/details.js

    r45524 r45561  
    44    Details;
    55
    6 /**
    7  * wp.media.view.Attachment.Details
    8  *
    9  * @memberOf wp.media.view.Attachment
    10  *
    11  * @class
    12  * @augments wp.media.view.Attachment
    13  * @augments wp.media.View
    14  * @augments wp.Backbone.View
    15  * @augments Backbone.View
    16  */
    176Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{
    187    tagName:   'div',
     
    3827    },
    3928
     29    /**
     30     * Shows the details of an attachment.
     31     *
     32     * @since 3.5.0
     33     *
     34     * @constructs wp.media.view.Attachment.Details
     35     * @augments wp.media.view.Attachment
     36     *
     37     * @returns {void}
     38     */
    4039    initialize: function() {
    4140        this.options = _.defaults( this.options, {
     
    9998
    10099    /**
    101      * @param {Object} event
     100     * Deletes an attachment.
     101     *
     102     * Deletes an attachment after asking for confirmation. After deletion,
     103     * keeps focus in the modal.
     104     *
     105     * @since 3.5.0
     106     *
     107     * @param {MouseEvent} event A click event.
     108     *
     109     * @returns {void}
    102110     */
    103111    deleteAttachment: function( event ) {
     
    111119        }
    112120    },
    113     /**
    114      * @param {Object} event
     121
     122    /**
     123     * Sets the trash state on an attachment, or destroys the model itself.
     124     *
     125     * If the mediaTrash setting is set to true, trashes the attachment.
     126     * Otherwise, the model itself is destroyed.
     127     *
     128     * @since 3.9.0
     129     *
     130     * @param {MouseEvent} event A click event.
     131     *
     132     * @returns {void}
    115133     */
    116134    trashAttachment: function( event ) {
     
    142160    },
    143161    /**
    144      * @param {Object} event
     162     * Untrashes an attachment.
     163     *
     164     * @since 4.0.0
     165     *
     166     * @param {MouseEvent} event A click event.
     167     *
     168     * @returns {void}
    145169     */
    146170    untrashAttachment: function( event ) {
     
    153177        } );
    154178    },
    155     /**
    156      * @param {Object} event
     179
     180    /**
     181     * Opens the edit page for a specific attachment.
     182     *
     183     * @since 3.5.0
     184     *
     185     * @param {MouseEvent} event A click event.
     186     *
     187     * @returns {void}
    157188     */
    158189    editAttachment: function( event ) {
     
    167198        }
    168199    },
    169     /**
    170      * When reverse tabbing (shift+tab) out of the right details panel,
    171      * move focus to the item that was being edited in the attachments list.
    172      *
    173      * @param {Object} event
     200
     201    /**
     202     * Triggers an event on the controller when reverse tabbing (shift+tab).
     203     *
     204     * This event can be used to make sure to move the focus correctly.
     205     *
     206     * @since 4.0.0
     207     *
     208     * @fires wp.media.controller.MediaLibrary#attachment:details:shift-tab
     209     * @fires wp.media.controller.MediaLibrary#attachment:keydown:arrow
     210     *
     211     * @param {KeyboardEvent} event A keyboard event.
     212     *
     213     * @returns {boolean|void} Returns false or undefined.
    174214     */
    175215    toggleSelectionHandler: function( event ) {
Note: See TracChangeset for help on using the changeset viewer.