Mercurial > hg > isophonics-drupal-site
annotate core/modules/comment/comment-entity-form.es6.js @ 19:fa3358dc1485 tip
Add ndrum files
| author | Chris Cannam |
|---|---|
| date | Wed, 28 Aug 2019 13:14:47 +0100 |
| parents | 129ea1e6d783 |
| children |
| rev | line source |
|---|---|
| Chris@0 | 1 /** |
| Chris@0 | 2 * @file |
| Chris@0 | 3 * Attaches comment behaviors to the entity form. |
| Chris@0 | 4 */ |
| Chris@0 | 5 |
| Chris@17 | 6 (function($, Drupal) { |
| Chris@0 | 7 /** |
| Chris@0 | 8 * |
| Chris@0 | 9 * @type {Drupal~behavior} |
| Chris@0 | 10 */ |
| Chris@0 | 11 Drupal.behaviors.commentFieldsetSummaries = { |
| Chris@0 | 12 attach(context) { |
| Chris@0 | 13 const $context = $(context); |
| Chris@17 | 14 $context |
| Chris@17 | 15 .find('fieldset.comment-entity-settings-form') |
| Chris@17 | 16 .drupalSetSummary(context => |
| Chris@17 | 17 Drupal.checkPlain( |
| Chris@17 | 18 $(context) |
| Chris@17 | 19 .find('.js-form-item-comment input:checked') |
| Chris@17 | 20 .next('label') |
| Chris@17 | 21 .text(), |
| Chris@17 | 22 ), |
| Chris@17 | 23 ); |
| Chris@0 | 24 }, |
| Chris@0 | 25 }; |
| Chris@17 | 26 })(jQuery, Drupal); |
