js form and css

This commit is contained in:
Kameron Kenny 2019-06-12 11:37:43 -04:00
parent 6f04566334
commit dc19892362
4 changed files with 13 additions and 8 deletions

View File

@ -233,6 +233,7 @@ textarea {
/* Larger than tablet */ /* Larger than tablet */
@media (min-width: 750px) { @media (min-width: 750px) {
body { width: 800px; }
/* Navbar */ /* Navbar */
.clock-wrapper { .clock-wrapper {
display: block; display: block;

View File

@ -200,7 +200,7 @@ function enablePunchDetail(item) {
enableElement("punchDetail"); enableElement("punchDetail");
console.log(`punchDetail Enabled`); console.log(`punchDetail Enabled`);
// html = ""; // html = "";
html = "<p>subject: " + punchList[item].subject + "<br />Created: " + punchList[item].cDate + "<br />Modified Date: " + punchList[item].mDate + "<br />Priority: " + punchList[item].priority + "<br />Progress: " + punchList[item].progress + "<br /><textarea>" + punchList[item].notes + "</textarea></p><input type=button value=close onClick=getJson(genList)>"; html = "<p>subject: " + punchList[item].subject + "<br />Created: " + punchList[item].cDate + "<br />Modified Date: " + punchList[item].mDate + "<br />Priority: " + punchList[item].priority + "<br />Progress: " + punchList[item].progress + "<br /><textarea>" + punchList[item].notes + "</textarea><br /><input onfocus='clearDefault(this)' type='text' id='tag' value='Add tag'><input onClick='addTag()' type=button value='Add' /></p><input type=button value=close onClick=getJson(genList)>";
document.getElementById("punchDetail").innerHTML = html; document.getElementById("punchDetail").innerHTML = html;
} }
@ -348,6 +348,9 @@ function addTag() {
enableElement("punchListAll"); enableElement("punchListAll");
} }
function clearDefault(a){
if (a.defaultValue == a.value) {
a.value="";
}
}

View File

@ -33,21 +33,22 @@
<div class="row" id="editPunch"> <div class="row" id="editPunch">
<input type=hidden id=editID> <input type=hidden id=editID>
<input class="u-full-width" type="text" id="editSubject" value=""><br /> <input class="u-full-width" type="text" id="editSubject" value=""><br />
<input class="u-full-width" type="text" id="editPriority" value=""><br /> <input class="u-full-width" type="text" id="editPriority" value=""><br />
<input class="u-full-width" type="text" id="editProgress" READONLY><br /> <input class="u-full-width" type="text" id="editProgress" READONLY><br />
<input type='text' id='timepickerEdit' class='datepicker-here u-full-width' data-timepicker='true' data-language='en'><br /> <input type='text' id='timepickerEdit' class='datepicker-here u-full-width' data-timepicker='true' data-language='en'><br />
<!-- <input type="text" id="editStartDate" value=""> --> <!-- <input type="text" id="editStartDate" value=""> -->
<textarea class="u-full-width" id="editNotes" value=""></textarea> <textarea class="u-full-width" id="editNotes" value=""></textarea>
<input type='text' id='tag' value="new Tag"><input onClick="addTag()" type=button value="ADD" /> <input onfocus="clearDefault(this)" type='text' id='tag' value="new Tag"><input onClick="addTag()" type=button value="ADD" />
<input class="u-full-width" onClick="submitEditPunch()" id="test" type="button" value="Update" /> <input class="u-full-width" onClick="submitEditPunch()" id="test" type="button" value="Update" />
</div> </div>
<div class="container row" id="newEvent"> <div class="container row" id="newEvent">
<form id="newEventForm" onSubmit="return processEventForm(this.form)"> <form id="newEventForm" onSubmit="return processEventForm(this.form)">
<input class="u-full-width" type="text" id="newSubject" value="subject"> <input onfocus="clearDefault(this)" class="u-full-width" type="text" id="newSubject" value="subject">
<input class="u-full-width" type="text" id="newPriority" value="priority"> <input onfocus="clearDefault(this)" class="u-full-width" type="text" id="newPriority" value="priority">
<input type="hidden" id="newProgress" value="new"> <input type="hidden" id="newProgress" value="new">
<input type='text' id='timepickerCreate' class='datepicker-here u-full-width' data-timepicker='true' data-language='en' value="date"> <input onfocus="clearDefault(this)" type='text' id='timepickerCreate' class='datepicker-here u-full-width' data-timepicker='true' data-language='en' value="date">
<textarea class="u-full-width" id="newNotes" value="Notes"></textarea> <textarea class="u-full-width" id="newNotes" value="Notes"></textarea>
<input class="u-full-width" onClick="createNewEvent()" id="test" type="button" value="Update" /> <input class="u-full-width" onClick="createNewEvent()" id="test" type="button" value="Update" />
</form> </form>

View File

@ -1,4 +1,4 @@
var version = "0.3.021", var version = "0.3.022",
debug = false, debug = false,
jsonUrl = "https://api.myjson.com/bins/1dodsj", jsonUrl = "https://api.myjson.com/bins/1dodsj",
showDone = false, showDone = false,