fix graduation year
This commit is contained in:
parent
332cd2795d
commit
bfe17196d6
@ -212,7 +212,7 @@ Template.registerHelper('restrict', (input) => { // Returns characters left for
|
|||||||
Template.registerHelper('selectOptions', (val) => {
|
Template.registerHelper('selectOptions', (val) => {
|
||||||
if(val === "grade") {
|
if(val === "grade") {
|
||||||
var grade = [];
|
var grade = [];
|
||||||
for(var i = 0; i < 5; i++) {
|
for(var i = 1; i < 5; i++) {
|
||||||
var year = (new Date()).getFullYear() + i;
|
var year = (new Date()).getFullYear() + i;
|
||||||
grade.push( { "val": year, "alias": year.toString() } );
|
grade.push( { "val": year, "alias": year.toString() } );
|
||||||
}
|
}
|
||||||
@ -626,11 +626,11 @@ Template.main.events({
|
|||||||
Session.set("restrictText", {});
|
Session.set("restrictText", {});
|
||||||
$("#requestSubmit span:first-child").fadeOut(200, function() {
|
$("#requestSubmit span:first-child").fadeOut(200, function() {
|
||||||
$("#requestSubmit span:nth-child(2)").velocity("fadeIn", 200);
|
$("#requestSubmit span:nth-child(2)").velocity("fadeIn", 200);
|
||||||
})
|
});
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#requestSubmit span:nth-child(2)").fadeOut(200, function() {
|
$("#requestSubmit span:nth-child(2)").fadeOut(200, function() {
|
||||||
$("#requestSubmit span:first-child").velocity("fadeIn", 200);
|
$("#requestSubmit span:first-child").velocity("fadeIn", 200);
|
||||||
})
|
});
|
||||||
}, 1250);
|
}, 1250);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -639,15 +639,17 @@ Template.main.events({
|
|||||||
var userClasses = Session.get("myClasses");
|
var userClasses = Session.get("myClasses");
|
||||||
var timestamp = new Date().toJSON().replace(/-|:|\./gi, "");
|
var timestamp = new Date().toJSON().replace(/-|:|\./gi, "");
|
||||||
for (var i = 0; i < userClasses.length; i++) {
|
for (var i = 0; i < userClasses.length; i++) {
|
||||||
var works = userClasses[i].thisClassWork;
|
var works = Session.get("myWork").filter(function(work) {
|
||||||
|
return userClasses[i]._id;
|
||||||
|
});
|
||||||
for (var j = 0; j < works.length; j++) {
|
for (var j = 0; j < works.length; j++) {
|
||||||
var work = works[j];
|
var work = works[j];
|
||||||
var workclass = classes.findOne({
|
var workclass = classes.findOne({
|
||||||
_id: work.class
|
_id: work.class
|
||||||
});
|
});
|
||||||
if (work.description == defaultWork.description) work.description = "";
|
// if (work.description == defaultWork.description) work.description = "";
|
||||||
if (work.dueDate == defaultWork.dueDate) continue;
|
// if (work.dueDate == defaultWork.dueDate) continue;
|
||||||
if (work.name == defaultWork.name) work.name = "";
|
// if (work.name == defaultWork.name) work.name = "";
|
||||||
if (workclass === undefined) workclass = {
|
if (workclass === undefined) workclass = {
|
||||||
name: "Personal"
|
name: "Personal"
|
||||||
};
|
};
|
||||||
@ -850,11 +852,11 @@ Template.main.events({
|
|||||||
sendData("toggleWork");
|
sendData("toggleWork");
|
||||||
},
|
},
|
||||||
'click .cWorkBottom .fa-thumbs-up' (event) {
|
'click .cWorkBottom .fa-thumbs-up' (event) {
|
||||||
serverData = [event.target.parentNode.parentNode.parentNode.parentNode.getAttribute("workid"), "confirmations"]
|
serverData = [event.target.parentNode.parentNode.parentNode.parentNode.getAttribute("workid"), "confirmations"];
|
||||||
sendData("toggleWork");
|
sendData("toggleWork");
|
||||||
},
|
},
|
||||||
'click .cWorkBottom .fa-exclamation-triangle' (event) {
|
'click .cWorkBottom .fa-exclamation-triangle' (event) {
|
||||||
serverData = [event.target.parentNode.parentNode.parentNode.parentNode.getAttribute("workid"), "reports"]
|
serverData = [event.target.parentNode.parentNode.parentNode.parentNode.getAttribute("workid"), "reports"];
|
||||||
sendData("toggleWork");
|
sendData("toggleWork");
|
||||||
},
|
},
|
||||||
'click #signout' () {
|
'click #signout' () {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import {
|
|||||||
Template
|
Template
|
||||||
} from 'meteor/templating';
|
} from 'meteor/templating';
|
||||||
|
|
||||||
Session.set("sections", [0,0]) // [Completed, Viewing]
|
Session.set("sections", [0,0]); // [Completed, Viewing]
|
||||||
Session.set("profile", {classes: []});
|
Session.set("profile", {classes: []});
|
||||||
Session.set("newClasses", []);
|
Session.set("newClasses", []);
|
||||||
Session.set("autocompleteDivs", null);
|
Session.set("autocompleteDivs", null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user