This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
module.exports = { | |
adminWarning: function (currentuser, boxname) { // eslint-disable-line | |
var userbox = document.getElementsByName(boxname + '[superAdmin]') | |
if (boxname === currentuser && !userbox[0].checked) { | |
window.alert('Please be careful when changing your own Super Admin rights. You will need to contact another Super Admin to reinstate your privileges if you disable yours.') | |
} | |
}, | |
validate: function (form) { // eslint-disable-line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.index = function (req, res) { | |
console.log(req.user) | |
Events.find({}, function (err, foundEvents) { | |
if (err) console.error(err) | |
foundEvents = foundEvents.filter(function (event) { | |
return event.start >= moment().unix() | |
}).map(function (event) { | |
event.startDate = moment.unix(event.start).format('MMM DD') | |
return event | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main.js | |
window.getLocalZone = function getLocalZone (time) { | |
return moment.unix(time).tz(userzone).format('ha z MMMM DD, YYYY') | |
} | |
View | |
script. | |
window.getLocalZone(1312312312) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eventsSchema.statics.fetchMeetupEvents = function (meetupid) { | |
return new Promise(function (resolve, reject) { | |
request(meetupid, function (error, response, body) { | |
if (!error && response.statusCode === 200) { | |
var parsed = JSON.parse(body) | |
resolve(parsed.results) | |
}else{ | |
throw error | |
} | |
}) |