diff --git a/admin/admin.js b/admin/admin.js index b7547d3..abd1c7b 100644 --- a/admin/admin.js +++ b/admin/admin.js @@ -2,6 +2,10 @@ function externalOnLoad() { verify(); timeChange(); updatePage(); + readData("company", function(data) { + document.getElementById("alphacurrentpoints").innerHTML = data.alphapoints + document.getElementById("bravocurrentpoints").innerHTML = data.bravopoints + }); window.setInterval(verify(),1000); } diff --git a/admin/firebasescript.js b/admin/firebasescript.js index 121e5bd..512bbe5 100644 --- a/admin/firebasescript.js +++ b/admin/firebasescript.js @@ -1,4 +1,27 @@ // JROTC Firebase Interaction Script +// Bravo Company Comment Send +function bravoComment() { + sendData("company/bravocomments",document.getElementById("bravocomments").value) + document.getElementById('bravocomments').value = ''; +} +// Alpha Company Comment Send +function alphaComment() { + sendData("company/alphacomments",document.getElementById("alphacomments").value) + document.getElementById('alphacomments').value = ''; +} +// Commanders Cup Point Send +function alphaSend() { + sendData("company/alphapoints", document.getElementById("alpha").value); + document.getElementById('alpha').value = ''; +} + +// Bravo Point Send +function bravoSend() { + sendData("company/bravopoints", document.getElementById("bravo").value); + document.getElementById('bravo').value = ''; +} + + // Time Change Function (Global) function timeConvert(timestring) { var year = timestring.substring(0,4) @@ -69,14 +92,4 @@ function eventSend() { document.getElementById('location').value = ''; //document.getElementById('event').value = ''; document.getElementById('custommessage').value = ''; -} - -function cupSend() { - var array = { - Alpha: document.getElementById("alpha").value, - Bravo: document.getElementById("bravo").value - } - sendData("commanderscup/", array); - document.getElementById('alpha').value = ''; - document.getElementById('bravo').value = ''; } \ No newline at end of file diff --git a/admin/index.html b/admin/index.html index f51a549..c6b47fe 100644 --- a/admin/index.html +++ b/admin/index.html @@ -125,9 +125,7 @@
roomLoading...
- - Go to Calendar - +
(Preview)
event
@@ -135,6 +133,59 @@ + + + + + + +
+
+
+ Alpha Company Points:
+

+ Current: +

+

+
Loading

+ New Point Total: +
+
+ Comments:
+
+ +
+
+
+
+
+ Push Notification +
+
+ Login with NokomisJROTC Google Account to Push Notifications
+ +
+
+
+
+
+ Bravo Company Points:
+

+ Current: +

+

+
Loading

+ New Point Total: +
+
+ Comments:
+
+ +
+
+
diff --git a/alpha.png b/alpha.png new file mode 100644 index 0000000..3f031a9 Binary files /dev/null and b/alpha.png differ diff --git a/bravo.png b/bravo.png new file mode 100644 index 0000000..2e1f765 Binary files /dev/null and b/bravo.png differ diff --git a/companies/alpha.html b/companies/alpha.html new file mode 100644 index 0000000..f4448ab --- /dev/null +++ b/companies/alpha.html @@ -0,0 +1,112 @@ + + + + Nokomis JROTC - Alpha Company + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + Alpha Company + +
+
+
+
+

+ Alpha Company +

+ + + + + + +
+
+
+ Documents: +
+
+ +
+
+
+
+
+ Event: +
+
+ +
+
+
+
+
+ Company Information and Commanders Comments: +
+
+
No Comment.


+ Current Commanders Cup Points:
+

+
+ Loading... +

+
+
+
+
+
+ + + \ No newline at end of file diff --git a/companies/bravo.html b/companies/bravo.html new file mode 100644 index 0000000..26cf83a --- /dev/null +++ b/companies/bravo.html @@ -0,0 +1,112 @@ + + + + Nokomis JROTC - Bravo Company + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + Bravo Company + +
+
+
+
+

+ Bravo Company +

+ + + + + + +
+
+
+ Documents: +
+
+ +
+
+
+
+
+ Event: +
+
+ +
+
+
+
+
+ Company Information and Commanders Comments: +
+
+
No Comment.


+ Current Commanders Cup Points:
+

+
+ Loading... +

+
+
+
+
+
+ + + \ No newline at end of file diff --git a/companies/script.js b/companies/script.js new file mode 100644 index 0000000..b16c5ee --- /dev/null +++ b/companies/script.js @@ -0,0 +1,32 @@ +function alphaCompanyOnLoad() { + // Initialize Firebase + var config = { + apiKey: "AIzaSyB0keF26uKYDOR2o-8HYkgoOGWhsPyHdkg", + authDomain: "jrotc-database.firebaseapp.com", + databaseURL: "https://jrotc-database.firebaseio.com", + projectId: "jrotc-database", + storageBucket: "jrotc-database.appspot.com", + messagingSenderId: "787128694744" + }; + firebase.initializeApp(config); + setData("company","alphacomments","alphacomments"); + readData("company", function(data) { + document.getElementById("alphacurrentpoints").innerHTML = data.alphapoints + }); +} +function bravoCompanyOnLoad() { + // Initialize Firebase + var config = { + apiKey: "AIzaSyB0keF26uKYDOR2o-8HYkgoOGWhsPyHdkg", + authDomain: "jrotc-database.firebaseapp.com", + databaseURL: "https://jrotc-database.firebaseio.com", + projectId: "jrotc-database", + storageBucket: "jrotc-database.appspot.com", + messagingSenderId: "787128694744" + }; + firebase.initializeApp(config); + setData("company","bravocomments","bravocomments"); + readData("company", function(data) { + document.getElementById("bravocurrentpoints").innerHTML = data.bravopoints + }); +} \ No newline at end of file diff --git a/css/style.css b/css/style.css index 53c15a5..9e689dc 100644 --- a/css/style.css +++ b/css/style.css @@ -75,6 +75,18 @@ table { background-color: white; } +.alphacompany > .mdl-card__title { + color: #000; + background: url('../alpha.png') bottom right 15% no-repeat #46B6AC; + background-color: white; +} + +.bravocompany > .mdl-card__title { + color: #000; + background: url('../bravo.png') bottom right 15% no-repeat #46B6AC; + background-color: white; +} + .calendar.mdl-card { width: 320px; height: 320px; diff --git a/index.html b/index.html index b39a817..503a017 100644 --- a/index.html +++ b/index.html @@ -154,6 +154,38 @@ + +
+
+

Alpha Company

+
+
+ Information about Alpha Company is located here. +
+
+ + Enter + +
+
+ + +
+
+

Bravo Company

+
+
+ Information about Bravo Company is located here. +
+
+ + Enter + +
+
+ + +
@@ -169,8 +201,6 @@
- -