This commit is contained in:
Kenneth Jao 2016-09-26 11:59:18 -04:00
commit fcd7e184dd
9 changed files with 86 additions and 19 deletions

View File

@ -9,7 +9,7 @@ mobile-experience@1.0.4 # Packages for a great mobile UX
mongo@1.1.12 # The database Meteor supports right now mongo@1.1.12 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.10 # Reactive variable for tracker reactive-var@1.0.10 # Reactive variable for tracker
jquery@1.11.9 # Helpful client-side library jquery # Helpful client-side library
tracker@1.1.0 # Meteor's client-side reactive programming library tracker@1.1.0 # Meteor's client-side reactive programming library
standard-minifier-css@1.2.0 # CSS minifier run for production mode standard-minifier-css@1.2.0 # CSS minifier run for production mode
@ -35,3 +35,7 @@ http@1.2.9
underscore underscore
houston:admin houston:admin
ahref:dragula ahref:dragula
harrison:papa-parse
pfafman:filesaver
semantic:ui
flemay:less-autoprefixer

View File

@ -39,9 +39,11 @@ email@1.1.17
es5-shim@4.6.14 es5-shim@4.6.14
eternicode:bootstrap-datepicker@1.6.0_3 eternicode:bootstrap-datepicker@1.6.0_3
fastclick@1.0.12 fastclick@1.0.12
flemay:less-autoprefixer@1.2.0
fortawesome:fontawesome@4.5.0 fortawesome:fontawesome@4.5.0
geojson-utils@1.0.9 geojson-utils@1.0.9
google@1.1.14 google@1.1.14
harrison:papa-parse@1.1.1
hot-code-push@1.0.4 hot-code-push@1.0.4
houston:admin@2.0.7 houston:admin@2.0.7
html-tools@1.0.10 html-tools@1.0.10
@ -84,6 +86,7 @@ oauth2@1.1.10
observe-sequence@1.0.12 observe-sequence@1.0.12
ongoworks:security@2.0.1 ongoworks:security@2.0.1
ordered-dict@1.0.8 ordered-dict@1.0.8
pfafman:filesaver@1.3.2
promise@0.8.4 promise@0.8.4
proyk:meteor-cookies@0.0.1 proyk:meteor-cookies@0.0.1
random@1.0.10 random@1.0.10
@ -94,6 +97,8 @@ 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

