From a33c5653655215d3a6496807f15a896d4b85f070 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 24 Feb 2018 18:30:30 +0100 Subject: Webpack / Rewrite all JS to ES6 Syntax --- assets/vintage/js/base.js | 56 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 29 deletions(-) (limited to 'assets/vintage') diff --git a/assets/vintage/js/base.js b/assets/vintage/js/base.js index 9bcc96fb..66830b59 100644 --- a/assets/vintage/js/base.js +++ b/assets/vintage/js/base.js @@ -1,32 +1,30 @@ -window.onload = function () { - var continent = document.getElementById('continent'); - var city = document.getElementById('city'); - if (continent != null && city != null) { - continent.addEventListener('change', function(event) { - hideTimezoneCities(city, continent.options[continent.selectedIndex].value, true); - }); - hideTimezoneCities(city, continent.options[continent.selectedIndex].value, false); - } -}; +import Awesomplete from 'awesomplete'; +import 'awesomplete/awesomplete.css'; -/** - * Add the class 'hidden' to city options not attached to the current selected continent. - * - * @param cities List of