initial commit

This commit is contained in:
Brian McGonagill 2022-08-04 19:50:18 -05:00
parent b7c7d8b449
commit 750811a81f
52 changed files with 25204 additions and 92 deletions

View file

@ -0,0 +1,28 @@
<template name="home">
<div class="container">
<h1>Welcome to Parent Pickup</h1>
<h3>Goals</h3>
<ul class="collapsible">
<li>
<div class="collapsible-header"><h5><i class="material-icons">child_care</i>Child Safety</h5></div>
<div class="collapsible-body"><span>The safety of our children.</span></div>
</li>
<li>
<div class="collapsible-header"><h5><i class="material-icons">people_outline</i>Identify Safe Pickup People</h5></div>
<div class="collapsible-body"><span>Identify safe persons allowed to pick up your child(ren) from school.</span></div>
</li>
<li>
<div class="collapsible-header"><h5><i class="material-icons">person_outline</i>Identify Safe Visitors</h5></div>
<div class="collapsible-body"><span>Idntify safe persons allowed to visit / interact with your child(ren) at school functions / events.</span></div>
</li>
<li>
<div class="collapsible-header"><h5><i class="material-icons">directions_car</i>Identify Safe Vehicles</h5></div>
<div class="collapsible-body"><span>Identify safe vehicles used to pick up your child(ren) from school.</span></div>
</li>
<li>
<div class="collapsible-header"><h5><i class="material-icons">mood_bad</i>Identify Potential Threats</h5></div>
<div class="collapsible-body"><span>No one likes to talk about threats to our children's safety, but identification of a potential threat can help law enforcement, Staff, and Parents / Guardians remove a threat more effectively.</span></div>
</li>
</ul>
</div>
</template>

View file

@ -0,0 +1,15 @@
Template.home.onCreated(function() {
});
Template.home.onRendered(function() {
$('.collapsible').collapsible();
});
Template.home.helpers({
});
Template.home.events({
});

View file

@ -0,0 +1,4 @@
<template name="messageView">
<h2>Messages</h2>
<p>This is where messages will go once it's built out.</p>
</template>

View file

@ -0,0 +1,17 @@
Template.messageView.onCreated(function() {
});
Template.messageView.onRendered(function() {
});
Template.messageView.helpers({
});
Template.messageView.events({
});

View file

@ -0,0 +1,8 @@
.padMe {
margin-left: 5px;
margin-right: 5px;
}
i.icon-red {
color: red;
}

View file

