Make WordPress Core

Ticket #41548: comment-reply.diff

File comment-reply.diff, 1.9 KB (added by andizer, 8 years ago)
  • src/wp-includes/js/comment-reply.js

    diff --git src/wp-includes/js/comment-reply.js src/wp-includes/js/comment-reply.js
    index 184726d..3ddf774 100644
     
     1/**
     2 * @summary Handles the addition of the comment form.
     3 *
     4 * @since 2.7.0
     5 *
     6 * @type {Object}
     7 */
    18var addComment = {
     9        /**
     10         * @summary Retrieves the elements corresponding to the given IDs.
     11         *
     12         * @since 2.7.0
     13         *
     14         * @param {string} commId The comment ID.
     15         * @param {string} parentId The parent ID.
     16         * @param {string} respondId The respond ID.
     17         * @param {string} postId The post ID.
     18         * @returns {boolean} Always returns false.
     19         */
    220        moveForm: function( commId, parentId, respondId, postId ) {
    321                var div, element, style, cssHidden,
    422                        t           = this,
    var addComment = { 
    3048                parent.value = parentId;
    3149                cancel.style.display = '';
    3250
     51                /**
     52                 * @summary Puts back the comment, hides the cancel button and removes the onclick event.
     53                 *
     54                 * @returns {boolean} Always returns false.
     55                 */
    3356                cancel.onclick = function() {
    3457                        var t       = addComment,
    3558                                temp    = t.I( 'wp-temp-form-div' ),
    var addComment = { 
    4871                };
    4972
    5073                /*
    51                  * Set initial focus to the first form focusable element.
    52                  * Try/catch used just to avoid errors in IE 7- which return visibility
     74                 * Sets initial focus to the first form focusable element.
     75                 * Uses try/catch just to avoid errors in IE 7- which return visibility
    5376                 * 'inherit' when the visibility value is inherited from an ancestor.
    5477                 */
    5578                try {
    var addComment = { 
    90113                return false;
    91114        },
    92115
     116        /**
     117         * @summary Returns the object corresponding to the given ID.
     118         *
     119         * @since 2.7.0
     120         *
     121         * @param {string} id The ID.
     122         * @returns {Element} The element belonging to the ID.
     123         */
    93124        I: function( id ) {
    94125                return document.getElementById( id );
    95126        }