node-type-form.js 794 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @file
  3. * Enhancements for webform node type forms.
  4. */
  5. (function ($) {
  6. "use strict";
  7. Drupal.behaviors.webformContentTypes = {
  8. attach: function (context) {
  9. // Provide the vertical tab summaries.
  10. $('fieldset#edit-webform', context).drupalSetSummary(function (context) {
  11. var vals = [];
  12. $('input[type=checkbox]', context).each(function () {
  13. if (this.checked && this.attributes['data-enabled-description']) {
  14. vals.push(this.attributes['data-enabled-description'].value);
  15. }
  16. else if (!this.checked && this.attributes['data-disabled-description']) {
  17. vals.push(this.attributes['data-disabled-description'].value);
  18. }
  19. });
  20. return vals.join(', ');
  21. });
  22. }
  23. };
  24. })(jQuery);