Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / misc / tableresponsive.js
index d4fa6315cc11dfca2a2b0ccc45447f12b16e187d..0de5eee23cd66e3627d2fc0c4ea92eeb9229c41e 100644 (file)
@@ -6,18 +6,6 @@
 **/
 
 (function ($, Drupal, window) {
-  Drupal.behaviors.tableResponsive = {
-    attach: function attach(context, settings) {
-      var $tables = $(context).find('table.responsive-enabled').once('tableresponsive');
-      if ($tables.length) {
-        var il = $tables.length;
-        for (var i = 0; i < il; i++) {
-          TableResponsive.tables.push(new TableResponsive($tables[i]));
-        }
-      }
-    }
-  };
-
   function TableResponsive(table) {
     this.table = table;
     this.$table = $(table);
     $(window).on('resize.tableresponsive', $.proxy(this, 'eventhandlerEvaluateColumnVisibility')).trigger('resize.tableresponsive');
   }
 
+  Drupal.behaviors.tableResponsive = {
+    attach: function attach(context, settings) {
+      var $tables = $(context).find('table.responsive-enabled').once('tableresponsive');
+      if ($tables.length) {
+        var il = $tables.length;
+        for (var i = 0; i < il; i++) {
+          TableResponsive.tables.push(new TableResponsive($tables[i]));
+        }
+      }
+    }
+  };
+
   $.extend(TableResponsive, {
     tables: []
   });