@ -0,0 +1,57 @@
<template name="headerBar">
<ul id="dropLogin" class="dropdown-content">
<li><a href="#!" id="adminmainlogin" class="navBtn">Admin</a></li>
<li><a href="#!" id="teachlogin" class="navBtn">Teacher</a></li>
<li><a href="#!" id="parguarlogin" class="navBtn">Parent / Guardian</a></li>
<li><a href="#!" id="monlogin" class="navBtn">Monitor</a></li>
</ul>
<nav>
<div class="nav-wrapper blue darken-4">
<a href="#" class="brand-logo" id="brandLogo">Parent Pickup</a>
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
{{#if currentUser}}
<!-- System Admins -->
{{#if isInRole "systemadmin"}}
<li><a href="#" id="createServiceEntity" class="navBtn">Create New Service Entity</a></li>
{{/if}}
<!-- For Parents / Guardians -->
{{#if isInRole "parent"}}
<li><a href="#">Add Trusted People</a></li>
<li><a href="#">Add Trusted Vehicles</a></li>
<li><a href="#">Add Cautions</a></li>
{{/if}}
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
{{else}}
<li><a class="dropdown-trigger" href="#!" data-target="dropLogin">Login Options<i class="material-icons right">arrow_drop_down</i></a></li>
{{/if}}
</ul>
</div>
</nav>
<ul class="sidenav" id="mobile-demo">
{{#if currentUser}}
<!-- System Admins -->
{{#if isInRole "systemadmin"}}
<li><a href="#" id="createServiceEntity" class="navBtn">Create New Service Entity</a></li>
{{/if}}
<!-- For Parents / Guardians -->
{{#if isInRole "parent"}}
<li><a href="#">Add Trusted People</a></li>
<li><a href="#">Add Trusted Vehicles</a></li>
<li><a href="#">Add Cautions</a></li>
{{/if}}
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
{{else}}
<li><a href="#!" id="adminmainlogin" class="navBtn">Admin</a></li>
<li><a href="#!" id="teachlogin" class="navBtn">Teacher</a></li>
<li><a href="#!" id="parguarlogin" class="navBtn">Parent / Guardian</a></li>
<li><a href="#!" id="monlogin" class="navBtn">Monitor</a></li>
{{/if}}
</ul>
</template>

View file

@ -0,0 +1,41 @@
Template.headerBar.onCreated(function() {
});
Template.headerBar.onRendered(function() {
$('.sidenav').sidenav();
setTimeout(function() {
$('.sidenav').sidenav();
$(".dropdown-trigger").dropdown();
}, 100)
$(".dropdown-trigger").dropdown();
});
Template.headerBar.helpers({
adminReg: function() {
return Session.get("adminreg");
},
});
Template.headerBar.events({
'click .navBtn' (event) {
event.preventDefault();
var clickedTarget = event.target.id;
console.log("clicked " + clickedTarget);
if (clickedTarget == 'mainMenu') {
FlowRouter.go('/');
} else {
console.log("should be going to /" + clickedTarget);
FlowRouter.go('/' + clickedTarget);
}
},
'click .signOut': () => {
FlowRouter.go('/');
Meteor.logout();
},
'click #brandLogo' (event) {
event.preventDefault();
FlowRouter.go('/dashboard');
},
});

View file

@ -0,0 +1,65 @@
/* The Modal (background) */
.mymodal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 10; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100vh; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content */
.mymodal-content {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #888;
width: 80%;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
@keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
/* The Close Button */
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.mymodal-header, .mymodal-footer {
padding: 2px 16px;
background-color: #4169e1;
color: white;
}
.mymodal-body {
padding: 2px 16px;
}

View file

@ -0,0 +1,16 @@
<template name="myModal">
<div id="genModal" class="modal mymodal">
<div class="mymodal-content">
<div class="mymodal-header">
<h4>{{modalHeader}}</h4>
</div>
<div class="mymodal-body">
<p class="flow-text">{{modalBody}}</p>
</div>
<div class="mymodal-footer">
<a href="#" id="cancel" class="modal-close waves-effect waves-orange btn-flat white-text">Cancel</a>
<a href="#" id="continue" class="waves-effect waves-green btn-flat white-text">Continue</a>
</div>
</div>
</div>
</template>

View file

@ -0,0 +1,41 @@
Template.myModal.onCreated(function() {
});
Template.myModal.onRendered(function() {
$('.modal').modal();
});
Template.myModal.helpers({
modalHeader: function() {
return Session.get("confirmationDialogTitle");
},
modalBody: function() {
return Session.get("confirmationDialogContent");
}
});
Template.myModal.events({
'click #continue' (event) {
event.preventDefault();
let callFunction = Session.get("eventConfirmCallBackFunction");
let functionPassId = Session.get("eventConfirmNecessaryId"); // <-- this can be an actual ID, an object, a function, whatever...
if (functionPassId == "disallowCom") {
$("#genModal").modal('close');
return;
} else {
$("#genModal").modal('close');
window[callFunction](functionPassId); // <-- calls the function and passed the Id on confirm.
}
},
'click #cancel' (event) {
event.preventDefault();
$("#genModal").modal('close');
},
});

View file

@ -0,0 +1,71 @@
#snackbar {
visibility: hidden;
min-width: 250px;
margin-left: -125px;
background-color: #93b7d6;
color: #fff;
text-align: center;
border-radius: 4px;
padding: 16px;
position: fixed;
z-index: 22;
left: 50%;
bottom: 30px;
font-size: 17px;
}
#snackbar.shadow {
min-width: 250px;
padding: 15px;
box-shadow: -5px 7px 8px #2f2f2f;
}
#snackbar.show {
visibility: visible;
-webkit-animation: fadein 0.5s, fadeout 0.5s 4.0s;
animation: fadein 0.5s, fadeout 0.5s 4.0s;
}
@-webkit-keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
@keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}

View file

@ -0,0 +1,3 @@
<template name="snackbar">
<div class="snackbar shadow" id="snackbar"></div>
</template>

View file

@ -0,0 +1,11 @@
// This is called to display a temporary message to the user at the bottom of the screen
showSnackbar = function(snackbarText, snackbarColor) {
var snackbarNotification = document.getElementById("snackbar");
snackbarNotification.innerHTML = snackbarText;
snackbarNotification.style.backgroundColor = snackbarColor;
snackbarNotification.className = "show";
setTimeout(function() {
snackbarNotification.className = snackbarNotification.className.replace("show", "");
}, 4000)
}