Skip to content
Snippets Groups Projects

#3401611 Replace jquery/once by core/once

Merged Hedi Naghmouchi requested to merge issue/widget_engine-3401611:8.x-1.x into 8.x-1.x
5 files
+ 18
16
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -5,7 +5,7 @@
var Widget = Widget || {};
(function ($, Drupal, drupalSettings, document, html2canvas) {
(function ($, Drupal, drupalSettings, document, html2canvas, once) {
"use strict";
/**
@@ -108,7 +108,7 @@ var Widget = Widget || {};
attach: function (context) {
$(document).delegate('.ief-widget-table', 'afterSaveWidget', function (ev, data) {
var $self = $(this);
$(this).once('widgetItem').each(function () {
$(once('widgetItem', $(this))).each(function () {
Widget.checkEmptyPreview($self);
});
});
@@ -121,7 +121,7 @@ var Widget = Widget || {};
*/
Drupal.behaviors.widgetGeneratePreview = {
attach: function (context) {
$('#widget-generate-preview').once('widgetPreview').each(function () {
$(once('widgetPreview', '#widget-generate-preview')).each(function () {
if (typeof drupalSettings.widget_engine === 'undefined') {
return false;
}
@@ -131,4 +131,4 @@ var Widget = Widget || {};
}
};
}(jQuery, Drupal, drupalSettings, document, html2canvas));
}(jQuery, Drupal, drupalSettings, document, html2canvas, once));
Loading