diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index 77ab168bca6..068555d53d0 100644 --- a/core/modules/node/content_types.js +++ b/core/modules/node/content_types.js @@ -8,8 +8,12 @@ "use strict"; /** + * Behaviors for setting summaries on content type form. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches summary behaviors on content type edit forms. */ Drupal.behaviors.contentTypes = { attach: function (context) { diff --git a/core/modules/node/node.js b/core/modules/node/node.js index ebb22ff2456..5dcdc05c29c 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -8,8 +8,12 @@ "use strict"; /** + * Behaviors for tabs in the node edit form. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches summary behavior for tabs in the node edit form. */ Drupal.behaviors.nodeDetailsSummaries = { attach: function (context) { @@ -18,10 +22,11 @@ var $revisionContext = $(context); var revisionCheckbox = $revisionContext.find('.form-item-revision input'); - // Return 'New revision' if the 'Create new revision' checkbox is checked, - // or if the checkbox doesn't exist, but the revision log does. For users - // without the "Administer content" permission the checkbox won't appear, - // but the revision log will if the content type is set to auto-revision. + // Return 'New revision' if the 'Create new revision' checkbox is + // checked, or if the checkbox doesn't exist, but the revision log does. + // For users without the "Administer content" permission the checkbox + // won't appear, but the revision log will if the content type is set to + // auto-revision. if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $revisionContext.find('.form-item-revision-log textarea').length)) { return Drupal.t('New revision'); } diff --git a/core/modules/node/node.preview.js b/core/modules/node/node.preview.js index d69cf3b2014..ec4883279b0 100644 --- a/core/modules/node/node.preview.js +++ b/core/modules/node/node.preview.js @@ -8,10 +8,17 @@ "use strict"; /** - * Disabling all links (except local fragment identifiers such as href="#frag") - * in node previews to prevent users from leaving the page. + * Disables all non-relevant links in node previews. + * + * Destroys links (except local fragment identifiers such as href="#frag") in + * node previews to prevent users from leaving the page. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches confirmation prompt for clicking links in node preview mode. + * @prop {Drupal~behaviorDetach} detach + * Detaches confirmation prompt for clicking links in node preview mode. */ Drupal.behaviors.nodePreviewDestroyLinks = { attach: function (context) { @@ -61,6 +68,9 @@ * Switch view mode. * * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches automatic submit on `formUpdated.preview` events. */ Drupal.behaviors.nodePreviewSwitchViewMode = { attach: function (context) { @@ -74,8 +84,10 @@ }; /** + * Theme function for node preview modal. * * @return {string} + * Markup for the node preview modal. */ Drupal.theme.nodePreviewModal = function () { return '

' +