cleanup
This commit is contained in:
parent
856bd80eab
commit
5054e68361
|
@ -14,7 +14,7 @@
|
|||
</head>
|
||||
<body onLoad="getJson()">
|
||||
|
||||
<textarea id="data" rows="200" cols="200"></textarea><br />
|
||||
<textarea id="data"></textarea><br />
|
||||
<input onClick="getJson()" id="getJson" type="button" value="Get" />
|
||||
<input onClick="putJson()" id="put" type="button" value="Put" />
|
||||
<input onClick="test()" id="test" type="button" value="test" />
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
var events = [
|
||||
{
|
||||
"date": "May 30, 2019 10:00:00",
|
||||
"subject": "Create TD for Splunk Forwarder",
|
||||
"notes": "W-6121588<br />at-mention Ben Kohler"
|
||||
},
|
||||
{
|
||||
"date": "May 30, 2019 10:15:00",
|
||||
"subject": "follow up w/ monitoring team",
|
||||
"notes": "<a href='https://gus.my.salesforce.com/0D5B000000sOpB6?fromEmail=1&s1oid=00DT0000000Dpvc&s1nid=000000000000000&s1uid=005B00000018dFP&s1ext=0&emkind=chatterCommentNotification&emtm=1559179844117'>GUS</a>"
|
||||
},
|
||||
{
|
||||
"date": "May 31, 2019 10:00:00",
|
||||
"subject": "Get Backlog Prioritized",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "May 30, 2019 14:00:00",
|
||||
"subject": "Andy's Sheet for CapAdd",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "May 31, 2019 14:30:00",
|
||||
"subject": "TD's for JS vuln",
|
||||
"notes": "https://github.exacttarget.com/tholt/jvmversions results repo<br /> need access"
|
||||
},
|
||||
{
|
||||
"date": "May 30, 2019 13:30:00",
|
||||
"subject": "Review Epics on Release",
|
||||
"notes": ""
|
||||
},
|
||||
// Jun 3
|
||||
{
|
||||
"date": "June 03, 2019 08:30:00",
|
||||
"subject": "Linux Lottery Scenario Run-through",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "June 03, 2019 11:15:00",
|
||||
"subject": "DSU",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "June 03, 2019 14:30:00",
|
||||
"subject": "1:1",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "June 03, 2019 15:00:00",
|
||||
"subject": "GUS Template Help",
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
"date": "June 28, 2019 10:00:00",
|
||||
"subject": "Linux Lottery Scenario Retro",
|
||||
"notes": ""
|
||||
}
|
||||
]
|
|
@ -1,99 +0,0 @@
|
|||
|
||||
var countDownDate;
|
||||
var now, distance;
|
||||
var days, hours, minutes, seconds;
|
||||
var style = "green"; // reset style
|
||||
var r;
|
||||
aLen = events.length;
|
||||
|
||||
function countdown(targetDate, current) {
|
||||
|
||||
countDownDate = new Date(targetDate).getTime();
|
||||
now = new Date().getTime();
|
||||
distance = countDownDate - now;
|
||||
|
||||
if (current === "current") {
|
||||
var nextCountDownDate = new Date(nextDate).getTime();
|
||||
var nextDistance = nextCountDownDate - now;
|
||||
var nextDays = Math.floor(nextDistance / (1000 * 60 * 60 * 24));
|
||||
var nextHours = Math.floor((nextDistance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var nextMinutes = Math.floor((nextDistance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var nextSeconds = Math.floor((nextDistance % (1000 * 60)) / 1000);
|
||||
}
|
||||
|
||||
days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
||||
hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
|
||||
|
||||
// set style for countdown based on remaining time
|
||||
style = "green"; // reset style
|
||||
|
||||
if (current === "current") {
|
||||
style = 'current';
|
||||
} else {
|
||||
if (days < 1 && hours < 1) {
|
||||
if (minutes < 0) {
|
||||
style = 'over';
|
||||
} else if (minutes < 15) {
|
||||
style = 'warn';
|
||||
} else {
|
||||
style = 'green';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (days < 0) {
|
||||
days = (-days);
|
||||
days--;
|
||||
}
|
||||
|
||||
// Day or Days?
|
||||
if (days > 0) {
|
||||
if (days === 1){
|
||||
rDays = (days + ' Day ');
|
||||
} else {
|
||||
rDays = (days + ' Days ');
|
||||
}
|
||||
} else {
|
||||
rDays = '';
|
||||
}
|
||||
|
||||
// pad single digits with a '0' prefix
|
||||
// when time is out, start counting up by inverting
|
||||
if (hours < 0) {
|
||||
hours = (-hours);
|
||||
hours--;
|
||||
}
|
||||
if (hours < 10 && hours >= 0) {
|
||||
hours = ('0' + hours);
|
||||
}
|
||||
|
||||
if (minutes < 0) {
|
||||
minutes = (-minutes);
|
||||
minutes--;
|
||||
}
|
||||
if (minutes < 10 && minutes >= 0) {
|
||||
minutes = ('0' + minutes);
|
||||
}
|
||||
|
||||
if (seconds < 0) {
|
||||
seconds = (-seconds);
|
||||
seconds--;
|
||||
}
|
||||
if (seconds < 10 && seconds >= 0) {
|
||||
seconds = ('0' + seconds);
|
||||
}
|
||||
|
||||
if (initialized === false && distance < 0) {
|
||||
incArray();
|
||||
} else if (initialized === false) {
|
||||
initialized = true;
|
||||
decArray();
|
||||
}
|
||||
|
||||
var r = "<div class=" + style + ">" + rDays + hours + ":" + minutes + ":" + seconds + "</div>";
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue