Projet

Général

Profil

Paste
Télécharger (794 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / webform / js / node-type-form.js @ ebcc4118

1
/**
2
 * @file
3
 * Enhancements for webform node type forms.
4
 */
5

    
6
(function ($) {
7

    
8
  "use strict";
9

    
10
  Drupal.behaviors.webformContentTypes = {
11
    attach: function (context) {
12
      // Provide the vertical tab summaries.
13
      $('fieldset#edit-webform', context).drupalSetSummary(function (context) {
14
        var vals = [];
15
        $('input[type=checkbox]', context).each(function () {
16
          if (this.checked && this.attributes['data-enabled-description']) {
17
            vals.push(this.attributes['data-enabled-description'].value);
18
          }
19
          else if (!this.checked && this.attributes['data-disabled-description']) {
20
            vals.push(this.attributes['data-disabled-description'].value);
21
          }
22
        });
23
        return vals.join(', ');
24
      });
25
    }
26
  };
27
})(jQuery);