Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / views_ui / js / dialog.views.es6.js
index 15f937f54062346cae337041f82988309e4e0935..ed2552482d39c06eb1281e8f51c0dfd2c1ccd923 100644 (file)
@@ -3,7 +3,7 @@
  * Views dialog behaviors.
  */
 
-(function ($, Drupal, drupalSettings) {
+(function($, Drupal, drupalSettings) {
   function handleDialogResize(e) {
     const $modal = $(e.currentTarget);
     const $viewsOverride = $modal.find('[data-drupal-views-offset]');
@@ -16,7 +16,7 @@
       // Let scroll element take all the height available.
       $scroll.css({ overflow: 'visible', height: 'auto' });
       modalHeight = $modal.height();
-      $viewsOverride.each(function () {
+      $viewsOverride.each(function() {
         offset += $(this).outerHeight();
       });
 
    */
   Drupal.behaviors.viewsModalContent = {
     attach(context) {
-      $('body').once('viewsDialog').on('dialogContentResize.viewsDialog', '.ui-dialog-content', handleDialogResize);
+      $('body')
+        .once('viewsDialog')
+        .on(
+          'dialogContentResize.viewsDialog',
+          '.ui-dialog-content',
+          handleDialogResize,
+        );
       // When expanding details, make sure the modal is resized.
-      $(context).find('.scroll').once('detailsUpdate').on('click', 'summary', (e) => {
-        $(e.currentTarget).trigger('dialogContentResize');
-      });
+      $(context)
+        .find('.scroll')
+        .once('detailsUpdate')
+        .on('click', 'summary', e => {
+          $(e.currentTarget).trigger('dialogContentResize');
+        });
     },
     detach(context, settings, trigger) {
       if (trigger === 'unload') {
-        $('body').removeOnce('viewsDialog').off('.viewsDialog');
+        $('body')
+          .removeOnce('viewsDialog')
+          .off('.viewsDialog');
       }
     },
   };
-}(jQuery, Drupal, drupalSettings));
+})(jQuery, Drupal, drupalSettings);