Loading assets/js/draggable.js +4 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Contains javascript functionality for the draggable blocks module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Loading @@ -28,7 +28,8 @@ Drupal.behaviors.draggable_dashboard = { attach: function (context, settings) { $('.draggable-dashboard', context).once('dashboard-processed').each(function () { const elements = once('dashboard-processed', '.draggable-dashboard', context) elements.forEach(function () { var $dashboards = $('.draggable-dashboard', context); var blocks = {}; // If we already saved an order in the local storage, get the value Loading Loading @@ -64,4 +65,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once); assets/js/frontend.js +4 −3 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ * Contains javascript functionality for the draggable dashboard module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Drupal.behaviors.draggableDashboardActions = { attach: function attach(context, settings) { $('.draggable-dashboard', context).once('draggable-processed').each(function () { const elements = once('draggable-processed', '.draggable-dashboard', context); elements.forEach(function () { var blocksMin = []; // If we already saved an order in the local storage, // get the value and collapse those blocks Loading Loading @@ -62,4 +63,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once); assets/js/main.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Contains javascript functionality for the draggable dashboard module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Drupal.behaviors.draggableDashboard = { Loading Loading @@ -95,7 +95,7 @@ updateBlockWeights(table, regionName); }; $(context).find('select.block-region-select').once('block-region-select').on('change', function (event) { $(once('block-region-select', 'select.block-region-select', context)).on('change', function (event) { var row = $(this).closest('tr'); var select = $(this); Loading Loading @@ -124,4 +124,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once); draggable_dashboard.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ name: Draggable Dashboard type: module description: 'Individual and configurable dashboard, so user can see own favourite functions immediately' package: Content core_version_requirement: ^8.8 || ^9 || ^10 core_version_requirement: ^9.2 || ^10 dependencies: - drupal:block draggable_dashboard.libraries.yml +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ main: assets/css/main.css: {} dependencies: - core/jquery - core/once - core/drupal draggable: Loading Loading
assets/js/draggable.js +4 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Contains javascript functionality for the draggable blocks module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Loading @@ -28,7 +28,8 @@ Drupal.behaviors.draggable_dashboard = { attach: function (context, settings) { $('.draggable-dashboard', context).once('dashboard-processed').each(function () { const elements = once('dashboard-processed', '.draggable-dashboard', context) elements.forEach(function () { var $dashboards = $('.draggable-dashboard', context); var blocks = {}; // If we already saved an order in the local storage, get the value Loading Loading @@ -64,4 +65,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once);
assets/js/frontend.js +4 −3 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ * Contains javascript functionality for the draggable dashboard module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Drupal.behaviors.draggableDashboardActions = { attach: function attach(context, settings) { $('.draggable-dashboard', context).once('draggable-processed').each(function () { const elements = once('draggable-processed', '.draggable-dashboard', context); elements.forEach(function () { var blocksMin = []; // If we already saved an order in the local storage, // get the value and collapse those blocks Loading Loading @@ -62,4 +63,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once);
assets/js/main.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Contains javascript functionality for the draggable dashboard module. */ (function ($, window, Drupal) { (function ($, window, Drupal, once) { 'use strict'; Drupal.behaviors.draggableDashboard = { Loading Loading @@ -95,7 +95,7 @@ updateBlockWeights(table, regionName); }; $(context).find('select.block-region-select').once('block-region-select').on('change', function (event) { $(once('block-region-select', 'select.block-region-select', context)).on('change', function (event) { var row = $(this).closest('tr'); var select = $(this); Loading Loading @@ -124,4 +124,4 @@ } }; })(jQuery, window, Drupal); })(jQuery, window, Drupal, once);
draggable_dashboard.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,6 @@ name: Draggable Dashboard type: module description: 'Individual and configurable dashboard, so user can see own favourite functions immediately' package: Content core_version_requirement: ^8.8 || ^9 || ^10 core_version_requirement: ^9.2 || ^10 dependencies: - drupal:block
draggable_dashboard.libraries.yml +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ main: assets/css/main.css: {} dependencies: - core/jquery - core/once - core/drupal draggable: Loading