Skip to content
Snippets Groups Projects

Issue #3417499: Fix ESLint errors for the Field Example module

1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
@@ -4,13 +4,13 @@
*/
/**
* Provides a farbtastic colorpicker for the fancier widget.
* Provides a color picker for the fancier widget.
*/
(function ($) {
Drupal.behaviors.field_example_colorpicker = {
attach() {
$('.edit-field-example-colorpicker').on('focus', function (event) {
const edit_field = this;
const editField = this;
const picker = $(this)
.closest('div')
.parent()
@@ -19,9 +19,9 @@
$('.field-example-colorpicker').hide();
$(picker).show();
$.farbtastic(picker, function (color) {
edit_field.value = color;
}).setColor(edit_field.value);
editField.value = color;
}).setColor(editField.value);
});
},
}
};
})(jQuery);
Loading