migrate js to use prettier

This commit is contained in:
Christoph Ladurner
2022-07-19 22:06:15 +02:00
parent f11facc9d6
commit 0399814fe0

View File

@@ -1,8 +1,8 @@
import $ from 'jquery';
import 'semantic-ui-css';
import $ from "jquery";
import "semantic-ui-css";
// called on document ready
$(function() {
$(function () {
importZammadScript();
});
@@ -11,31 +11,29 @@ function importZammadScript() {
scriptNode.id = "zammad_form_script";
scriptNode.src = "https://ub-support.tugraz.at/assets/form/form.js";
document.head.appendChild(scriptNode);
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
$('#feedback-form').ZammadForm({
messageTitle: 'Contact us',
$("#feedback-form").ZammadForm({
messageTitle: "Contact us",
showTitle: true,
messageSubmit: 'Submit',
messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!',
modal: true
messageSubmit: "Submit",
messageThankYou:
"Thank you for your message, (#%s). We will get back to you as quickly as possible!",
modal: true,
});
});
}
// used for sticky test instance notification
$('.ui.sticky.test-instance')
.sticky({
context: 'body'
})
;
$(".ui.sticky.test-instance").sticky({
context: "body",
});
export function toggleVisibility(id) {
var element = document.getElementById(id);
var isHided = element.style.display === "none";
var element = document.getElementById(id);
var isHided = element.style.display === "none";
element.style.display = isHided ? "block" : "none";
element.style.display = isHided ? "block" : "none";
}
window.toggleVisibility = toggleVisibility;