This commit is contained in:
Yaman Qalieh 2016-10-22 16:11:19 -04:00
commit 0090f64d8e
9 changed files with 138 additions and 70 deletions

View File

@ -31,12 +31,6 @@ html {
pointer-events: all; pointer-events: all;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: color 0.5s ease; -webkit-transition: color 0.5s ease;
-moz-transition: color 0.5s ease; -moz-transition: color 0.5s ease;
-ms-transition: color 0.5s ease; -ms-transition: color 0.5s ease;
@ -86,6 +80,12 @@ body {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }
#mainHeader { #mainHeader {
@ -286,7 +286,7 @@ body {
filter: drop-shadow(2px 2px 5px #666); filter: drop-shadow(2px 2px 5px #666);
} }
.fa-plus, .fa-minus, .fa-tasks, .fa-graduation-cap, .fa-exchange { .noScroll .fa-plus, .creWork .fa-plus, .fa-minus, .fa-tasks, .fa-graduation-cap, .fa-exchange {
font-size: 130%; font-size: 130%;
padding: 5%; padding: 5%;
@ -349,7 +349,7 @@ body {
background-color: rgba(0,0,0,0.2); background-color: rgba(0,0,0,0.2);
} }
.sideClass, .sideFilter { .sideClass, .sideFilter, #exportDiv {
width: 100%; width: 100%;
height: 5vh; height: 5vh;
padding: 1.5vh; padding: 1.5vh;
@ -372,7 +372,7 @@ body {
width: 80%; width: 80%;
} }
.sideClass:hover, .sideFilter:hover { .sideClass:hover, .sideFilter:hover, #exportDiv:hover {
background-color: rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.3);
} }
@ -394,12 +394,12 @@ body {
display: inline-block; display: inline-block;
} }
.sideFilter { .sideFilter, #exportDiv {
height: auto; height: auto;
} }
.fa-dot-circle-o { .fa-dot-circle-o {
font-size: 3vh; font-size: 1.1vw;
color: #53BD42; color: #53BD42;
float: right; float: right;
@ -658,7 +658,7 @@ textarea.clickModify {
} }
.clickModify.dropdown { .clickModify.dropdown {
font-size: 2.5vh; font-size: 1.2vw;
width: 100%; width: 100%;
border: 1px solid #999797; border: 1px solid #999797;
@ -685,7 +685,7 @@ textarea.clickModify {
} }
.fa-caret-down { .fa-caret-down {
font-size: 2.2vh; font-size: 1.1vw;
text-align: right; text-align: right;
pointer-events: none; pointer-events: none;
} }
@ -909,9 +909,11 @@ textarea.clickModify {
height: auto; height: auto;
position: fixed; position: fixed;
top: 0; top: 50%;
left: 0; left: 50%;
z-index: -1; z-index: -1;
transform:translate(-50%, -50%);
} }
#mainBody { #mainBody {
@ -1126,10 +1128,6 @@ textarea.clickModify {
width: 70%; width: 70%;
} }
.inputRadioPref {
margin-top: 6%;
}
#workComment { #workComment {
width: 99%; width: 99%;
margin-bottom: 3%; margin-bottom: 3%;
@ -1355,14 +1353,14 @@ textarea.clickModify {
#userDropdownAvatar { #userDropdownAvatar {
width: 100%; width: 100%;
height: 16vh; height: 10vw;
position: relative; position: relative;
} }
#userDropdownAvatar img { #userDropdownAvatar img {
width: 9vh; width: 6vw;
height: 9vh; height: 6vw;
margin: -6.5vh 0 0 -5.25vh; margin: -4vw 0 0 -3vw;
-moz-border-radius: 50%; -moz-border-radius: 50%;
-webkit-border-radius: 50%; -webkit-border-radius: 50%;
@ -1374,10 +1372,10 @@ textarea.clickModify {
} }
#userDropdownAvatar p { #userDropdownAvatar p {
font-size: 2.4vh; font-size: 1.2vw;
width: 15vw; width: 15vw;
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
padding-top: 12.4vh; padding-top: 7.5vw;
text-align: center; text-align: center;
} }
@ -1387,7 +1385,7 @@ textarea.clickModify {
} }
.userFunction { .userFunction {
font-size: 2.5vh; font-size: 1.1vw;
width: 100%; width: 100%;
background-color: rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.3);
cursor: pointer; cursor: pointer;

View File

@ -54,7 +54,7 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div id="exportDiv" class="sideFilter"> <div id="exportDiv">
<i id="export" class="fa fa-download" aria-hidden="true"></i> <i id="export" class="fa fa-download" aria-hidden="true"></i>
<h4 id="exportText">Export</h4> <h4 id="exportText">Export</h4>
</div> </div>

View File

@ -947,6 +947,8 @@ function sendData(funcName) { // Call Meteor function, and do actions after func
Session.set("currentWork", work.findOne({ Session.set("currentWork", work.findOne({
_id: currWork._id _id: currWork._id
})); }));
} else {
Session.set("currentWork",null);
} }
}); });
} }

