Changed Appreciation to Jr High Summer; Fixed sorting of internships such that changes get properly sorted; Added a proper date on news & notices on the home page using the page's update timestamp.

This commit is contained in:
Wynne Crisman
2019-01-07 16:53:54 -08:00
parent 0593c2421a
commit cac2ad9c41
21 changed files with 160 additions and 109 deletions

View File

@@ -10,12 +10,13 @@ Tracker.autorun(function() {
});
Template.InternshipEditor.onCreated(function() {
this.internships = Meteor.collections.Internship.find({}, {sort: {name: 1}});
//this.internships = Meteor.collections.Internship.find({}, {sort: {name: 1}});
Session.set(PREFIX + 'selectedInternship', null);
});
Template.InternshipEditor.helpers({
internships: function() {
return Template.instance().internships;
//return Template.instance().internships;
return Meteor.collections.Internship.find({}, {sort: {name: 1}});
},
selectedInternship: function() {
return Session.get(PREFIX + "selectedInternship");
@@ -107,7 +108,8 @@ Template.InternshipHtmlEditor.onCreated(function() {
let template = this;
//Only ask the user if they want to update their changes if they actually have changes that have not yet been saved.
if(data !== template.currentHtml) {
//Note: This is only useful if the user was editing an internship. If the user was looking at the list then template.currentHtml will be undefined.
if(template.currentHtml && data !== template.currentHtml) {
const changedData = data;
//Ensure this does not get run twice.