Skip to content

Commit

Permalink
v0.0.10
Browse files Browse the repository at this point in the history
feat: Escape modals
chor: import testing script
  • Loading branch information
mhzawadi committed Dec 27, 2023
1 parent 54adfea commit efc3869
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docker/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

docker-compose down;
docker image rm mhzawadi/dashbaord:dev && \
docker build -t mhzawadi/dashbaord:dev -f ./docker/Dockerfile-dev . && \
docker-compose -f docker/docker-compose.yml up
9 changes: 6 additions & 3 deletions src/public/js/horwood.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
function openModal(elementID) {
function openModal(elementID, form_elementID = false, form_hidden = false) {
const list = document.getElementById(elementID).classList;
list.add("Modal_ModalOpen__xRwYI");
list.remove("Modal_ModalClose__3Cav6");
// var item = document.getElementById("root");
// item.addEventListener("click", function() { CloseModal(elementID); }, false);
document.addEventListener("keyup", (e) => {
if (e.key === "Escape") {
CloseModal(elementID, form_elementID, form_hidden);
}
});
}
function CloseModal(elementID, form_elementID = false, form_hidden = false) {
const list = document.getElementById(elementID).classList;
Expand Down
2 changes: 1 addition & 1 deletion src/view/edit_apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<a href="/">Go home</a>
</p>
<div class="Apps_ActionsContainer__1Nn5v">
<div class="ActionButton_ActionButton__3Ckgw" tabindex="0" onclick="openModal('application_modal')">
<div class="ActionButton_ActionButton__3Ckgw" tabindex="0" onclick="openModal('application_modal', 'frm_app', 'applicationID')">
<div class="ActionButton_ActionButtonIcon__oPDrT">
<span class="iconify" data-icon="mdi:plus-box" data-width="18"></span>
</div>
Expand Down

0 comments on commit efc3869

Please sign in to comment.