Skip to content
Snippets Groups Projects
Commit afef1a20 authored by catch's avatar catch
Browse files

Issue #1684822 by droplet: JSHint block.

parent 81f274ca
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
(function ($) { (function ($, window) {
"use strict"; "use strict";
...@@ -90,7 +90,7 @@ Drupal.behaviors.blockDrag = { ...@@ -90,7 +90,7 @@ Drupal.behaviors.blockDrag = {
// Check whether the newly picked region is available for this block. // Check whether the newly picked region is available for this block.
if (regionField.find('option[value=' + regionName + ']').length === 0) { if (regionField.find('option[value=' + regionName + ']').length === 0) {
// If not, alert the user and keep the block in its old region setting. // If not, alert the user and keep the block in its old region setting.
alert(Drupal.t('The block cannot be placed in this region.')); window.alert(Drupal.t('The block cannot be placed in this region.'));
// Simulate that there was a selected element change, so the row is put // Simulate that there was a selected element change, so the row is put
// back to from where the user tried to drag it. // back to from where the user tried to drag it.
regionField.change(); regionField.change();
...@@ -148,4 +148,4 @@ Drupal.behaviors.blockDrag = { ...@@ -148,4 +148,4 @@ Drupal.behaviors.blockDrag = {
} }
}; };
})(jQuery); })(jQuery, window);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment