|
|
|
|
@ -1,39 +1,20 @@
|
|
|
|
|
(function (Drupal) { |
|
|
|
|
//stuff goes here
|
|
|
|
|
window.onload = function() { |
|
|
|
|
var inputField = document.getElementById('nouislider-input-from'); |
|
|
|
|
var str = inputField.value.toString(); |
|
|
|
|
str = str.slice(0, -3); |
|
|
|
|
str = parseInt(str); |
|
|
|
|
inputField.value = str; |
|
|
|
|
|
|
|
|
|
var inputField = document.getElementById('nouislider-input-to'); |
|
|
|
|
var str = inputField.value.toString(); |
|
|
|
|
str = str.slice(0, -3); |
|
|
|
|
str = parseInt(str); |
|
|
|
|
inputField.value = str; |
|
|
|
|
}; |
|
|
|
|
})(Drupal); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(function (Drupal) { |
|
|
|
|
Drupal.behaviors.LangSwitchBehavior = { |
|
|
|
|
attach: function (context, settings) { |
|
|
|
|
const textEn = context.querySelector('#text-en'); |
|
|
|
|
const textFr = context.querySelector('#text-fr'); |
|
|
|
|
const showEn = context.querySelector('#show-text-en'); |
|
|
|
|
const showFr = context.querySelector('#show-text-fr'); |
|
|
|
|
|
|
|
|
|
// Hide French text initially
|
|
|
|
|
if (textFr) { |
|
|
|
|
textFr.style.display = 'none'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (showEn && textEn && textFr) { |
|
|
|
|
showEn.addEventListener('click', function (e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
textEn.style.display = ''; |
|
|
|
|
textFr.style.display = 'none'; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (showFr && textEn && textFr) { |
|
|
|
|
showFr.addEventListener('click', function (e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
textEn.style.display = 'none'; |
|
|
|
|
textFr.style.display = ''; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
})(Drupal); |
|
|
|
|
|
|
|
|
|
//(function (Drupal, once) {
|
|
|
|
|
|
|
|
|
|
|