app.use( express.methodOverride() );
// Sets the routers middleware to load after everything set
// before it, but before static files.
+ app.use(express.logger({ format: ':method :url' }));
app.use( app.router );
// Static files are loaded when no dynamic views match.
app.use( express.static( __dirname + '/public' ) );
})
})
-app.get( '/archive/note/:id', loadUser, function( req, res ) {
+app.get( '/archive/note/:id', checkAjax, loadUser, function( req, res ) {
ArchivedNote.findById(req.params.id, function(err, note) {
if ( err ) {
res.json( {status: 'error', message: 'This is not a valid id for a note'} );
ProtoDiv.reset("PROTO_school");
- $.get("/schools", {}, function(response) {
+ $.get("/schools", { cache: false }, function(response) {
var schools = []
if(typeof response == 'object') {
ProtoDiv.reset("PROTO_course");
- $.get("/school/"+schoolId, {}, function(response) {
+ $.get("/school/"+schoolId, { cache: false }, function(response) {
var courses = []
if(typeof response == 'object') {
ProtoDiv.reset("PROTO_lecture");
- $.get("/course/"+courseId, {}, function(response) {
+ $.get("/course/"+courseId, { cache: false }, function(response) {
ProtoDiv.reset("PROTO_lectures_head")
ProtoDiv.reset("PROTO_lectures_instructor")
ProtoDiv.reset("PROTO_note");
- $.get("/lecture/"+lectureId, {}, function(response) {
+ $.get("/lecture/"+lectureId, { cache: false }, function(response) {
if(typeof response == 'object') {
ProtoDiv.reset("PROTO_archive_subject")
- $.get("/archive", { }, function(response) {
+ $.get("/archive", { cache: false }, function(response) {
var subjects = response.subjects
ProtoDiv.reset("PROTO_archive_course")
- $.get("/archive/subject/"+subjectId, { }, function(response) {
+ $.get("/archive/subject/"+subjectId, { cache: false }, function(response) {
var courses = response.courses
ProtoDiv.reset("PROTO_archive_note")
- $.get("/archive/course/"+courseId, { }, function(response) {
+ $.get("/archive/course/"+courseId, { cache: false }, function(response) {
var notes = response.notes
$.each(notes, function(i, note) {