';
+ if ( punchList[i].startTime != undefined ) {
+ list += '
';
+ list += new Date(punchList[i].startTime);
+ list += '
';
+ }
if ( punchList[i].notes != "" ) {
list += '
';
}
@@ -142,20 +163,32 @@ function genList(punchList, element) {
}
} else {
console.log('in no tags filter');
- if (punchList[i].progress.toLowerCase() === "in progress") { var style = "inProgress" } else { var style = "punch-default" }
+
if (punchList[i].progress.toLowerCase() === "done" && punchList[i].priority != 99999) {
setPriority(punchList[i].uuid, 99999);
} else if (punchList[i].progress.toLowerCase() != "done"){
list += '
';
list += '';
list += '';
list += '
';
+ if ( punchList[i].startTime != undefined ) {
+ list += '
Started: ';
+ list += new Date(punchList[i].startTime);
+ list += '
';
+ }
if ( punchList[i].notes != "" ) {
+ list += '
';
list += '
';
+ list += '
';
}
list += '
';
list += '
';
@@ -194,6 +234,26 @@ function genList(punchList, element) {
document.getElementById(element).innerHTML = list;
mkSortable();
+enableDrop();
+}
+
+function progressMenuDrop(uuid) {
+ document.getElementById("progressDropdown-" + uuid).classList.toggle("show");
+}
+
+function enableDrop() {
+ window.onclick = function(event) {
+ if (!event.target.matches('.dropbtn')) {
+ var dropdowns = document.getElementsByClassName("dropdown-content");
+ var i;
+ for (i = 0; i < dropdowns.length; i++) {
+ var openDropdown = dropdowns[i];
+ if (openDropdown.classList.contains('show')) {
+ openDropdown.classList.remove('show');
+ }
+ }
+ }
+ }
}
function mkSortable() {
@@ -254,6 +314,10 @@ function startPunch(uuid) {
var punchList = window.punches;
item = findArrayId(uuid);
+ if ( punchList[item].startTime === undefined ) {
+ punchList[item].startTime = new Date().getTime();
+ }
+
punchList[item].progress = "In Progress";
jsonStr = JSON.stringify(punchList);
@@ -263,12 +327,37 @@ function startPunch(uuid) {
function completePunch(uuid) {
var punchList = window.punches;
item = findArrayId(uuid);
+
+ if ( punchList[item].doneTime === undefined ) {
+ punchList[item].doneTime = new Date().getTime();
+ }
+
punchList[item].progress = "Done";
jsonStr = JSON.stringify(punchList);
putJson(jsonStr);
}
+function waitingPunch(uuid) {
+ var punchList = window.punches;
+ item = findArrayId(uuid);
+
+ punchList[item].progress = "Waiting";
+
+ jsonStr = JSON.stringify(punchList);
+ putJson(jsonStr);
+}
+
+function mkPunchNew(uuid) {
+ var punchList = window.punches;
+ item = findArrayId(uuid);
+
+ punchList[item].progress = "New";
+
+ jsonStr = JSON.stringify(punchList);
+ putJson(jsonStr);
+}
+
function enablePunchDetail(uuid) {
var punchList = window.punches;
item = findArrayId(uuid);
@@ -453,14 +542,14 @@ function submitEditPunch(uuid) {
var priorityField = document.getElementById("editPriority").value;
var progressField = document.getElementById("editProgress").innerHTML;
var nDateField = document.getElementById("timepickerEdit").value;
- var tagsField = document.getElementById("editTags").value.toLowerCase();
+ //var tagsField = document.getElementById("editTags").value.toLowerCase();
var notesField = document.getElementById("editNotes").value;
punchList[id].subject = subjectField;
punchList[id].priority = priorityField;
punchList[id].progress = progressField;
punchList[id].nDate = nDateField;
- punchList[id].tags = tagsField;
+ //punchList[id].tags = tagsField;
punchList[id].notes = notesField;
jsonStr = JSON.stringify(punchList);
diff --git a/punch_list/css/custom.css b/punch_list/css/custom.css
index eb8377c..0996abf 100644
--- a/punch_list/css/custom.css
+++ b/punch_list/css/custom.css
@@ -34,9 +34,20 @@ a.punch-default { color: #00BFFF; font-size: 12px; text-decoration: none;}
a.punch-default:hover { color: #00FFFF; text-shadow: 0px 0px 23px #FFF; }
.punch-default { border: 0px solid #AAA; color: #aaa; font-size: 12px; }
.inProgress { color: orange; font-size: 12px; }
-.overdue { color: red; }
-.duesoon { color: yellow; }
+.waiting { color: red; font-size: 12px; }
+.overdue { color: red; font-size: 12px; }
+.duesoon { color: yellow; font-size: 12px;}
.hide { display: none; }
+i {
+ border: solid black;
+ border-width: 0 3px 3px 0;
+ display: inline-block;
+ padding: 3px;
+}
+.down {
+ transform: rotate(45deg);
+ -webkit-transform: rotate(45deg);
+}
.punch-list-backlog-details {
font-size: 18px;
color: #aaa;
@@ -113,53 +124,57 @@ textarea {
text-decoration: none;
}
-.dropdown {
- float: left;
- overflow: hidden;
-}
+.top { vertical-align: top; padding: 0px; margin: 0px; }
-.dropdown .dropbtn {
- cursor: pointer;
- vertical-align: middle;
- font-size: 16px;
- border: none;
- outline: none;
+/* Dropdown Button */
+.dropbtn {
+ height: 15px;
+/* background-image: url("../images/down-carrot.png"); */
+ vertical-align: top;
+ background-color: #3498DB;
color: white;
- padding: 14px 16px;
- background-color: inherit;
- font-family: inherit;
- margin: 0;
+ padding: 6px;
+ font-size: 10px;
+ cursor: pointer;
+ border: 0px;
}
-.navbar a:hover, .dropdown:hover .dropbtn, .dropbtn:focus {
- background-color: red;
+/* Dropdown button on hover & focus */
+.dropbtn:hover, .dropbtn:focus {
+ background-color: #2980B9;
}
+/* The container
- needed to position the dropdown content */
+.dropdown {
+ position: relative;
+ display: inline-block;
+ height: 20px;
+}
+
+/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
- background-color: #f9f9f9;
+ background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
+/* Links inside the dropdown */
.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;
-}
+/* Change color of dropdown links on hover */
+.dropdown-content a:hover {background-color: #ddd}
+
+/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
+.show {display:block;}
-.show {
- display: block;
-}
.warn { color: yellow; }
.green { color: lime; }
.over { color: red; }
diff --git a/punch_list/images/down-carrot.png b/punch_list/images/down-carrot.png
new file mode 100644
index 0000000..4864847
Binary files /dev/null and b/punch_list/images/down-carrot.png differ
diff --git a/punch_list/metadata.js b/punch_list/metadata.js
index 7a7bffe..c59bf4b 100644
--- a/punch_list/metadata.js
+++ b/punch_list/metadata.js
@@ -1,4 +1,4 @@
-var version = "0.6.032",
+var version = "0.7.001",
debug = false,
jsonUrl = "https://api.myjson.com/bins/1dodsj",
showDone = false,