@ -12,14 +12,14 @@
height: 4px; height: 4px;
background-color: #33ADFF; background-color: #33ADFF;
position: absolute; position: absolute;
top: 13vh; top: 11vh;
z-index: 51; z-index: 51;
} }
#loginHeader { #loginHeader {
font-weight: 600; font-weight: 600;
width: 100%; width: 100%;
height: 13vh; height: 11vh;
background-color: #EBEBEB; background-color: #EBEBEB;
box-shadow: 2px 2px 5px 3px #666; box-shadow: 2px 2px 5px 3px #666;
@ -31,10 +31,10 @@
} }
#logo { #logo {
height: 10vh; height: 8vh;
width: 10vh; width: 8vh;
padding: 1.5vh; padding: 1.5vh;
line-height: 13vh; line-height: 11vh;
float: left; float: left;
@ -45,8 +45,8 @@
#loginTitle { #loginTitle {
font-size: 5vh; font-size: 5vh;
color: #000 !important; color: #000 !important;
height: 13vh; height: 11vh;
line-height: 13vh; line-height: 11vh;
padding: 0 0 0 1vw; padding: 0 0 0 1vw;
-webkit-filter: none; -webkit-filter: none;
@ -55,15 +55,15 @@
#loginMain { #loginMain {
width: 100%; width: 100%;
height: 80vh; height: 84vh;
background-color: #E5E5E5; background-color: #E5E5E5;
background-image: url("banner100.jpg"); background-image: url("banner100.jpg");
background-size: 100vw 80vh; background-size: 100vw 84vh;
display: table-row; display: table-row;
position: absolute; position: absolute;
top: 13vh; top: 11vh;
} }
#circle { #circle {
@ -88,6 +88,8 @@
width: 80%; width: 80%;
margin: auto; margin: auto;
padding-top: 16vh; padding-top: 16vh;
background-color: rgba(0, 0, 0, 0.2);
padding-bottom: 4vh;
} }
.text { .text {
@ -146,25 +148,33 @@ p.text {
#loginFooter { #loginFooter {
width: 100%; width: 100%;
height: 8vh; height: 6vh;
box-shadow: 2px 2px 5px 3px #666; box-shadow: 2px 2px 5px 3px #666;
background-color: #EBEBEB; background-color: #EBEBEB;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
} }
#github { #github, #version {
font-size: 3vh; font-size: 2.3vh;
color: #000 !important; color: #000 !important;
height: 6vh;
margin: 0; margin: 0;
height: 8vh;
line-height: 8vh;
padding: 0 0 0 1vw; padding: 0 0 0 1vw;
line-height: 6vh;
display: inline-block;
-webkit-filter: drop-shadow(2px 2px 5px #444); -webkit-filter: drop-shadow(2px 2px 5px #444);
filter: drop-shadow(2px 2px 5px #444); filter: drop-shadow(2px 2px 5px #444);
} }
#version {
float: right;
margin-right: 1%;
}
a { a {
color: #0099CC; color: #0099CC;
text-decoration: none; text-decoration: none;

View File

@ -16,6 +16,7 @@
</div> </div>
<footer id="loginFooter"> <footer id="loginFooter">
<p id="github">View the <a href="https://github.com/ksjdragon/hourglass">Code!</a></p> <p id="github">View the <a href="https://github.com/ksjdragon/hourglass">Code!</a></p>
<p id="version">Version 0.1.0</p>
</footer> </footer>
</div> </div>
{{> loginButtons}} {{> loginButtons}}

View File

@ -285,7 +285,7 @@ input, textarea {
transition: box-shadow 0.2s ease; transition: box-shadow 0.2s ease;
} }
.fa-university, .fa-calendar { .fa-university, .fa-calendar, .fa-download {
font-size: 175%; font-size: 175%;
width: 12%; width: 12%;
padding: 10%; padding: 10%;
@ -302,6 +302,19 @@ input, textarea {
filter: drop-shadow(2px 2px 5px #666); filter: drop-shadow(2px 2px 5px #666);
} }
#exportText {
display: inline;
}
.fa-download {
padding: 0%;
}
#exportDiv {
position: absolute;
bottom: 9%;
}
#functions { #functions {
width: 100%; width: 100%;
margin-top: 7%; margin-top: 7%;
@ -458,6 +471,7 @@ input, textarea {
.classInfo { .classInfo {
padding: 6%; padding: 6%;
background-color: rgba(255,255,255,0.3); /* remove when class color */ background-color: rgba(255,255,255,0.3); /* remove when class color */
cursor: pointer;
} }
.mainClassName { .mainClassName {

View File

@ -54,9 +54,15 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div id="exportDiv" class="sideFilter">
<i id="export" class="fa fa-download" aria-hidden="true"></i>
<h4 id="exportText">Export</h4>
</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>
<div id="prefCont"> <div id="prefCont">
<div> <div>
<div class="inputRadioPref"> <div class="inputRadioPref">

View File

@ -769,6 +769,33 @@ Template.main.events({
text.style.display = "initial"; text.style.display = "initial";
text.style.color = "#7E7E7E"; text.style.color = "#7E7E7E";
}, },
'click #exportDiv' (event) {
var events = [];
var userClasses = Session.get("calendarClasses");
for (var i = 0; i < userClasses.length; i++) {
var works = userClasses[i].thisClassWork;
for (var j = 0; j < works.length; j++) {
var work = works[j];
var workclass = classes.findOne({_id: work.class});
if (work.description == defaultWork.description) work.description = "";
if (work.dueDate == defaultWork.dueDate) continue;
if (work.name == defaultWork.name) work.name = "";
if (workclass === undefined) workclass = {name: "Personal"};
events.push([
workclass.name + ": " + work.name,
work.realDate.toLocaleDateString(),
work.description,
"True"
]);
}
}
var JSONevents = JSON.stringify(events);
var CSVevents = Papa.unparse({fields: ["Subject", "Start Date", "Description", "All Day Event"], data: JSONevents});
var eventBlob = new Blob([CSVevents], {type: "data:text/csv;charset=utf-8"});
saveAs(eventBlob, "hourglass.csv");
},
'keydown input' (event) { // Enter to close input. 'keydown input' (event) { // Enter to close input.
var modifyingInput = Session.get("modifying"); var modifyingInput = Session.get("modifying");
if (event.keyCode == 13 && modifyingInput != "workDesc") { if (event.keyCode == 13 && modifyingInput != "workDesc") {

View File

@ -1,6 +1,6 @@
Router.route('/', { Router.route('/', {
waitOn: function() { waitOn: function() {
if (!Meteor.userId()) { if (!Meteor.userId() || !Meteor.user().profile.school) {
this.redirect('/login'); this.redirect('/login');
} else { } else {
return [ return [

View File

@ -443,7 +443,7 @@ Meteor.methods({
} }
}, },
'deleteWork': function(workId) { 'deleteWork': function(workId) {
var currentwork = wokr.findOne({ var currentwork = work.findOne({
_id: workId _id: workId
}); });
var currentclass = classes.findOne({ var currentclass = classes.findOne({