Added Entity and Entity Reference Revisions which got dropped somewhere along the...
[yaffs-website] / web / core / modules / media / js / type_form.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function ($, Drupal) {
9   Drupal.behaviors.mediaTypeFormSummaries = {
10     attach: function attach(context) {
11       var $context = $(context);
12
13       $context.find('#edit-workflow').drupalSetSummary(function (context) {
14         var vals = [];
15         $(context).find('input[name^="options"]:checked').parent().each(function () {
16           vals.push(Drupal.checkPlain($(this).find('label').text()));
17         });
18         if (!$(context).find('#edit-options-status').is(':checked')) {
19           vals.unshift(Drupal.t('Not published'));
20         }
21         return vals.join(', ');
22       });
23       $(context).find('#edit-language').drupalSetSummary(function (context) {
24         var vals = [];
25
26         vals.push($(context).find('.js-form-item-language-configuration-langcode select option:selected').text());
27
28         $(context).find('input:checked').next('label').each(function () {
29           vals.push(Drupal.checkPlain($(this).text()));
30         });
31
32         return vals.join(', ');
33       });
34     }
35   };
36 })(jQuery, Drupal);