diff --git a/formationstatus.html b/formationstatus.html
index 3ff7d31..c8fcba1 100644
--- a/formationstatus.html
+++ b/formationstatus.html
@@ -24,7 +24,9 @@
firebase.initializeApp(config);
-
-The next formation is on loading... in the loading... during loading.... You are to wear the loading... uniform.
+
+
+ Loading...
+
diff --git a/js/script.js b/js/script.js
index 5ab90d3..665f413 100644
--- a/js/script.js
+++ b/js/script.js
@@ -1,5 +1,21 @@
// JROTC Firebase Interaction Script
-
+// Specific Webpage Scripts
+function formationOnLoad() {
+ var data = readData("nextEvent", function (data) {
+ if (data.Event == "UNI") {
+ console.log(data.Event)
+ document.getElementById("box").innerHTML = 'The next uniform day is on loading.... You are to wear the loading... uniform.';
+ setData("nextEvent","date","Date");
+ setData("nextEvent","uniform","Uniform");
+ } else {
+ document.getElementById("box").innerHTML = 'The next formation is on loading... in the loading... during loading.... You are to wear the loading... uniform.';
+ setData("nextEvent","date","Date");
+ setData("nextEvent","location","Location");
+ setData("nextEvent","time","Time");
+ setData("nextEvent","uniform","Uniform");
+ }
+ })
+ }
// Key Handles (allows enter key to be pressed to send)
@@ -13,18 +29,20 @@ function setKeyHandle (element, name) {
}
// Key handle sending functions
-function formationSend() {
+function eventSend() {
var array = {
+ Event: document.getElementById("event").value,
Date: document.getElementById("date").value,
Uniform: document.getElementById("uniformtype").value,
Location: document.getElementById('location').value,
Time: document.getElementById('time').value
}
- sendData("nextformation/", array);
+ sendData("nextEvent/", array);
document.getElementById('date').value = '';
document.getElementById('uniformtype').value = '';
document.getElementById('time').value = '';
document.getElementById('location').value = '';
+ document.getElementById('event').value = '';
}
function cupSend() {
var array = {
diff --git a/updatestatus.html b/updatestatus.html
index 565fa77..05caa3e 100644
--- a/updatestatus.html
+++ b/updatestatus.html
@@ -21,12 +21,13 @@
document.getElementById("alphacurrentpoints").innerHTML = data.Alpha
document.getElementById("bravocurrentpoints").innerHTML = data.Bravo
});
- setKeyHandle("uniformtype",formationSend);
- setKeyHandle("date",formationSend);
- setKeyHandle("time",formationSend);
- setKeyHandle("location",formationSend);
+ setKeyHandle("uniformtype",eventSend);
+ setKeyHandle("date",eventSend);
+ setKeyHandle("time",eventSend);
+ setKeyHandle("location",eventSend);
setKeyHandle("alpha",cupSend);
setKeyHandle("bravo",cupSend);
+ setKeyHandle("event",eventSend)
var x = document.getElementById("write-box")
x.style.display = 'none'
}
@@ -62,17 +63,20 @@
Consult this website for more information on how to enable popups on chrome.
Commanders Cup Points Update:
diff --git a/upload.sh b/upload.sh
index cb966ed..094e50b 100755
--- a/upload.sh
+++ b/upload.sh
@@ -3,6 +3,6 @@ echo "Starting Send..."
echo "Commit name:"
read name
git add *
-git commit -m $name
+git commit -m "$name"
git push
echo "Sent!"
\ No newline at end of file