diff --git a/punch_list/css/custom.css b/punch_list/css/custom.css index aab0f16..5c9d76c 100644 --- a/punch_list/css/custom.css +++ b/punch_list/css/custom.css @@ -11,6 +11,67 @@ textarea { display: none;} #editEvent { display: none; } +.navbar { + overflow: hidden; + background-color: #333; + font-family: Arial, Helvetica, sans-serif; +} + +.navbar a { + float: left; + font-size: 16px; + color: white; + text-align: center; + padding: 14px 16px; + text-decoration: none; +} + +.dropdown { + float: left; + overflow: hidden; +} + +.dropdown .dropbtn { + cursor: pointer; + font-size: 16px; + border: none; + outline: none; + color: white; + padding: 14px 16px; + background-color: inherit; + font-family: inherit; + margin: 0; +} + +.navbar a:hover, .dropdown:hover .dropbtn, .dropbtn:focus { + background-color: red; +} + +.dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + z-index: 1; +} + +.dropdown-content a { + float: none; + color: black; + padding: 12px 16px; + text-decoration: none; + display: block; + text-align: left; +} + +.dropdown-content a:hover { + background-color: #ddd; +} + +.show { + display: block; +} .warn { color: yellow; } .green { color: lime; } .over { color: red; } @@ -51,14 +112,28 @@ table.punches { color: #AAA; padding: 5px; margin-bottom: 0px; } +.centerMiddle { + height: 100%; + width: 100%; + padding:0px; + text-align: center; + vertical-align: center; + margin-top: 50%; } .button { + display: block; + padding: 0px; + text-align: center; + text-decoration: none; + font-size: 2rem; vertical-align: middle; border: 1px solid #333; background-color: #4CAF50; - margin-top: 0px; - margin-bottom: 0px; - width: 150px; - height: 90px;} + margin-top: auto; + margin-bottom: auto; + margin-left: auto; + margin-right: auto; + width: 98%; + height: 70px;} .nav-button { vertical-align: middle; float: right } @@ -83,11 +158,13 @@ table.punches { /* Larger than phone */ @media (min-width: 550px) { .button { + padding: 0px; vertical-align: middle; border: 1px solid #333; background-color: #4CAF50; margin-top: 10px; margin-bottom: 0px; + width: 150px; height: 45px; } .nav-button { vertical-align: middle; diff --git a/punch_list/eventManage.js b/punch_list/eventManage.js index d0d2ddd..8060e73 100644 --- a/punch_list/eventManage.js +++ b/punch_list/eventManage.js @@ -22,6 +22,7 @@ function putJson(data) { } function getJson(callback) { + displayMeta(); console.log(`getJson`); let req = new XMLHttpRequest(); req.onreadystatechange = () => { @@ -50,7 +51,7 @@ function genList(punchList) { list = ""; for (i = 0; i < listLength; i++) { - list += ""; + list += ""; } list += "
Punch ItemStatusPriorityAction
" + punchList[i].subject + "" + punchList[i].progress + "" + punchList[i].priority + "start | done | edit | delete
" + punchList[i].subject + "" + punchList[i].progress + "" + punchList[i].priority + "
"; @@ -131,3 +132,24 @@ function disableElement(element) { console.log(`disabling ${element}`); document.getElementById(element).style.display = "none"; } + +function displayMeta() { + document.getElementById("meta").innerHTML = "Version: " + version ; +} + +/* When the user clicks on the button, +toggle between hiding and showing the dropdown content */ +function dropMenu(item) { + window.dropId = "myDropdown" + item; + document.getElementById(window.dropId).classList.toggle("show"); +} + +// Close the dropdown if the user clicks outside of it +window.onclick = function(e) { + if (!e.target.matches('.dropbtn')) { + var myDropdown = document.getElementById(window.dropId); + if (myDropdown.classList.contains('show')) { + myDropdown.classList.remove('show'); + } + } +} diff --git a/punch_list/index.html b/punch_list/index.html index dbfc5f7..2994031 100644 --- a/punch_list/index.html +++ b/punch_list/index.html @@ -26,9 +26,9 @@
- New Punch Item - Refresh - Time Boxer + + +

@@ -56,5 +56,6 @@

+
diff --git a/punch_list/metadata.js b/punch_list/metadata.js index c884244..a9c5793 100644 --- a/punch_list/metadata.js +++ b/punch_list/metadata.js @@ -1,4 +1,4 @@ -var version = "0.0.001", +var version = "0.0.231", debug = false, jsonUrl = "https://api.myjson.com/bins/1dodsj", items,