View File

@ -6,7 +6,7 @@
} }
.profTitle { .profTitle {
font-size: 3vh; font-size: 1.5vw;
font-weight: 400; font-weight: 400;
margin: 0; margin: 0;
margin-bottom: 1%; margin-bottom: 1%;
@ -14,7 +14,8 @@
} }
.profHea { .profHea {
font-size: 5.5vh; margin: 0;
font-size: 3vw;
font-weight: 200; font-weight: 200;
padding: 6% 6% 0 8%; padding: 6% 6% 0 8%;
} }
@ -44,10 +45,9 @@
} }
#profAvatar { #profAvatar {
height: 27vh; height: 45%;
width: 27vh;
border: 10px solid #0D0D0D; border: 7px solid #0D0D0D;
-moz-border-radius: 50%; -moz-border-radius: 50%;
-webkit-border-radius: 50%; -webkit-border-radius: 50%;
border-radius: 50%; border-radius: 50%;
@ -58,7 +58,7 @@
z-index: 5; z-index: 5;
} }
#motdBox { #motdBox, #motdBoxuser {
width: 100%; width: 100%;
height: 5%; height: 5%;
margin-top: -0.5vh; margin-top: -0.5vh;
@ -70,8 +70,13 @@
border-right: 5px solid #0D0D0D; border-right: 5px solid #0D0D0D;
} }
#motdBoxuser {
font-size: 1.2vw;
padding: 0.7% 0 0.7% 0;
}
#motdBox span { #motdBox span {
font-size: 130% !important; font-size: 1.5vw !important;
margin: 0; margin: 0;
color: #FFF; color: #FFF;
} }
@ -80,12 +85,16 @@
width: 50% !important; width: 50% !important;
} }
#description {
font-size: 1.5vw;
}
#description:hover { #description:hover {
background-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.1);
} }
.username { .username {
margin-left: 20% !important; margin-left: 22% !important;
} }
.smallText p { .smallText p {
@ -173,9 +182,9 @@
} }
.profFunction { .profFunction {
font-size: 1.7vh; font-size: 1.2vw;
margin-right: 1%; margin-right: 1%;
padding: 2%; padding: 0.7vw;
border: 2px solid rgba(0,0,0,0.2); border: 2px solid rgba(0,0,0,0.2);
@ -195,10 +204,7 @@
.profFunction i, .profFunction h4 { .profFunction i, .profFunction h4 {
padding: 1% !important; padding: 1% !important;
} font-size: 1.2vw !important;
.profFunction h4 {
font-size: 120% !important;
} }
#searchBar { #searchBar {
@ -206,10 +212,10 @@
} }
#profClassSearch { #profClassSearch {
font-size: 125%; font-size: 1.5vw;
width: 30%; width: 30%;
margin-top: 3%; margin-top: 3%;
padding: 1.5% 1% 1.5% 1%; padding: 1%;
-webkit-animation: expand .7s ease 1; -webkit-animation: expand .7s ease 1;
animation: expand .7s ease 1; animation: expand .7s ease 1;
@ -264,7 +270,7 @@
} }
.classBox { .classBox {
font-size: 2.7vh; font-size: 1.3vw;
width: 94%; width: 94%;
margin-bottom: 3%; margin-bottom: 3%;
padding: 2%; padding: 2%;
@ -286,11 +292,12 @@
} }
#joinTop .fa-search { #joinTop .fa-search {
font-size: 2.5vh; font-size: 1.3vw;
margin-right: 3%; margin-right: 3%;
} }
#private { #private {
font-size: 1.5vw;
margin-left: 5%; margin-left: 5%;
padding: 1.5%; padding: 1.5%;
@ -397,7 +404,7 @@
#creSubmit { #creSubmit {
font-weight: 200; font-weight: 200;
font-size: 3vh; font-size: 1.5vw;
width: 13vw; width: 13vw;
margin: auto; margin: auto;
padding: 2%; padding: 2%;
@ -425,9 +432,9 @@
} }
#mainpage, #logout2 { #mainpage, #logout2 {
font-size: 1.5vh; font-size: 1vw;
margin: 0; margin: 0;
padding: 0.7%; padding: 0.8%;
background-color: #617C9E; background-color: #617C9E;
box-shadow: -1px 2px 5px 1px #333; box-shadow: -1px 2px 5px 1px #333;
@ -463,6 +470,7 @@
#mainpage h2, #logout2 h2 { #mainpage h2, #logout2 h2 {
font-weight: 200; font-weight: 200;
width: 100%; width: 100%;
margin: 0;
-webkit-filter: none; -webkit-filter: none;
filter: none !important; filter: none !important;

View File

@ -4,7 +4,7 @@
<div id="mainpage{{userProfile}}"><h2>Main Page</h2></div> <div id="mainpage{{userProfile}}"><h2>Main Page</h2></div>
<div id="logout2" onclick='document.getElementById("login-buttons-logout").click();'><h2>Logout</h2></div> <div id="logout2" onclick='document.getElementById("login-buttons-logout").click();'><h2>Logout</h2></div>
<div id="profWrapper"> <div id="profWrapper">
<div id="profPage" style="background-color:{{divColor 'mainColor'}};min-width:{{screen}}{{textColor}}{{loadNew}}"> <div id="profPage" style="background-color:{{divColor 'mainColor'}};min-width:{{textColor}}{{loadNew}}">
<div id="profMainContainer"> <div id="profMainContainer">
<div id="profTop"> <div id="profTop">
<img id="profBanner" src='{{banner}}' alt="Banner"> <img id="profBanner" src='{{banner}}' alt="Banner">
@ -53,7 +53,7 @@
<h3 class="profHea">Preferences</h3> <h3 class="profHea">Preferences</h3>
<div id="preferences"> <div id="preferences">
<div class="prefWrapper"> <div class="prefWrapper">
<p class="prefTitle">Theme:</p> <p class="profTitle">Theme:</p>
<div id="theme" class="clickModify dropdown" tabindex="3"> <div id="theme" class="clickModify dropdown" tabindex="3">
<span>{{pref 'theme'}}</span> <span>{{pref 'theme'}}</span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
@ -64,8 +64,9 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
<br>
<div class="prefWrapper"> <div class="prefWrapper">
<p class="prefTitle">Default Mode:</p> <p class="profTitle">Default Mode:</p>
<div id="mode" class="clickModify dropdown" tabindex="4"> <div id="mode" class="clickModify dropdown" tabindex="4">
<span>{{pref 'mode'}}</span> <span>{{pref 'mode'}}</span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
@ -76,8 +77,9 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
<br>
<div class="prefWrapper"> <div class="prefWrapper">
<p class="prefTitle">Hide Homework:</p> <p class="profTitle">Hide Homework:</p>
<div id="timeHide" class="clickModify dropdown" tabindex="5"> <div id="timeHide" class="clickModify dropdown" tabindex="5">
<span>{{pref 'timeHide'}}</span> <span>{{pref 'timeHide'}}</span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
@ -88,8 +90,9 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
<br>
<div class="prefWrapper"> <div class="prefWrapper">
<p class="prefTitle">Hide Done:</p> <p class="profTitle">Hide Done:</p>
<div id="done" class="clickModify dropdown" tabindex="6"> <div id="done" class="clickModify dropdown" tabindex="6">
<span>{{pref 'done'}}</span> <span>{{pref 'done'}}</span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
@ -100,8 +103,9 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
<br>
<div class="prefWrapper"> <div class="prefWrapper">
<p class="prefTitle">Hide Reported:</p> <p class="profTitle">Hide Reported:</p>
<div id="hideReport" class="clickModify dropdown" tabindex="7"> <div id="hideReport" class="clickModify dropdown" tabindex="7">
<span>{{pref 'hideReport'}}</span> <span>{{pref 'hideReport'}}</span>
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>

View File

