From: Benjamin Auder Date: Wed, 11 Mar 2020 08:36:48 +0000 (+0100) Subject: Fixes X-Git-Url: https://git.auder.net/variants/current/doc/css/img/pieces/index.css?a=commitdiff_plain;h=42a9284896b9cf9a579d32b7cf77dfc1f5786472;p=vchess.git Fixes --- diff --git a/client/src/App.vue b/client/src/App.vue index 312f324a..8258dc3e 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -44,8 +44,7 @@ import ContactForm from "@/components/ContactForm.vue"; import Settings from "@/components/Settings.vue"; import UpsertUser from "@/components/UpsertUser.vue"; -import { store } from "./store.js"; -import { processModalClick } from "./utils/modalClick.js"; +import { store } from "@/store.js"; export default { components: { ContactForm, @@ -57,12 +56,6 @@ export default { st: store.state }; }, - mounted: function() { - let dialogs = document.querySelectorAll("div[role='dialog']"); - dialogs.forEach(d => { - d.addEventListener("click", processModalClick); - }); - }, methods: { hideDrawer: function(e) { e.preventDefault(); //TODO: why is this needed? diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 0d5a3bbc..8e88b055 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -138,9 +138,8 @@ export default { baseGameDiv.addEventListener("keydown", this.handleKeys); baseGameDiv.addEventListener("wheel", this.handleScroll); } - document.getElementById("eogDiv").addEventListener( - "click", - processModalClick); + document.getElementById("eogDiv") + .addEventListener("click", processModalClick); }, methods: { focusBg: function() { diff --git a/client/src/components/ContactForm.vue b/client/src/components/ContactForm.vue index 50270e69..e5d27326 100644 --- a/client/src/components/ContactForm.vue +++ b/client/src/components/ContactForm.vue @@ -4,7 +4,7 @@ div type="checkbox" @change="trySetEnterTime($event)" ) - div( + div#contactDiv( role="dialog" data-checkbox="modalContact" ) @@ -26,6 +26,7 @@ div import { ajax } from "@/utils/ajax"; import { store } from "@/store"; import { checkNameEmail } from "@/data/userCheck"; +import { processModalClick } from "@/utils/modalClick.js"; export default { name: "my-contact-form", data: function() { @@ -35,6 +36,10 @@ export default { infoMsg: "" }; }, + mounted: function() { + document.getElementById("contactDiv") + .addEventListener("click", processModalClick); + }, methods: { trySetEnterTime: function(event) { if (event.target.checked) { diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 4428f298..c4e19982 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -74,9 +74,8 @@ export default { }; }, mounted: function() { - document.getElementById("adjuster").addEventListener( - "click", - processModalClick); + document.getElementById("adjuster") + .addEventListener("click", processModalClick); if ("ontouchstart" in window) { // Disable tooltips on smartphones: document.querySelectorAll("#aboveMoves .tooltip").forEach(elt => { @@ -226,6 +225,6 @@ span#rulesBtn button margin: 0 -button.tooltip +#aboveMoves button padding-bottom: 5px diff --git a/client/src/components/Settings.vue b/client/src/components/Settings.vue index 7e90b0f2..5b79e06e 100644 --- a/client/src/components/Settings.vue +++ b/client/src/components/Settings.vue @@ -1,7 +1,7 @@