Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / node / content_types.es6.js
index e7c01dd88a3299d0f5271deda108f094c89dcbe0..01f97bbaa2568f5ab0115b8601e281d930b44ffb 100644 (file)
@@ -3,7 +3,7 @@
  * Javascript for the node content editing form.
  */
 
-(function ($, Drupal) {
+(function($, Drupal) {
   /**
    * Behaviors for setting summaries on content type form.
    *
     attach(context) {
       const $context = $(context);
       // Provide the vertical tab summaries.
-      $context.find('#edit-submission').drupalSetSummary((context) => {
+      $context.find('#edit-submission').drupalSetSummary(context => {
         const vals = [];
-        vals.push(Drupal.checkPlain($(context).find('#edit-title-label').val()) || Drupal.t('Requires a title'));
+        vals.push(
+          Drupal.checkPlain(
+            $(context)
+              .find('#edit-title-label')
+              .val(),
+          ) || Drupal.t('Requires a title'),
+        );
         return vals.join(', ');
       });
-      $context.find('#edit-workflow').drupalSetSummary((context) => {
+      $context.find('#edit-workflow').drupalSetSummary(context => {
         const vals = [];
-        $(context).find('input[name^="options"]:checked').next('label').each(function () {
-          vals.push(Drupal.checkPlain($(this).text()));
-        });
-        if (!$(context).find('#edit-options-status').is(':checked')) {
+        $(context)
+          .find('input[name^="options"]:checked')
+          .next('label')
+          .each(function() {
+            vals.push(Drupal.checkPlain($(this).text()));
+          });
+        if (
+          !$(context)
+            .find('#edit-options-status')
+            .is(':checked')
+        ) {
           vals.unshift(Drupal.t('Not published'));
         }
         return vals.join(', ');
       });
-      $('#edit-language', context).drupalSetSummary((context) => {
+      $('#edit-language', context).drupalSetSummary(context => {
         const vals = [];
 
-        vals.push($('.js-form-item-language-configuration-langcode select option:selected', context).text());
+        vals.push(
+          $(
+            '.js-form-item-language-configuration-langcode select option:selected',
+            context,
+          ).text(),
+        );
 
-        $('input:checked', context).next('label').each(function () {
-          vals.push(Drupal.checkPlain($(this).text()));
-        });
+        $('input:checked', context)
+          .next('label')
+          .each(function() {
+            vals.push(Drupal.checkPlain($(this).text()));
+          });
 
         return vals.join(', ');
       });
-      $context.find('#edit-display').drupalSetSummary((context) => {
+      $context.find('#edit-display').drupalSetSummary(context => {
         const vals = [];
         const $editContext = $(context);
-        $editContext.find('input:checked').next('label').each(function () {
-          vals.push(Drupal.checkPlain($(this).text()));
-        });
+        $editContext
+          .find('input:checked')
+          .next('label')
+          .each(function() {
+            vals.push(Drupal.checkPlain($(this).text()));
+          });
         if (!$editContext.find('#edit-display-submitted').is(':checked')) {
           vals.unshift(Drupal.t("Don't display post information"));
         }
@@ -55,4 +78,4 @@
       });
     },
   };
-}(jQuery, Drupal));
+})(jQuery, Drupal);