This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/modules/contrib/webform/js/webform.element.multiple.js
2017-03-16 15:29:07 +00:00

27 lines
625 B
JavaScript

/**
* @file
* Javascript behaviors for message element integration.
*/
(function ($, Drupal) {
'use strict';
/**
* Move show weight to after the table.
*
* @type {Drupal~behavior}
*/
Drupal.behaviors.webformMultiple = {
attach: function (context, settings) {
for (var base in settings.tableDrag) {
var $tableDrag = $(context).find('#' + base);
var $toggleWeight = $tableDrag.parent().find('.tabledrag-toggle-weight');
$toggleWeight.addClass('webform-multiple-tabledrag-toggle-weight');
$tableDrag.after($toggleWeight);
}
}
};
})(jQuery, Drupal);