projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modal to accept/refuse challenge + diagrams preview when creating challenge
[vchess.git]
/
client
/
src
/
main.js
diff --git
a/client/src/main.js
b/client/src/main.js
index
6e22936
..
70b7d78
100644
(file)
--- a/
client/src/main.js
+++ b/
client/src/main.js
@@
-11,20
+11,17
@@
new Vue({
return h(App);
},
created: function() {
return h(App);
},
created: function() {
- window.doClick = (elemId) => { document.getElementById(elemId).click() };
- document.addEventListener("keydown", (e) => {
- if (e.code === "Escape")
- {
+ window.doClick = elemId => {
+ document.getElementById(elemId).click();
+ };
+ document.addEventListener("keydown", e => {
+ if (e.code === "Escape") {
let modalBoxes = document.querySelectorAll("[id^='modal']");
modalBoxes.forEach(m => {
let modalBoxes = document.querySelectorAll("[id^='modal']");
modalBoxes.forEach(m => {
- if (m.checked)
- m.checked = false;
+ if (m.checked && m.id != "modalAccept") m.checked = false;
});
}
});
});
}
});
- // TODO: why is this wrong?
- //store.initialize(this.$route.path);
- store.initialize(window.location.href.split("#")[1]);
- // NOTE: at this point, variants and tr(anslations) might be uninitialized
- },
+ store.initialize();
+ }
}).$mount("#app");
}).$mount("#app");