Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -1,12 +1,15 @@
|
|||
/**
|
||||
* @file
|
||||
* Javascript behaviors for RateIt integration.
|
||||
* JavaScript behaviors for RateIt integration.
|
||||
*/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// All options can be override using custom data-* attributes.
|
||||
// @see https://github.com/gjunge/rateit.js/wiki#options.
|
||||
|
||||
/**
|
||||
* Initialize rating element using RateIt.
|
||||
*
|
||||
|
|
@ -14,6 +17,10 @@
|
|||
*/
|
||||
Drupal.behaviors.webformRating = {
|
||||
attach: function (context) {
|
||||
if (!$.fn.rateit) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(context)
|
||||
.find('[data-rateit-backingfld]')
|
||||
.once('webform-rating')
|
||||
|
|
@ -21,6 +28,11 @@
|
|||
var $rateit = $(this);
|
||||
var $input = $($rateit.attr('data-rateit-backingfld'));
|
||||
|
||||
// Rateit only initialize inputs on load.
|
||||
if (document.readyState === 'complete') {
|
||||
$rateit.rateit();
|
||||
}
|
||||
|
||||
// Update the RateIt widget when the input's value has changed.
|
||||
// @see webform.states.js
|
||||
$input.on('change', function () {
|
||||
|
|
|
|||
Reference in a new issue