Further modules included.
[yaffs-website] / web / modules / contrib / linkchecker / js / linkchecker.content_types.js
1 /**
2  * @file
3  * Javascript for the node content type editing form.
4  */
5
6 (function ($, Drupal) {
7
8   'use strict';
9
10   /**
11    * Behaviors for setting summaries on content type form.
12    *
13    * @type {Drupal~behavior}
14    *
15    * @prop {Drupal~behaviorAttach} attach
16    *   Attaches summary behaviors on content type edit forms.
17    */  
18   Drupal.behaviors.linkcheckerContentTypes = {
19     attach: function (context) {
20       var $context = $(context);
21       // Provide the vertical tab summaries.
22       $context.find('#edit-linkchecker').drupalSetSummary(function (context) {
23         var vals = [];
24         var $editContext = $(context);
25         $editContext.find('input:checked').next('label').each(function () {
26           vals.push(Drupal.checkPlain($(this).text()));
27         });
28         if (!vals.length) {
29           return Drupal.t('Disabled');
30         }
31         return vals.join(', ');
32       });
33     }
34   };
35
36 })(jQuery, Drupal);