Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / ckeditor / js / ckeditor.drupalimage.admin.es6.js
index 89ab29fedaf716cae8990bfafa298505201a1d96..557379436d4d4b9fff6b13a54315b717038176ba 100644 (file)
@@ -3,7 +3,7 @@
  * CKEditor 'drupalimage' plugin admin behavior.
  */
 
-(function ($, Drupal, drupalSettings) {
+(function($, Drupal, drupalSettings) {
   /**
    * Provides the summary for the "drupalimage" plugin settings vertical tab.
    *
    */
   Drupal.behaviors.ckeditorDrupalImageSettingsSummary = {
     attach() {
-      $('[data-ckeditor-plugin-id="drupalimage"]').drupalSetSummary((context) => {
-        const root = 'input[name="editor[settings][plugins][drupalimage][image_upload]';
+      $('[data-ckeditor-plugin-id="drupalimage"]').drupalSetSummary(context => {
+        const root =
+          'input[name="editor[settings][plugins][drupalimage][image_upload]';
         const $status = $(`${root}[status]"]`);
         const $maxFileSize = $(`${root}[max_size]"]`);
         const $maxWidth = $(`${root}[max_dimensions][width]"]`);
         const $maxHeight = $(`${root}[max_dimensions][height]"]`);
         const $scheme = $(`${root}[scheme]"]:checked`);
 
-        const maxFileSize = $maxFileSize.val() ? $maxFileSize.val() : $maxFileSize.attr('placeholder');
-        const maxDimensions = ($maxWidth.val() && $maxHeight.val()) ? `(${$maxWidth.val()}x${$maxHeight.val()})` : '';
+        const maxFileSize = $maxFileSize.val()
+          ? $maxFileSize.val()
+          : $maxFileSize.attr('placeholder');
+        const maxDimensions =
+          $maxWidth.val() && $maxHeight.val()
+            ? `(${$maxWidth.val()}x${$maxHeight.val()})`
+            : '';
 
         if (!$status.is(':checked')) {
           return Drupal.t('Uploads disabled');
         }
 
         let output = '';
-        output += Drupal.t('Uploads enabled, max size: @size @dimensions', { '@size': maxFileSize, '@dimensions': maxDimensions });
+        output += Drupal.t('Uploads enabled, max size: @size @dimensions', {
+          '@size': maxFileSize,
+          '@dimensions': maxDimensions,
+        });
         if ($scheme.length) {
           output += `<br />${$scheme.attr('data-label')}`;
         }
@@ -38,4 +47,4 @@
       });
     },
   };
-}(jQuery, Drupal, drupalSettings));
+})(jQuery, Drupal, drupalSettings);