Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / media / js / type_form.es6.js
index 4c664a3ded98960fa42a00e082c29eb624f24a08..5c3cc90cb6856faee07426991aa29ea8eb45fbbb 100644 (file)
@@ -3,7 +3,7 @@
  * Defines JavaScript behaviors for the media type form.
  */
 
-(function ($, Drupal) {
+(function($, Drupal) {
   /**
    * Behaviors for setting summaries on media type form.
    *
     attach(context) {
       const $context = $(context);
       // Provide the vertical tab summaries.
-      $context.find('#edit-workflow').drupalSetSummary((context) => {
+      $context.find('#edit-workflow').drupalSetSummary(context => {
         const vals = [];
-        $(context).find('input[name^="options"]:checked').parent().each(function () {
-          vals.push(Drupal.checkPlain($(this).find('label').text()));
-        });
-        if (!$(context).find('#edit-options-status').is(':checked')) {
+        $(context)
+          .find('input[name^="options"]:checked')
+          .parent()
+          .each(function() {
+            vals.push(
+              Drupal.checkPlain(
+                $(this)
+                  .find('label')
+                  .text(),
+              ),
+            );
+          });
+        if (
+          !$(context)
+            .find('#edit-options-status')
+            .is(':checked')
+        ) {
           vals.unshift(Drupal.t('Not published'));
         }
         return vals.join(', ');
       });
-      $(context).find('#edit-language').drupalSetSummary((context) => {
-        const vals = [];
+      $(context)
+        .find('#edit-language')
+        .drupalSetSummary(context => {
+          const vals = [];
 
-        vals.push($(context).find('.js-form-item-language-configuration-langcode select option:selected').text());
+          vals.push(
+            $(context)
+              .find(
+                '.js-form-item-language-configuration-langcode select option:selected',
+              )
+              .text(),
+          );
 
-        $(context).find('input:checked').next('label').each(function () {
-          vals.push(Drupal.checkPlain($(this).text()));
-        });
+          $(context)
+            .find('input:checked')
+            .next('label')
+            .each(function() {
+              vals.push(Drupal.checkPlain($(this).text()));
+            });
 
-        return vals.join(', ');
-      });
+          return vals.join(', ');
+        });
     },
   };
-}(jQuery, Drupal));
+})(jQuery, Drupal);