This commit is contained in:
Kenneth Jao 2016-09-27 11:47:51 -04:00
commit 94f775b0d6
10 changed files with 84 additions and 34 deletions

View File

@ -37,5 +37,5 @@ houston:admin
ahref:dragula ahref:dragula
harrison:papa-parse harrison:papa-parse
pfafman:filesaver pfafman:filesaver
semantic:ui
flemay:less-autoprefixer flemay:less-autoprefixer
natestrauser:select2

View File

@ -79,6 +79,7 @@ modules-runtime@0.7.6
momentjs:moment@2.14.4 momentjs:moment@2.14.4
mongo@1.1.12 mongo@1.1.12
mongo-id@1.0.5 mongo-id@1.0.5
natestrauser:select2@4.0.3
npm-bcrypt@0.9.1 npm-bcrypt@0.9.1
npm-mongo@1.5.49 npm-mongo@1.5.49
oauth@1.1.11 oauth@1.1.11
@ -97,8 +98,6 @@ reload@1.1.10
retry@1.0.8 retry@1.0.8
routepolicy@1.0.11 routepolicy@1.0.11
rzymek:fullcalendar@2.7.2 rzymek:fullcalendar@2.7.2
semantic:ui@2.2.1
semantic:ui-data@2.2.4
service-configuration@1.0.10 service-configuration@1.0.10
session@1.1.6 session@1.1.6
sha@1.0.8 sha@1.0.8

View File

