This commit is contained in:
Kenneth Jao 2016-09-24 19:04:16 -04:00
commit 2835310f0d
82 changed files with 60 additions and 8 deletions

View File

@ -35,3 +35,5 @@ http@1.2.9
underscore
houston:admin
ahref:dragula
harrison:papa-parse
pfafman:filesaver

View File

@ -42,6 +42,7 @@ fastclick@1.0.12
fortawesome:fontawesome@4.5.0
geojson-utils@1.0.9
google@1.1.14
harrison:papa-parse@1.1.1
hot-code-push@1.0.4
houston:admin@2.0.7
html-tools@1.0.10
@ -84,6 +85,7 @@ oauth2@1.1.10
observe-sequence@1.0.12
ongoworks:security@2.0.1
ordered-dict@1.0.8
pfafman:filesaver@1.3.2
promise@0.8.4
proyk:meteor-cookies@0.0.1
random@1.0.10

View File

@ -285,7 +285,7 @@ input, textarea {
transition: box-shadow 0.2s ease;
}
.fa-university, .fa-calendar {
.fa-university, .fa-calendar, .fa-download {
font-size: 175%;
width: 12%;
padding: 10%;
@ -302,6 +302,19 @@ input, textarea {
filter: drop-shadow(2px 2px 5px #666);
}
#exportText {
display: inline;
}
.fa-download {
padding: 0%;
}
#exportDiv {
position: absolute;
bottom: 9%;
}
#functions {
width: 100%;
margin-top: 7%;

View File

@ -54,9 +54,15 @@
</div>
</div>
{{/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 id="optionsContainer" style="right:{{optionsStatus}};background-color:{{divColor 'sidebar'}}">
<h3>Preferences</h3>
<div id="prefCont">
<div>
<div class="inputRadioPref">

View File

@ -769,6 +769,33 @@ Template.main.events({
text.style.display = "initial";
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.
var modifyingInput = Session.get("modifying");
if (event.keyCode == 13 && modifyingInput != "workDesc") {

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -28,7 +28,9 @@ for (var i = 0; i < superadmins.length; i++) {
});
if (superadmin !== undefined && !(Roles.userIsInRole(superadmin._id, 'superadmin'))) {
Roles.addUsersToRoles(superadmin._id, 'superadmin');
Houston._admins.insert({user_id: superadmin._id});
Houston._admins.insert({
user_id: superadmin._id
});
}
}
@ -441,7 +443,7 @@ Meteor.methods({
}
},
'deleteWork': function(workId) {
var currentwork = wokr.findOne({
var currentwork = work.findOne({
_id: workId
});
var currentclass = classes.findOne({
@ -484,7 +486,7 @@ Meteor.methods({
},
'reorderClasses': function(newOrder) {
var current = Meteor.user().profile;
if(newOrder.every(elem => _.contains(current.classes, elem)) &&
if (newOrder.every(elem => _.contains(current.classes, elem)) &&
newOrder.length === current.classes.length) {
current.classes = newOrder;
Meteor.users.update({