changes
This commit is contained in:
parent
7afb36c109
commit
532e297bc4
|
@ -3,7 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<!-- Font -->
|
<!-- Font -->
|
||||||
<!-- <link href='http://fonts.googleapis.com/css?family=Raleway:400,300,600' rel='stylesheet' type='text/css'> -->
|
<link href='https://fonts.googleapis.com/css?family=Raleway:400,300,600' rel='stylesheet' type='text/css'>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/datepicker.min.css">
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||||
|
@ -20,19 +21,14 @@
|
||||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||||
<script src="metadata.js"></script>
|
<script src="metadata.js"></script>
|
||||||
<script src="backlogManage.js"></script>
|
<script src="backlogManage.js"></script>
|
||||||
|
<script src="js/datepicker.min.js"></script>
|
||||||
|
<script src="js/i18n/datepicker.en.js"></script>
|
||||||
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
||||||
<script>
|
|
||||||
$( function() {
|
|
||||||
$( "#sortable" ).sortable();
|
|
||||||
$( "#sortable" ).disableSelection();
|
|
||||||
} );
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<button class="button" onClick="disableElement('punchListAll'), disableElement('punchDetail'), enableElement('newEvent')" id="put">New Punch Item</button>
|
<button class="button" onClick="genEventForm()" id="put">New Punch Item</button>
|
||||||
<button class="button" onClick="genDaily()" id="daily">Gen Daily</button>
|
<button class="button" onClick="genDaily()" id="daily">Gen Daily</button>
|
||||||
<button class="button" onClick="genWeekly()" id="daily">Gen Weekly</button>
|
<button class="button" onClick="genWeekly()" id="daily">Gen Weekly</button>
|
||||||
<button class="button" onClick="getJson(genList)" id="getJson">Refresh</button>
|
<button class="button" onClick="getJson(genList)" id="getJson">Refresh</button>
|
||||||
|
@ -48,6 +44,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="container row" id="newEvent">
|
||||||
|
<input onfocus="clearDefault(this)" class="u-full-width" type="text" id="newSubject" value="subject">
|
||||||
|
<input onfocus="clearDefault(this)" class="u-full-width" type="text" id="newPriority" value="priority">
|
||||||
|
<input type="hidden" id="newProgress" value="new">
|
||||||
|
<input onfocus="clearDefault(this)" type="text" id="timepickerCreate" class="datepicker-here u-full-width" data-timepicker="true" data-language="en" value="date">
|
||||||
|
Notes:<br />
|
||||||
|
<textarea class="u-full-width" id="newNotes" value=""></textarea>
|
||||||
|
<input class="u-full-width" onClick="createNewEvent()" id="test" type="button" value="Create" />
|
||||||
|
<input class="u-full-width" onClick="disableElement('newEvent'),enableElement('punchListAll')" id="nevermind" type="button" value="Nevermind." />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="debug1"></div>
|
<div id="debug1"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -104,12 +104,27 @@ function genList(punchList, element) {
|
||||||
} else if (style === "punch-default") {
|
} else if (style === "punch-default") {
|
||||||
list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=startPunch("' + punchList[i].uuid + '")>Start</a></div>';
|
list += '<div class="two columns ' + style + '"><a class="punch-default" href="#" onClick=startPunch("' + punchList[i].uuid + '")>Start</a></div>';
|
||||||
}
|
}
|
||||||
|
//console.log("Need by " + new Date(punchList[i].nDate).getTime());
|
||||||
|
//console.log("Now " + new Date().getTime());
|
||||||
|
//console.log("gap " + (new Date(punchList[i].nDate).getTime() - new Date().getTime()));
|
||||||
|
list += '<div class="three columns punch-default">' + punchList[i].nDate + '</div>';
|
||||||
|
if ( (new Date(punchList[i].nDate).getTime() - new Date().getTime()) <= 0 ) {
|
||||||
|
list += '<div class="two columns punch-default overdue">OVERDUE</div>';
|
||||||
|
}
|
||||||
list += '</div>';
|
list += '</div>';
|
||||||
list += '<div class="backlog-list-content"><div style="punch-list-backlog-details">' + punchList[i].progress + '<br />';
|
list += '<div class="backlog-list-content"><div style="punch-list-backlog-details">';
|
||||||
list += 'Created: ' + punchList[i].cDate + '<br /> ';
|
// list += punchList[i].progress + '<br />';
|
||||||
list += 'Modified: ' + punchList[i].mDate + '<br />';
|
// list += 'Created: ' + punchList[i].cDate + '<br /> ';
|
||||||
list += 'Tags: ' + punchList[i].tags + '<br />';
|
// list += 'Modified: ' + punchList[i].mDate + '<br />';
|
||||||
list += '<textarea>' + punchList[i].notes + '</textarea><br />';
|
if ( punchList[i].nDate > "" ) {
|
||||||
|
list += '<div class="two columns punch-default">Needed By:</div><div class="ten columns punch-default">' + punchList[i].nDate + '</div>';
|
||||||
|
}
|
||||||
|
if ( punchList[i].tags != undefined && punchList[i].tags != [] ) {
|
||||||
|
list += '<div class="two columns punch-default">Tags:</div><div class="ten columns punch-default">' + punchList[i].tags + '</div>';
|
||||||
|
}
|
||||||
|
if ( punchList[i].notes != "" ) {
|
||||||
|
list += '<textarea class="edit-text-box" readonly>' + punchList[i].notes + '</textarea><br />';
|
||||||
|
}
|
||||||
list += '<button class="button" onClick=editPunch("' + punchList[i].uuid + '")>edit</button>';
|
list += '<button class="button" onClick=editPunch("' + punchList[i].uuid + '")>edit</button>';
|
||||||
list += '</div></div></div></li>';
|
list += '</div></div></div></li>';
|
||||||
}
|
}
|
||||||
|
@ -205,6 +220,17 @@ function enablePunchDetail(uuid) {
|
||||||
document.getElementById("punchDetail").innerHTML = html;
|
document.getElementById("punchDetail").innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function genEventForm() {
|
||||||
|
|
||||||
|
document.getElementById("newSubject").value = "subject";
|
||||||
|
document.getElementById("newPriority").value = "priority";
|
||||||
|
document.getElementById("timepickerCreate").value = "date";
|
||||||
|
document.getElementById("newNotes").value = '';
|
||||||
|
|
||||||
|
disableElement('punchListAll');
|
||||||
|
enableElement('newEvent');
|
||||||
|
}
|
||||||
|
|
||||||
function createNewEvent() {
|
function createNewEvent() {
|
||||||
/* Before doing this,
|
/* Before doing this,
|
||||||
Refresh the array,
|
Refresh the array,
|
||||||
|
@ -326,6 +352,10 @@ function editPunch(uuid) {
|
||||||
punchList = window.punches;
|
punchList = window.punches;
|
||||||
item = findArrayId(uuid);
|
item = findArrayId(uuid);
|
||||||
|
|
||||||
|
if ( punchList[item].tags === undefined ) {
|
||||||
|
punchList[item].tags = [];
|
||||||
|
}
|
||||||
|
|
||||||
var id = item;
|
var id = item;
|
||||||
|
|
||||||
var subject = punchList[id].subject;
|
var subject = punchList[id].subject;
|
||||||
|
@ -404,7 +434,7 @@ getJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearDefault(a){
|
function clearDefault(a){
|
||||||
if (a.defaultValue == a.value) {
|
if (a.defaultValue === a.value) {
|
||||||
a.value="";
|
a.value="";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,17 +30,20 @@ a.punch-default { color: #aaa; font-size: 12px; text-decoration: none;}
|
||||||
a.punch-default:hover { color: #00FFFF; }
|
a.punch-default:hover { color: #00FFFF; }
|
||||||
.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; }
|
||||||
.hide { display: none; }
|
.hide { display: none; }
|
||||||
.punch-list-backlog-details {
|
.punch-list-backlog-details {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
.edit-row { padding-top: 5px; }
|
.edit-row { padding-top: 5px; }
|
||||||
.edit-text-box { width: 100%; min-height: 200px; }
|
.edit-text-box { width: 100%; min-height: 200px; font-size: 12px; }
|
||||||
|
.ui-widget textarea { font-size: 12px; }
|
||||||
body {
|
body {
|
||||||
background: #222;
|
background: #222;
|
||||||
color: #AAA; }
|
color: #AAA; }
|
||||||
textarea {
|
textarea {
|
||||||
|
font-size: 12px;
|
||||||
background: #111;
|
background: #111;
|
||||||
width:80%;
|
width:80%;
|
||||||
height:50%;
|
height:50%;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var version = "0.5.329",
|
var version = "0.5.332",
|
||||||
debug = false,
|
debug = false,
|
||||||
jsonUrl = "https://api.myjson.com/bins/1dodsj",
|
jsonUrl = "https://api.myjson.com/bins/1dodsj",
|
||||||
showDone = false,
|
showDone = false,
|
||||||
|
|
Loading…
Reference in New Issue