Skip to content

Commit

Permalink
Merge pull request #45 from StadGent/8.x-1.x-dev
Browse files Browse the repository at this point in the history
Release 1.4.1
  • Loading branch information
MPParsley authored Sep 27, 2021
2 parents 38b5fd1 + d71ddca commit b3a688a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All Notable changes to `drupal/opening-hours` module.

## [1.4.1]

### Changed

* Added support for Ajax.

## [1.4.0]

### Changed
Expand Down Expand Up @@ -207,6 +213,7 @@ for the same widget.
* DMOH-20: Added the opening hours field type.
* DMOH-21: Added the opening hours field widget.

[1.4.1]: https://github.com/StadGent/drupal_module_opening-hours/compare/1.4.0...1.4.1
[1.4.0]: https://github.com/StadGent/drupal_module_opening-hours/compare/8.x-1.3...1.4.0
[8.x-1.3]: https://github.com/StadGent/drupal_module_opening-hours/compare/8.x-1.2...8.x-1.3
[8.x-1.2]: https://github.com/StadGent/drupal_module_opening-hours/compare/8.x-1.1...8.x-1.2
Expand Down
11 changes: 4 additions & 7 deletions js/opening-hours.binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
attach: function (context, settings) {
var self = this;

$(document).once('openingHoursWidget').each(function () {
var items = document.querySelectorAll('.openinghours-widget');
var items = $('.openinghours-widget', context).once('openingHoursWidget');

if (items.length) {
var options = {
'endpoint': settings.openingHours.endpoint,
'endpoint_key': settings.openingHours.endpoint_key,
Expand All @@ -32,11 +32,8 @@

new OpeningHours(items, options);

var navLinks = document.querySelectorAll('.openinghours-navigation a');
for (var y = 0; y < navLinks.length; y++) {
navLinks[y].addEventListener('click', self.switchViewMode(options));
}
});
$('.openinghours-navigation a', context).click(self.switchViewMode(options));
}
},

/**
Expand Down

0 comments on commit b3a688a

Please sign in to comment.