diff -r 07239de796bb -r e756a8c72c3d cms/drupal/modules/comment/comment-node-form.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/modules/comment/comment-node-form.js Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,32 @@ + +(function ($) { + +Drupal.behaviors.commentFieldsetSummaries = { + attach: function (context) { + $('fieldset.comment-node-settings-form', context).drupalSetSummary(function (context) { + return Drupal.checkPlain($('.form-item-comment input:checked', context).next('label').text()); + }); + + // Provide the summary for the node type form. + $('fieldset.comment-node-type-settings-form', context).drupalSetSummary(function(context) { + var vals = []; + + // Default comment setting. + vals.push($(".form-item-comment select option:selected", context).text()); + + // Threading. + var threading = $(".form-item-comment-default-mode input:checked", context).next('label').text(); + if (threading) { + vals.push(threading); + } + + // Comments per page. + var number = $(".form-item-comment-default-per-page select option:selected", context).val(); + vals.push(Drupal.t('@number comments per page', {'@number': number})); + + return Drupal.checkPlain(vals.join(', ')); + }); + } +}; + +})(jQuery);