This commit is contained in:
Kameron Kenny 2019-06-26 10:54:11 -04:00
parent 2476705c02
commit 37fb6f2538
4 changed files with 17 additions and 11 deletions

View File

@ -56,8 +56,10 @@
</div> </div>
<a class='punch-default u-pull-right' href='#' onClick=clearTagFilter()>Clear Tags</a> <div class='u-pull-right' style="width: 200px;">
<div class='punch-default u-pull-right' id=versionInfo></div> <div style="width: 100%;" class='punch-default u-pull-right'><a class='punch-default u-pull-right' href='#' onClick=clearTagFilter()>Clear Tags</a></div>
<div style="width: 100%;" class='punch-default u-pull-right' id=versionInfo></div>
</div>
<div id="debug1"></div> <div id="debug1"></div>
</body> </body>
</html> </html>

View File

@ -80,6 +80,7 @@ function genBacklog(punchList) {
} }
function genList(punchList, element) { function genList(punchList, element) {
document.getElementById("versionInfo").innerHTML = '<div class="u-pull-right">' + version + '</div>';
enableElement("punchListAll"); enableElement("punchListAll");
var itemStyle = "punches"; var itemStyle = "punches";
// isItArray(punchList); // isItArray(punchList);
@ -100,7 +101,7 @@ function genList(punchList, element) {
list += '<li class="' + style + '">'; list += '<li class="' + style + '">';
list += '<div class="portlet">'; list += '<div class="portlet">';
list += '<div class="backlog-list-header">'; list += '<div class="backlog-list-header">';
list += punchList[i].priority + '<div class=subject>' + punchList[i].subject + '</div>'; list += '<div class="one column">' +punchList[i].priority + '</div><div class="ten columns subject">' + punchList[i].subject + '</div>';
list += '<div class="two columns ' + style + '">' + punchList[i].progress + '</div>'; list += '<div class="two columns ' + style + '">' + punchList[i].progress + '</div>';
if (style === "inProgress") { if (style === "inProgress") {
list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=completePunch("' + punchList[i].uuid + '")>Finish</a></div>'; list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=completePunch("' + punchList[i].uuid + '")>Finish</a></div>';
@ -114,7 +115,7 @@ function genList(punchList, element) {
} }
if ( (new Date(punchList[i].nDate).getTime() - new Date().getTime()) <= 0 ) { if ( (new Date(punchList[i].nDate).getTime() - new Date().getTime()) <= 0 ) {
console.log('overdue'); console.log('overdue');
list += '<div class="two columns punch-default overdue">OVERDUE</div>'; list += '<div class="two columns punch-default overdue">OVER DUE</div>';
} else if ( ((new Date(punchList[i].nDate).getTime() - new Date().getTime()) / 1000) <= 259200 ) { } else if ( ((new Date(punchList[i].nDate).getTime() - new Date().getTime()) / 1000) <= 259200 ) {
console.log('due soon'); console.log('due soon');
list += '<div class="two columns punch-default duesoon">DUE SOON</div>'; list += '<div class="two columns punch-default duesoon">DUE SOON</div>';
@ -148,7 +149,7 @@ function genList(punchList, element) {
list += '<li class="' + style + '">'; list += '<li class="' + style + '">';
list += '<div class="portlet">'; list += '<div class="portlet">';
list += '<div class="backlog-list-header">'; list += '<div class="backlog-list-header">';
list += punchList[i].priority + '<div class=subject>' + punchList[i].subject + '</div>'; list += '<div class="one column">' +punchList[i].priority + '</div><div class=subject>' + punchList[i].subject + '</div>';
list += '<div class="two columns ' + style + '">' + punchList[i].progress + '</div>'; list += '<div class="two columns ' + style + '">' + punchList[i].progress + '</div>';
if (style === "inProgress") { if (style === "inProgress") {
list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=completePunch("' + punchList[i].uuid + '")>Finish</a></div>'; list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=completePunch("' + punchList[i].uuid + '")>Finish</a></div>';
@ -162,7 +163,7 @@ function genList(punchList, element) {
} }
if ( (new Date(punchList[i].nDate).getTime() - new Date().getTime()) <= 0 ) { if ( (new Date(punchList[i].nDate).getTime() - new Date().getTime()) <= 0 ) {
console.log('overdue'); console.log('overdue');
list += '<div class="two columns punch-default overdue">OVERDUE</div>'; list += '<div class="two columns punch-default overdue">OVER DUE</div>';
} else if ( ((new Date(punchList[i].nDate).getTime() - new Date().getTime()) / 1000) <= 259200 ) { } else if ( ((new Date(punchList[i].nDate).getTime() - new Date().getTime()) / 1000) <= 259200 ) {
console.log('due soon'); console.log('due soon');
list += '<div class="two columns punch-default duesoon">DUE SOON</div>'; list += '<div class="two columns punch-default duesoon">DUE SOON</div>';
@ -215,7 +216,7 @@ function mkSortable() {
$( ".portlet" ) $( ".portlet" )
.addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" ) .addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
.find( ".backlog-list-header" ) .find( ".backlog-list-header" )
.addClass( "ui-widget-header ui-corner-all" ) .addClass( "ui-corner-all" )
.prepend( "<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>"); .prepend( "<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>");
$( ".portlet-toggle" ).on( "click", function() { $( ".portlet-toggle" ).on( "click", function() {
@ -533,7 +534,6 @@ function signOut() {
getJson(); getJson();
document.getElementById("versionInfo").innerHTML = version;
$('li').on("click", function(event){ $('li').on("click", function(event){
var target = event.target, var target = event.target,

View File

@ -30,8 +30,8 @@
} }
.ui-widget-content { background: #000; color: #aaa;} .ui-widget-content { background: #000; color: #aaa;}
.ui-widget-header { background: #333; color: #aaa;} .ui-widget-header { background: #333; color: #aaa;}
a.punch-default { color: #aaa; font-size: 12px; text-decoration: none;} a.punch-default { color: #00BFFF; font-size: 12px; text-decoration: none;}
a.punch-default:hover { color: #00FFFF; } a.punch-default:hover { color: #00FFFF; text-shadow: 0px 0px 23px #FFF; }
.punch-default { border: 0px solid #AAA; color: #aaa; font-size: 12px; } .punch-default { border: 0px solid #AAA; color: #aaa; font-size: 12px; }
.inProgress { color: orange; font-size: 12px; } .inProgress { color: orange; font-size: 12px; }
.overdue { color: red; } .overdue { color: red; }
@ -45,6 +45,9 @@ a.punch-default:hover { color: #00FFFF; }
.edit-text-box { width: 100%; min-height: 200px; font-size: 12px; } .edit-text-box { width: 100%; min-height: 200px; font-size: 12px; }
.ui-widget textarea { font-size: 12px; } .ui-widget textarea { font-size: 12px; }
body { body {
width: 90%;
margin-left: auto;
margin-right: auto;
background: #222; background: #222;
color: #AAA; } color: #AAA; }
textarea { textarea {
@ -164,6 +167,7 @@ textarea {
.punches-current { .punches-current {
background: #555; } background: #555; }
.subject { .subject {
overflow: hidden;
width: 89%; width: 89%;
float: left; float: left;
color: #FFF; color: #FFF;

View File

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