Projet

Général

Profil

Paste
Télécharger (1,03 ko) Statistiques
| Branche: | Révision:

root / drupal7 / modules / comment / comment-node-form.js @ 4da4932d

1 85ad3d82 Assos Assos
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);