Projet

Général

Profil

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

root / drupal7 / sites / all / themes / bootstrap / js / modules / comment / _comment-node-form.js @ 87dbc3bf

1 87dbc3bf Benjamin Luce
2
(function ($) {
3
4
Drupal.behaviors.commentFieldsetSummaries = {
5
  attach: function (context) {
6
    $('.comment-node-settings-form', context).drupalSetSummary(function (context) {
7
      return Drupal.checkPlain($('.form-item-comment input:checked', context).closest('label').text());
8
    });
9
10
    // Provide the summary for the node type form.
11
    $('.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).closest('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);