@ -262,7 +262,7 @@ input, textarea {
.mode, .function { .mode, .function {
width: 100%; width: 100%;
position: relative; position: relative;
background-color: #849CAE; background-color: rgba(255,255,255,0.2);
-webkit-transition: background-color 0.5s ease, box-shadow 0.5s ease; -webkit-transition: background-color 0.5s ease, box-shadow 0.5s ease;
-moz-transition: background-color 0.5s ease, box-shadow 0.5s ease; -moz-transition: background-color 0.5s ease, box-shadow 0.5s ease;
@ -577,6 +577,7 @@ input, textarea {
} }
#editWork { #editWork {
min-height: 68vh;
margin: auto; margin: auto;
margin-top: 5%; margin-top: 5%;
@ -599,6 +600,7 @@ input, textarea {
#editWorkCont { #editWorkCont {
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 68vh;
position: relative; position: relative;
display: table; display: table;
@ -1012,9 +1014,12 @@ input, textarea {
background-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.1);
} }
.fc-past {
background-color: rgba(0,0,0,0.2);
}
.fc-day:not(.fc-past) { .fc-day:not(.fc-past) {
cursor: pointer; cursor: pointer;
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1);
-webkit-transition: box-shadow 0.4s ease; -webkit-transition: box-shadow 0.4s ease;
-moz-transition: box-shadow 0.4s ease; -moz-transition: box-shadow 0.4s ease;
@ -1023,7 +1028,7 @@ input, textarea {
} }
.fc-day:not(.fc-past):hover { .fc-day:not(.fc-past):hover {
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.15); box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1);
} }
.fc-slats, .fc-content-skeleton { .fc-slats, .fc-content-skeleton {

View File

@ -12,21 +12,21 @@
<div id="dropdown"> <div id="dropdown">
<img src="{{avatar}}"> <img src="{{avatar}}">
</div> </div>
<div id="headerBar"></div> <div id="headerBar" style="background-color:{{divColor 'statusIcons'}}"></div>
</header> </header>
<div id="menuContainer" style="left:{{menuStatus}};background-color:{{divColor 'sidebar'}}"> <div id="menuContainer" style="left:{{menuStatus}};background-color:{{divColor 'sidebar'}}">
<div id="modes"> <div id="modes">
<div class="mode classes" style="background-color:{{divColor 'funcButton'}}"> <div class="mode classes">
<i class="fa fa-university" aria-hidden="true"></i> <i class="fa fa-university" aria-hidden="true"></i>
<h4 style="color:{{modeStatus 'classes'}}">Classes</h4> <h4 style="color:{{modeStatus 'classes'}}">Classes</h4>
</div> </div>
<div class="mode calendar" style="background-color:{{divColor 'funcButton'}}"> <div class="mode calendar">
<i class="fa fa-calendar" aria-hidden="true"></i> <i class="fa fa-calendar" aria-hidden="true"></i>
<h4 style="color:{{modeStatus 'calendar'}}">Calendar</h4> <h4 style="color:{{modeStatus 'calendar'}}">Calendar</h4>
</div> </div>
</div> </div>
<div id="functions"> <div id="functions">
<div class="function manageClass" onclick="window.location='/profile'" style="background-color:{{divColor 'funcButton'}}"> <div class="function manageClass" onclick="window.location='/profile'">
<i class="fa fa-tasks" aria-hidden="true"></i> <i class="fa fa-tasks" aria-hidden="true"></i>
<h4>Manage Classes</h4> <h4>Manage Classes</h4>
</div> </div>
@ -54,11 +54,10 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div id="exportDiv" class="sideFilter">
<div id="exportDiv" class="sideFilter"> <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>
</div> </div>
<div id="optionsContainer" style="right:{{optionsStatus}};background-color:{{divColor 'sidebar'}}"> <div id="optionsContainer" style="right:{{optionsStatus}};background-color:{{divColor 'sidebar'}}">
<h3>Preferences</h3> <h3>Preferences</h3>

View File

@ -260,7 +260,7 @@ function startDragula() {
Template.main.helpers({ Template.main.helpers({
schoolName() { // Finds the name of the user's school. schoolName() { // Finds the name of the user's school.
if(Session.get("user").school === undefined) return; if(Session.get("user").school === undefined || Session.get("user").school === null) return;
return " - " + Session.get("user").school; return " - " + Session.get("user").school;
}, },
iconColor(icon) { // Sidebar status color iconColor(icon) { // Sidebar status color
@ -975,7 +975,7 @@ function closeInput(modifyingInput) { // Close a changeable input and change it
if (Session.equals("sidebar", "optionsContainer") || Session.equals("sidebar", "both")) { if (Session.equals("sidebar", "optionsContainer") || Session.equals("sidebar", "both")) {
color = "#000"; color = "#000";
} else { } else {
color = "#8C8C8C"; color = "#BEBEBE";
} }
span.style.color = color; span.style.color = color;
Session.set("commentRestrict",""); Session.set("commentRestrict","");

View File

@ -1,6 +1,6 @@
.change { .change {
font-size: 150%; font-size: 150%;
color: #8C8C8C; color: #BEBEBE;
cursor: pointer; cursor: pointer;
} }
@ -22,7 +22,7 @@
.changeInput { .changeInput {
font-size: 100%; font-size: 100%;
padding: 0; padding: 0;
color: #8C8C8C; color: #BEBEBE;
position: relative; position: relative;
} }

View File

@ -76,15 +76,15 @@ Template.profile.helpers({
return Session.get("user").name; return Session.get("user").name;
}, },
motd() { // Returns the current user's description motd() { // Returns the current user's description
if (Session.get("user").description !== undefined) return Session.get("user").description; if (Session.get("user").description !== undefined && Session.get("user").description !== null) return Session.get("user").description;
return "Say something about yourself!"; return "Say something about yourself!";
}, },
school() { // Returns the current user's school's name school() { // Returns the current user's school's name
if (Session.get("user").school !== undefined) return Session.get("user").school; if (Session.get("user").school !== undefined && Session.get("user").school !== null) return Session.get("user").school;
return "Click here to edit..."; return "Click here to edit...";
}, },
grade() { // Returns the current user's grade grade() { // Returns the current user's grade
if (Session.get("user").grade !== undefined) return Session.get("user").grade + "th"; if (Session.get("user").grade !== undefined && Session.get("user").grade !== null) return Session.get("user").grade + "th";
return "Click here to edit..."; return "Click here to edit...";
}, },
classes() { // Loads all of the possible classes ( Limit of twenty shown ) ( Sorts by class size ) classes() { // Loads all of the possible classes ( Limit of twenty shown ) ( Sorts by class size )
@ -281,7 +281,7 @@ Template.profile.events({
Session.set("selectedClass",array); Session.set("selectedClass",array);
Session.set("owned",true); Session.set("owned",true);
}); });
}, },
'click .classBox .fa-times' (event) { // Leaves a class 'click .classBox .fa-times' (event) { // Leaves a class
var box = event.target.parentNode; var box = event.target.parentNode;
@ -457,15 +457,15 @@ Template.profile.events({
try { try {
for (var i = 0; i < document.getElementsByClassName("profOptions").length; i++) { for (var i = 0; i < document.getElementsByClassName("profOptions").length; i++) {
var curr = document.getElementsByClassName("profOptions")[i]; var curr = document.getElementsByClassName("profOptions")[i];
if (curr.childNodes[1] !== op.nextSibling.nextSibling.childNodes[1] if (curr.childNodes[1] !== op.nextSibling.nextSibling.childNodes[1] &&
&& curr.childNodes[1] !== op.parentNode.parentNode.childNodes[3].childNodes[1]) { curr.childNodes[1] !== op.parentNode.parentNode.childNodes[3].childNodes[1]) {
closeDivFade(document.getElementsByClassName("profOptions")[i]); closeDivFade(document.getElementsByClassName("profOptions")[i]);
} }
} }
} catch (err) {} } catch (err) {}
if(event.target.className.includes("op")) { if(event.target.className.includes("op")) {
openDivFade(op.nextSibling.nextSibling); openDivFade(op.nextSibling.nextSibling);
} else { } else {
openDivFade(op.parentNode.parentNode.childNodes[3]); openDivFade(op.parentNode.parentNode.childNodes[3]);
} }
@ -615,11 +615,11 @@ function getProfileData() { // Gets all data related to profile.
var gradein = document.getElementById("grade").childNodes[0].nodeValue; var gradein = document.getElementById("grade").childNodes[0].nodeValue;
profile.grade = parseInt(gradein.substring(gradein.length - 2, gradein)); profile.grade = parseInt(gradein.substring(gradein.length - 2, gradein));
if(profile.grade.includes("Click here to edit...")) profile.grade = ""; if(!profile.grade) profile.grade = "";
profile.avatar = document.getElementById("profAvatar").src; profile.avatar = document.getElementById("profAvatar").src;
profile.banner = document.getElementById("profBanner").src; profile.banner = document.getElementById("profBanner").src;
profile.preferences = { profile.preferences = {
"theme":document.getElementById("prefTheme").childNodes[0].nodeValue.toLowerCase(), "theme":document.getElementById("prefTheme").childNodes[0].nodeValue.toLowerCase(),
"mode":document.getElementById("prefMode").childNodes[0].nodeValue.toLowerCase(), "mode":document.getElementById("prefMode").childNodes[0].nodeValue.toLowerCase(),

View File

@ -4,7 +4,6 @@ themeColors = {
"header": "#EBEBEB", "header": "#EBEBEB",
"sidebar": "#65839A", "sidebar": "#65839A",
"dropdown": "#E6E6E6", "dropdown": "#E6E6E6",
"adminButtons": "#C8C0C0",
"funcButton": "#849CAE", "funcButton": "#849CAE",
"statusIcons": "#33ADFF", "statusIcons": "#33ADFF",
"highlightText": "#FF1A1A", "highlightText": "#FF1A1A",
@ -13,12 +12,11 @@ themeColors = {
"calendar": "#000", "calendar": "#000",
"text": "#000" "text": "#000"
}, },
"dark": { /*"dark": {
"background": "Black.jpg", "background": "Black.jpg",
"header": "#373A56", "header": "#373A56",
"sidebar": "#35435D", "sidebar": "#35435D",
"dropdown": "#373A56", "dropdown": "#373A56",
"adminButtons": "#63667E",
"funcButton": "#5D75A2", "funcButton": "#5D75A2",
"statusIcons": "#33ADFF", "statusIcons": "#33ADFF",
"highlightText": "#FF1A1A", "highlightText": "#FF1A1A",
@ -27,6 +25,54 @@ themeColors = {
"calendar": "#000", "calendar": "#000",
//30313B //30313B
"text": "#F6F6F6" "text": "#F6F6F6"
},*/
/*"dark": {
"background": "RedBlack.png",
"header": "#302c36",
"sidebar": "#327c5a",
"dropdown": "#cc3333",
"statusIcons": "#327c5a",
"highlightText": "#c9fe62",
"cards": "#151313",
"classes":"#302c36",
"calendar": "#000",
"text": "#fcf0f0"
},*/
/*"dark": {
"background": "Sea.png",
"header": "#1e926c",
"sidebar": "#3cb08a",
"dropdown": "#2ea96a",
"statusIcons": "#61d9a3",
"highlightText": "#c9fe62",
"cards": "#1c564f",
"classes":"#2567a1",
"calendar": "#000",
"text": "#fcf0f0"
},*/
/*"dark": {
"background": "Earth.png",
"header": "#dea743",
"sidebar": "#6d9957",
"dropdown": "#89bb52",
"statusIcons": "#91ee61",
"highlightText": "#b9f643",
"cards": "#496234",
"classes":"#c18311",
"calendar": "#000",
"text": "#fcf0f0"
},*/
"dark": {
"background": "NeonBlue.png",
"header": "#1d1c23",
"sidebar": "#312e32",
"dropdown": "#2e312b",
"statusIcons": "#70e6e6",
"highlightText": "#70e6e6",
"cards": "#1f212f",
"classes":"#1faab1",
"calendar": "#000",
"text": "#fcf0f0"
} }
}; };

View File

@ -57,14 +57,14 @@ Router.route('/user/:email', {
}, },
action: function() { action: function() {
if(Meteor.users.findOne({'services.google.email': this.params.email}) !== undefined) { if(Meteor.users.findOne({'services.google.email': this.params.email}) !== undefined) {
if(this.params.email === Meteor.user().services.google.email) { if(Meteor.user() && this.params.email === Meteor.user().services.google.email) {
this.redirect('/profile'); this.redirect('/profile');
} else { } else {
this.render('user'); this.render('user');
} }
} else { } else {
this.render("NotFound"); this.render("NotFound");
} }
} }
}); });

View File

@ -127,6 +127,7 @@ Meteor.publish('users', function() {
// Only return necessary fields // Only return necessary fields
fields: { fields: {
'services.google.email': 1, 'services.google.email': 1,
'services.google.picture': 1,
'profile.banner': 1, 'profile.banner': 1,
'profile.grade': 1, 'profile.grade': 1,
'profile.description': 1, 'profile.description': 1,