PATH:
home
/
letacommog
/
supportleta
/
wp-includes
/
js
/** * @summary Handles the addition of the comment form. * * @since 2.7.0 * * @type {Object} */ var addComment = { /** * @summary Retrieves the elements corresponding to the given IDs. * * @since 2.7.0 * * @param {string} commId The comment ID. * @param {string} parentId The parent ID. * @param {string} respondId The respond ID. * @param {string} postId The post ID. * @returns {boolean} Always returns false. */ moveForm: function( commId, parentId, respondId, postId ) { var div, element, style, cssHidden, t = this, comm = t.I( commId ), respond = t.I( respondId ), cancel = t.I( 'cancel-comment-reply-link' ), parent = t.I( 'comment_parent' ), post = t.I( 'comment_post_ID' ), commentForm = respond.getElementsByTagName( 'form' )[0]; if ( ! comm || ! respond || ! cancel || ! parent || ! commentForm ) { return; } t.respondId = respondId; postId = postId || false; if ( ! t.I( 'wp-temp-form-div' ) ) { div = document.createElement( 'div' ); div.id = 'wp-temp-form-div'; div.style.display = 'none'; respond.parentNode.insertBefore( div, respond ); } comm.parentNode.insertBefore( respond, comm.nextSibling ); if ( post && postId ) { post.value = postId; } parent.value = parentId; cancel.style.display = ''; /** * @summary Puts back the comment, hides the cancel button and removes the onclick event. * * @returns {boolean} Always returns false. */ cancel.onclick = function() { var t = addComment, temp = t.I( 'wp-temp-form-div' ), respond = t.I( t.respondId ); if ( ! temp || ! respond ) { return; } t.I( 'comment_parent' ).value = '0'; temp.parentNode.insertBefore( respond, temp ); temp.parentNode.removeChild( temp ); this.style.display = 'none'; this.onclick = null; return false; }; /* * Sets initial focus to the first form focusable element. * Uses try/catch just to avoid errors in IE 7- which return visibility * 'inherit' when the visibility value is inherited from an ancestor. */ try { for ( var i = 0; i < commentForm.elements.length; i++ ) { element = commentForm.elements[i]; cssHidden = false; // Modern browsers. if ( 'getComputedStyle' in window ) { style = window.getComputedStyle( element ); // IE 8. } else if ( document.documentElement.currentStyle ) { style = element.currentStyle; } /* * For display none, do the same thing jQuery does. For visibility, * check the element computed style since browsers are already doing * the job for us. In fact, the visibility computed style is the actual * computed value and already takes into account the element ancestors. */ if ( ( element.offsetWidth <= 0 && element.offsetHeight <= 0 ) || style.visibility === 'hidden' ) { cssHidden = true; } // Skip form elements that are hidden or disabled. if ( 'hidden' === element.type || element.disabled || cssHidden ) { continue; } element.focus(); // Stop after the first focusable element. break; } } catch( er ) {} return false; }, /** * @summary Returns the object corresponding to the given ID. * * @since 2.7.0 * * @param {string} id The ID. * @returns {Element} The element belonging to the ID. */ I: function( id ) { return document.getElementById( id ); } };
[+]
..
[-] admin-bar.js
[edit]
[-] api-request.js
[edit]
[-] wp-list-revisions.js
[edit]
[+]
codemirror
[+]
crop
[-] wp-embed-template.min.js
[edit]
[-] wp-ajax-response.js
[edit]
[-] autosave.js
[edit]
[-] wp-util.js
[edit]
[-] backbone.min.js
[edit]
[-] customize-views.js
[edit]
[-] tw-sack.js
[edit]
[-] comment-reply.js
[edit]
[-] customize-preview-nav-menus.js
[edit]
[-] customize-base.min.js
[edit]
[-] customize-preview-widgets.min.js
[edit]
[-] wpdialog.min.js
[edit]
[-] wp-embed.min.js
[edit]
[+]
thickbox
[-] wp-lists.min.js
[edit]
[-] wp-emoji.min.js
[edit]
[-] colorpicker.js
[edit]
[-] customize-preview-widgets.js
[edit]
[-] hoverIntent.min.js
[edit]
[-] media-views.js
[edit]
[-] media-editor.min.js
[edit]
[-] customize-views.min.js
[edit]
[-] wp-pointer.min.js
[edit]
[-] wp-ajax-response.min.js
[edit]
[-] wp-emoji-release.min.js
[edit]
[-] wpdialog.js
[edit]
[-] wp-util.min.js
[edit]
[-] media-editor.js
[edit]
[-] zxcvbn-async.js
[edit]
[-] customize-models.min.js
[edit]
[-] masonry.min.js
[edit]
[-] utils.js
[edit]
[-] autosave.min.js
[edit]
[-] customize-loader.min.js
[edit]
[-] wp-emoji-loader.min.js
[edit]
[-] customize-models.js
[edit]
[-] customize-preview-nav-menus.min.js
[edit]
[-] zxcvbn-async.min.js
[edit]
[-] heartbeat.js
[edit]
[-] wp-custom-header.min.js
[edit]
[-] wp-sanitize.min.js
[edit]
[-] media-audiovideo.js
[edit]
[-] wp-auth-check.js
[edit]
[-] customize-preview.min.js
[edit]
[+]
mediaelement
[-] tw-sack.min.js
[edit]
[-] wp-a11y.js
[edit]
[-] heartbeat.min.js
[edit]
[-] wp-emoji-loader.js
[edit]
[-] wp-emoji.js
[edit]
[+]
jquery
[-] media-views.min.js
[edit]
[-] media-grid.min.js
[edit]
[-] customize-selective-refresh.min.js
[edit]
[-] wp-sanitize.js
[edit]
[-] media-audiovideo.min.js
[edit]
[-] utils.min.js
[edit]
[-] twemoji.min.js
[edit]
[-] underscore.min.js
[edit]
[-] twemoji.js
[edit]
[-] media-models.min.js
[edit]
[-] swfobject.js
[edit]
[-] comment-reply.min.js
[edit]
[-] admin-bar.min.js
[edit]
[-] wp-backbone.min.js
[edit]
[-] wp-backbone.js
[edit]
[-] colorpicker.min.js
[edit]
[-] wplink.js
[edit]
[-] mce-view.js
[edit]
[+]
swfupload
[-] shortcode.min.js
[edit]
[-] wp-a11y.min.js
[edit]
[-] hoverIntent.js
[edit]
[-] shortcode.js
[edit]
[-] json2.min.js
[edit]
[+]
jcrop
[+]
plupload
[-] wp-list-revisions.min.js
[edit]
[-] wp-custom-header.js
[edit]
[-] media-models.js
[edit]
[-] customize-selective-refresh.js
[edit]
[+]
tinymce
[-] customize-preview.js
[edit]
[-] mce-view.min.js
[edit]
[-] wp-auth-check.min.js
[edit]
[-] api-request.min.js
[edit]
[-] wp-embed-template.js
[edit]
[-] imagesloaded.min.js
[edit]
[-] quicktags.min.js
[edit]
[-] desktop.ini
[edit]
[-] media-grid.js
[edit]
[-] zxcvbn.min.js
[edit]
[-] customize-loader.js
[edit]
[-] wp-api.min.js
[edit]
[-] wp-lists.js
[edit]
[-] wp-api.js
[edit]
[+]
imgareaselect
[-] wp-pointer.js
[edit]
[-] customize-base.js
[edit]
[-] json2.js
[edit]
[-] wp-embed.js
[edit]
[-] quicktags.js
[edit]
[-] wplink.min.js
[edit]