Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -1,6 +1,6 @@
/**
* @file
* Javascript behaviors for message element integration.
* JavaScript behaviors for multiple element.
*/
(function ($, Drupal) {
@ -12,15 +12,42 @@
*
* @type {Drupal~behavior}
*/
Drupal.behaviors.webformMultiple = {
Drupal.behaviors.webformMultipleTableDrag = {
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);
if (settings.tableDrag.hasOwnProperty(base)) {
$(context).find('.js-form-type-webform-multiple #' + base).once('webform-multiple-table-drag').each(function () {
var $tableDrag = $(this);
var $toggleWeight = $tableDrag.prev().prev('.tabledrag-toggle-weight-wrapper');
if ($toggleWeight.length) {
$toggleWeight.addClass('webform-multiple-tabledrag-toggle-weight');
$tableDrag.after($toggleWeight);
}
});
}
}
}
};
/**
* Submit multiple add number input value when enter is pressed.
*
* @type {Drupal~behavior}
*/
Drupal.behaviors.webformMultipleAdd = {
attach: function (context, settings) {
$(context).find('.js-webform-multiple-add').once('webform-multiple-add').each(function () {
var $submit = $(this).find('input[type="submit"], button');
var $number = $(this).find('input[type="number"]');
$number.keyup(function (event) {
if (event.which === 13) {
// Note: Mousedown is the default trigger for Ajax events.
// @see Drupal.Ajax.
$submit.mousedown();
}
});
});
}
};
})(jQuery, Drupal);