equal
deleted
inserted
replaced
|
1 |
|
2 (function ($) { |
|
3 |
|
4 Drupal.behaviors.commentFieldsetSummaries = { |
|
5 attach: function (context) { |
|
6 $('fieldset.comment-node-settings-form', context).drupalSetSummary(function (context) { |
|
7 return Drupal.checkPlain($('.form-item-comment input:checked', context).next('label').text()); |
|
8 }); |
|
9 |
|
10 // Provide the summary for the node type form. |
|
11 $('fieldset.comment-node-type-settings-form', context).drupalSetSummary(function(context) { |
|
12 var vals = []; |
|
13 |
|
14 // Default comment setting. |
|
15 vals.push($(".form-item-comment select option:selected", context).text()); |
|
16 |
|
17 // Threading. |
|
18 var threading = $(".form-item-comment-default-mode input:checked", context).next('label').text(); |
|
19 if (threading) { |
|
20 vals.push(threading); |
|
21 } |
|
22 |
|
23 // Comments per page. |
|
24 var number = $(".form-item-comment-default-per-page select option:selected", context).val(); |
|
25 vals.push(Drupal.t('@number comments per page', {'@number': number})); |
|
26 |
|
27 return Drupal.checkPlain(vals.join(', ')); |
|
28 }); |
|
29 } |
|
30 }; |
|
31 |
|
32 })(jQuery); |