Issue #2179655 followup by droplet: JS file validation broken.
parent
0230aa22a4
commit
f6e6e52871
|
@ -7,7 +7,7 @@
|
||||||
* prevents separate file fields from accidentally uploading files).
|
* prevents separate file fields from accidentally uploading files).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
(function ($, Drupal) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
||||||
Drupal.behaviors.fileValidateAutoAttach = {
|
Drupal.behaviors.fileValidateAutoAttach = {
|
||||||
attach: function (context, settings) {
|
attach: function (context, settings) {
|
||||||
var $context = $(context);
|
var $context = $(context);
|
||||||
var validateExtension = Drupal.file.validateExtension;
|
|
||||||
var elements;
|
var elements;
|
||||||
|
|
||||||
function initFileValidation (selector) {
|
function initFileValidation (selector) {
|
||||||
|
@ -33,7 +32,6 @@
|
||||||
},
|
},
|
||||||
detach: function (context, settings, trigger) {
|
detach: function (context, settings, trigger) {
|
||||||
var $context = $(context);
|
var $context = $(context);
|
||||||
var validateExtension = Drupal.file.validateExtension;
|
|
||||||
var elements;
|
var elements;
|
||||||
|
|
||||||
function removeFileValidation (selector) {
|
function removeFileValidation (selector) {
|
||||||
|
@ -195,4 +193,4 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery, Drupal);
|
||||||
|
|
Loading…
Reference in New Issue