@ -23,6 +23,7 @@ classes.schema = new SimpleSchema({
subscribers: {type: [String], optional: true} subscribers: {type: [String], optional: true}
}); });
work.schema = new SimpleSchema({ work.schema = new SimpleSchema({
name: {type: String}, name: {type: String},
class: {type: String}, class: {type: String},
@ -42,3 +43,16 @@ requests.schema = new SimpleSchema({
request: {type: String}, request: {type: String},
timeRequested: {type: Date} timeRequested: {type: Date}
}); });
schools.attachSchema(schools.schema);
classes.attachSchema(classes.schema);
work.attachSchema(work.schema);
requests.attachSchema(requests.schema);
classes.helpers({
fullUserInfo() {
var user = Meteor.users.findOne({_id: this.admin});
console.log(user);
return this.admin + " | " + user.services.google.email + " | " + user.profile.name;
}
})

View File

@ -116,10 +116,57 @@ options = {
AdminConfig = { AdminConfig = {
name: 'Hourglass', name: 'Hourglass',
collections: { collections: {
schools: {}, schools: {
classes: {}, icon: 'university',
work: {}, tableColumns: [
requests: {} { label: 'ID', name: '_id' },
{ label: 'Name', name: 'name' }
],
color: 'red'
},
classes: {
tableColumns: [
{ label: 'ID', name: '_id' },
{ label: 'School', name: 'school' },
{ label: 'Name', name: 'name' },
{ label: 'Hour', name: 'hour' },
{ label: 'Teacher', name: 'teacher' },
{ label: 'Admin', name: 'admin' },
{ label: 'Status', name: 'status' },
{ label: 'Code', name: 'code' },
{ label: 'Privacy', name: 'privacy' },
{ label: 'Category', name: 'category' },
{ label: 'Moderators', name: 'moderators' },
{ label: 'Banned', name: 'banned' },
{ label: 'Subscribers', name: 'subscribers' }
],
color: 'blue'
},
work: {
tableColumns: [
{ label: 'ID', name: '_id' },
{ label: 'Class', name: 'class' },
{ label: 'Name', name: 'name' },
{ label: 'Due Date', name: 'dueDate' },
{ label: 'Description', name: 'description' },
{ label: 'Creator', name: 'creator' },
{ label: 'Comments', name: 'comments' },
{ label: 'Confirmations', name: 'confirmations' },
{ label: 'Reports', name: 'reports' },
{ label: 'Done', name: 'done' },
{ label: 'Type', name: 'type' }
],
color: 'yellow'
},
requests: {
tableColumns: [
{ label: 'ID', name: '_id' },
{ label: 'User', name: 'requestor' },
{ label: 'Request', name: 'request' },
{ label: 'Time', name: 'timeRequested' }
],
color: 'green'
}
} }
}; };

View File

@ -1,9 +1,6 @@
Router.route('/', { Router.route('/', {
data: function() {
return false;
},
waitOn: function() { waitOn: function() {
if (!Meteor.userId() || _.contains([null, undefined, ""], Meteor.user().profile.school)) { if (!Meteor.userId()) {
this.redirect('/login'); this.redirect('/login');
} else { } else {
return [ return [
@ -16,14 +13,15 @@ Router.route('/', {
} }
}, },
action: function() { action: function() {
if(_.contains([null, undefined, ""], Meteor.user().profile.school)) {
this.redirect('/login');
} else {
this.render("main"); this.render("main");
} }
}
}); });
Router.route('/login', { Router.route('/login', {
data: function() {
return false;
},
action: function() { action: function() {
if (!Meteor.userId()) { if (!Meteor.userId()) {
this.render("login"); this.render("login");
@ -36,9 +34,6 @@ Router.route('/login', {
}); });
Router.route('/profile', { Router.route('/profile', {
data: function() {
return false;
},
waitOn: function() { waitOn: function() {
if (!Meteor.userId()) { if (!Meteor.userId()) {
this.redirect('/login'); this.redirect('/login');

View File

@ -1,5 +1,5 @@
<template name="AdminLTE"> <template name="AdminLTE">
<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/bootstrap/bootstrap.min.css">
{{#unless isReady}} {{#unless isReady}}
{{> Template.dynamic template=loadingTemplate}} {{> Template.dynamic template=loadingTemplate}}
{{else}} {{else}}