diff options
author | Alex Pott <alex.a.pott@googlemail.com> | 2013-09-27 17:34:47 +0200 |
---|---|---|
committer | Alex Pott <alex.a.pott@googlemail.com> | 2013-09-27 17:34:47 +0200 |
commit | 37949fe37843eed62b09aba8f2612e832df2953e (patch) | |
tree | 960dbe703d25f2d501bd16b15e56fb5bf241d68f /core/modules/comment/comment-entity-form.js | |
parent | fb091cd6b5531bca2ef06c3b5972197c87bba704 (diff) | |
download | drupal-37949fe37843eed62b09aba8f2612e832df2953e.tar.gz drupal-37949fe37843eed62b09aba8f2612e832df2953e.zip |
Issue #731724 by larowlan, andypost, dixon_, tsvenson: Convert comment settings into a field to make them work with CMI and non-node entities.
Diffstat (limited to 'core/modules/comment/comment-entity-form.js')
-rw-r--r-- | core/modules/comment/comment-entity-form.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/modules/comment/comment-entity-form.js b/core/modules/comment/comment-entity-form.js new file mode 100644 index 00000000000..e068ef51d26 --- /dev/null +++ b/core/modules/comment/comment-entity-form.js @@ -0,0 +1,19 @@ +/** + * @file + * Attaches comment behaviors to the entity form. + */ + +(function ($) { + +"use strict"; + +Drupal.behaviors.commentFieldsetSummaries = { + attach: function (context) { + var $context = $(context); + $context.find('fieldset.comment-entity-settings-form').drupalSetSummary(function (context) { + return Drupal.checkPlain($(context).find('.form-item-comment input:checked').next('label').text()); + }); + } +}; + +})(jQuery); |