From 30a09416bfe2979c8c48f14c8e4943b30f7f6f51 Mon Sep 17 00:00:00 2001 From: Trevor Helms Date: Wed, 16 Dec 2015 01:40:56 -0500 Subject: [PATCH] Convert to using app.store for many items in the registration form; validate pdf/2mb file size --- app/store/data/anon-stats.json | 15 + app/store/data/majors.json | 178 ++++++++ app/store/data/schools.json | 455 +++++++++++++++++++ {lib/data => app/store}/index.js | 65 +-- app/views/layouts/_footer.jade | 8 +- app/views/registration/index.jade | 661 +--------------------------- boot/config.js | 3 +- lib/data/index.coffee | 16 - lib/data/schools.json | 1 - public/es6/register.js | 2 +- reg-test.json => test/reg-test.json | 0 updateRefs.js | 53 --- 12 files changed, 691 insertions(+), 766 deletions(-) create mode 100644 app/store/data/anon-stats.json create mode 100644 app/store/data/majors.json create mode 100644 app/store/data/schools.json rename {lib/data => app/store}/index.js (71%) delete mode 100644 lib/data/index.coffee delete mode 100644 lib/data/schools.json rename reg-test.json => test/reg-test.json (100%) delete mode 100644 updateRefs.js diff --git a/app/store/data/anon-stats.json b/app/store/data/anon-stats.json new file mode 100644 index 0000000..facc135 --- /dev/null +++ b/app/store/data/anon-stats.json @@ -0,0 +1,15 @@ +{ + "ethnicity": { + "white": "White", + "asian": "Asian", + "hispanic": "Hispanic", + "black": "Black", + "multicultural": "Multicultural", + "other": "Other" + }, + "gender": { + "male": "Male", + "female": "Female", + "other": "Other" + } +} diff --git a/app/store/data/majors.json b/app/store/data/majors.json new file mode 100644 index 0000000..1c398d8 --- /dev/null +++ b/app/store/data/majors.json @@ -0,0 +1,178 @@ +[ + "Agriculture", + "Ethnic Studies", + "Agricultural Sciences", + "Animal Sciences", + "Plant & Soil Sciences", + "Agricultural Business & Management", + "Range Management", + "Agricultural Mechanization", + "Horticulture", + "Veterinary Sciences", + "African Studies", + "American Studies", + "Asian & Pacific Area Studies", + "European Studies", + "Latin American Studies", + "Middle Eastern Studies", + "Afro-American (Black) Studies", + "Native American Studies", + "Hispanic-American Studies", + "Islamic Studies", + "Judaism & Jewish Studies", + "Biology", + "Biochemistry", + "Biophysics", + "Botany", + "Molecular Biology", + "Microbiology/Bacteriology", + "Zoology", + "Marine Biology", + "Physical Sciences", + "Astronomy", + "Astrophysics", + "Atmospheric Sciences", + "Meteorology", + "Chemistry", + "Geological Sciences", + "Physics", + "Earth & Space Sciences", + "Computer Science", + "Mathematics", + "Information Sciences", + "Computer Programming", + "Data Processing", + "Information Mgmt. Sciences", + "Computer Mathematics", + "Library Science", + "Museums & Preservation", + "Photography", + "Dramatic Arts", + "Fashion Design", + "Film Arts", + "Fine Arts", + "Music", + "Mathematics", + "Actuarial Sciences", + "Applied Mathematics", + "Statistics", + "Bilingual/Crosscultural Education", + "Special Education", + "Counseling Adult & Continuing Education", + "Elementary Education", + "Pre-School Education", + "Junior Education", + "Senior High Education", + "Art, Music, & Drama Education", + "Home Economics Education", + "Physical/Health/Fitness Education", + "Science Education", + "Vocational/Industrial Education", + "Business Education", + "Foreign Language Teacher Education", + "Liberal Arts Education", + "Social Science Education", + "Mathematics Education", + "Religious Education", + "Aerospace Engineering", + "Agricultural Engineering", + "Architectural Engineering", + "Bioengineering", + "Biomedical Engineering", + "Ceramic Engineering", + "Chemical Engineering", + "Civil Engineering", + "Communications Engineering", + "Computer Engineering", + "Electrical Engineering", + "Electronics Engineering", + "Geological Engineering", + "Geophysical Engineering", + "Industrial Engineering", + "Design Materials Engineering", + "Mechanical Engineering", + "Metallurgical Engineering", + "Mining & Mineral Engineering", + "Marine Engineering", + "Naval Architecture", + "Nuclear Engineering", + "Petroleum Engineering", + "Surveying & Mapping Sciences", + "Systems Analysis & Engineering", + "Drafting", + "Automotive Engineering & Technology", + "Electrical Technology", + "Electromechanical Technology", + "Environmental/Energy Control Technology", + "Engineering Mechanics", + "Occupational Safety & Health Technology", + "Construction & Building Technology", + "Aviation & Air Transportation", + "Transportation/Logistics", + "English", + "Literature", + "General & Interdisciplinary Studies", + "Military Science", + "English Language", + "Classics & Classical Studies", + "Comparative Literature", + "Creative Writing", + "Linguistics", + "American Literature", + "English Literature", + "Speech & Rhetorical Studies", + "Technical and Business Writing", + "Humanities", + "Conflict Resolution/Peace Studies", + "Women's Studies", + "Liberal/General Studies", + "Multi/Interdisciplinary Studies", + "Criminal Justice & Law Enforcement", + "Fire Protection & Security", + "Foreign Languages", + "Parks & Recreation", + "Philosophy", + "Religion", + "Theology", + "Chinese", + "Japanese", + "German", + "French", + "Italian", + "Spanish", + "Portuguese", + "Latin", + "Greek", + "Hebrew", + "Russian", + "Slavic (other than Russian)", + "Parks Administration", + "Sports, Recreation, & Leisure Studies", + "Equestrian Studies", + "Conservation Management & Protection", + "Forestry Production & Processing", + "Forestry Wildlife & Fish Management", + "Ecology Sciences", + "Environmental Sciences", + "Environmental Studies", + "Bible Studies", + "Religious Education", + "Religious Music", + "Public Affairs & Law", + "Social Work", + "Pre-Law", + "Social Sciences", + "Anthropology", + "Archaeology", + "Criminology", + "Economics", + "Geography", + "History", + "International Affairs/Relations", + "Political Science", + "Psychology", + "Sociology", + "Urban Studies", + "Sports Medicine", + "Pre-Dental" +] diff --git a/app/store/data/schools.json b/app/store/data/schools.json new file mode 100644 index 0000000..c78bd99 --- /dev/null +++ b/app/store/data/schools.json @@ -0,0 +1,455 @@ +[ + "Adelphi University", + "Agnes Scott College", + "University of Alabama", + "University of Alabama Birmingham", + "University of Alabama Huntsville", + "Albion College", + "Albright College", + "Alfred University", + "Allegheny College", + "American International College", + "American University", + "Amherst College", + "Antioch College", + "University of Arizona", + "Arizona State University", + "University of Arkansas", + "Assumption College", + "College of the Atlantic", + "Auburn University", + "Austin College", + "Babson College", + "Ball State University", + "Bard College", + "Baruch College, City University of New York", + "Baylor University", + "Belmont University", + "Beloit College", + "Bennington College", + "Bentley University", + "Birmingham Southern College", + "Berea College", + "Boston College", + "Boston University", + "Bowling Green State University", + "Bradley University", + "Brandeis University", + "Brigham Young University", + "University of British Columbia", + "Brooklyn College", + "Brown University", + "Bucknell University", + "Butler University", + "University of California - Berkeley", + "University of California - Davis", + "University of California - Irvine", + "University of California - Los Angeles", + "University of California - Merced", + "University of California - Riverside", + "University of California - San Diego", + "University of California - Santa Barbara", + "University of California - Santa Cruz", + "California Institute of Technology", + "California Lutheran University", + "Cal Poly Pomona", + "Cal Poly San Luis Obispo", + "California State University - GENERAL", + "California State University - Fresno", + "California State University - Fullerton", + "California State University - Long Beach", + "California State University - Los Angeles", + "California State University - Monterey Bay", + "California State University - Northridge", + "Carleton College", + "Carnegie Mellon University", + "Carroll College", + "Case Western Reserve University", + "Catholic University of America", + "Central Connecticut State University", + "Centre College", + "Champlain College", + "Chapman University", + "University of Chicago", + "Christopher Newport University", + "University of Cincinnati", + "City College of New York", + "Claremont McKenna College", + "Clark University", + "Clarkson University", + "Clemson University", + "Coe College", + "Colby College", + "Colgate University", + "College of Charleston", + "University of Colorado - Boulder", + "Colorado College", + "Colorado School of Mines", + "Colorado State University", + "Columbia College Chicago", + "University of Connecticut", + "Connecticut College", + "Cooper Union", + "Cornell College", + "Columbia University", + "Cornell University", + "Creighton University", + "CUNY System", + "Dartmouth College", + "University of Dayton", + "Deep Springs College", + "DePaul University", + "DePauw University", + "Denison University", + "University of Delaware", + "University of Denver", + "Dickinson College", + "Dominican University of California", + "Drew University", + "Drexel University", + "Duke University", + "Duquesne University", + "Earlham College", + "East Carolina University", + "Eckerd College", + "Elizabethtown College", + "Elon University", + "Embry-Riddle - Daytona Beach", + "Embry-Riddle - Prescott", + "Emerson College", + "Emory University", + "Florida State University", + "University of Florida", + "University of Central Florida", + "Fairfield University", + "Fairleigh Dickinson University", + "Fashion Institute of Technology", + "Fisk University", + "Flagler College", + "Florida Atlantic University", + "Florida A&M University", + "Florida Institute of Technology", + "Florida International University", + "Fordham University", + "Franklin & Marshall College", + "Furman University", + "George Mason University", + "George Washington University", + "Georgetown University", + "Georgia Institute of Technology", + "Georgia State University", + "Georgia Tech", + "Gettysburg College", + "Goddard College", + "Golden Gate University", + "Gonzaga University", + "Goucher College", + "Grinnell College", + "Grove City College", + "Gustavus Adolphus College", + "University of Georgia", + "Hamilton College", + "Hampden-Sydney College", + "Hampshire College", + "Hampton University", + "Hanover College", + "University of Hartford", + "Hartwick College", + "Harvard University", + "Harvey Mudd College", + "Haverford College", + "Hendrix College", + "High Point University", + "Hillsdale College", + "Hiram College", + "Hobart and William Smith Colleges", + "Hofstra University", + "Hollins University", + "College of the Holy Cross", + "Hope College", + "Howard University", + "Humboldt State University", + "Illinois Institute of Technology", + "Illinois Wesleyan University", + "Indiana University - Bloomington", + "Indiana University - South Bend", + "Indiana University of Pennsylvania", + "Indiana University-Purdue University Indianapolis", + "Ithaca College", + "University of Illinois - Chicago", + "University of Illinois - Urbana-Champaign", + "University of Iowa", + "Iowa State University", + "James Madison University", + "Johns Hopkins University", + "Juniata College", + "The Juilliard School", + "Kalamazoo College", + "Kansas State University", + "Kent State University", + "Kenyon College", + "Knox College", + "University of Kansas", + "University of Kentucky", + "Lafayette College", + "Lake Forest College", + "LaSalle University", + "Lawrence University", + "Lehigh University", + "Lewis & Clark College", + "Linfield College", + "Louisiana State University", + "Loyola Marymount University", + "Loyola University Maryland", + "Loyola University - New Orleans", + "Loyola University of Chicago", + "Lynchburg College", + "Macalester College", + "Manhattan College", + "Manhattanville College", + "Marietta College", + "Marist College", + "Marlboro College", + "Marquette University", + "Massachusetts Institute of Technology", + "Marymount Manhattan College", + "McGill University", + "Mercer University", + "Merrimack College", + "Miami University - Ohio", + "Michigan State University", + "Michigan Technological University", + "Middlebury College", + "Mills College", + "Millsaps College", + "Mississippi State University", + "Monmouth University", + "Montclair State University", + "Moravian College", + "Morehouse College", + "Mount Holyoke College", + "Muhlenberg College", + "University of Maine", + "University of Mary Washington", + "University of Maryland - Baltimore County", + "University of Maryland - College Park", + "University of Massachusetts - Amherst", + "University of Massachusetts - Boston", + "University of Miami - Florida", + "University of Michigan - Ann Arbor", + "University of Minnesota - Twin Cities", + "University of Mississippi", + "University of Missouri - Columbia", + "University of Missouri - Kansas City", + "Missouri University of Science and Technology", + "University of Montana - Missoula", + "New College of Florida", + "New England College", + "New Jersey Institute of Technology", + "New Mexico Institute of Mining & Technology", + "New York University", + "University of North Carolina - Chapel Hill", + "North Carolina School of the Arts", + "North Carolina State University", + "Northeastern University", + "Northern Arizona University", + "Northwestern University", + "The College of New Jersey", + "University of Nebraska - Lincoln", + "University of Nevada - Las Vegas", + "University of New Hampshire", + "University of New Haven", + "University of New Mexico", + "University of New Orleans", + "University of North Carolina - Asheville", + "University of North Carolina - Charlotte", + "University of North Carolina - Greensboro", + "University of North Carolina - Wilmington", + "University of North Dakota", + "University of Notre Dame", + "University of North Florida", + "Oberlin College", + "Occidental College", + "Oglethorpe University", + "Ohio Northern University", + "Ohio State University - Columbus", + "Ohio University - Athens", + "Ohio Wesleyan University", + "Old Dominion University", + "Olin College", + "Oregon State University", + "University of Oklahoma", + "University of Oregon", + "Pace University", + "Parsons School of Design", + "Penn State - University Park", + "Pepperdine University", + "Philadelphia University", + "Pitzer College", + "Pomona College", + "Pratt Institute", + "Princeton University", + "Providence College", + "Purdue University - West Lafayette", + "University of Pennsylvania", + "University of Pittsburgh", + "University of Puget Sound", + "University of the Pacific", + "Queens University - Kingston, Ontario", + "Quinnipiac University", + "Randolph College", + "Randolph-Macon College", + "Reed College", + "Regis University", + "Rensselaer Polytechnic Institute", + "Rhode Island school of Design", + "Rhodes College - Memphis", + "Rice University", + "Rider University", + "Ripon College", + "Rochester Institute of Technology", + "Rollins College", + "Rose-Hulman Institute of Technology", + "Rowan University", + "Rutgers", + "University of Redlands", + "University of Rhode Island", + "University of Richmond", + "University of Rochester", + "Sacred Heart University", + "Saint Anselm College", + "St. Bonaventure University", + "St. John's College (Maryland)", + "St. John's College (New Mexico)", + "St. John's University", + "Saint John's University - College of Saint Benedict", + "Saint Joseph's University", + "St. Lawrence University", + "Saint Louis University", + "Saint Mary's College - Notre Dame", + "Saint Mary's College of California", + "St. Mary's College of Maryland", + "Saint Michael's College", + "Saint Olaf College", + "Salisbury University", + "Salve Regina University", + "Samford University", + "San Diego State University", + "San Francisco State University", + "Santa Clara University", + "Sarah Lawrence College", + "Savannah College of Art and Design", + "School of Visual Arts", + "Scripps College", + "Seattle University", + "Seton Hall University", + "Sewanee: The University of the South", + "Shimer College", + "Siena College", + "Simmons College", + "Simon's Rock College of Bard", + "Skidmore College", + "Smith College", + "Soka University of America", + "Sonoma State University", + "Southern Methodist University", + "Southwestern University", + "Spelman College", + "Stanford University", + "Stephens College", + "Stetson University", + "Stevens Institute of Technology", + "Stevenson University", + "Stonehill College", + "SUNY - General", + "SUNY at Albany", + "SUNY at Binghamton", + "SUNY at Buffalo", + "SUNY at Stony Brook", + "SUNY College at Geneseo", + "SUNY College at Purchase", + "Susquehanna University", + "Swarthmore College", + "Sweet Briar College", + "Syracuse University", + "University of San Diego", + "University of San Francisco", + "University of Scranton", + "University of South Carolina - Columbia", + "University of South Florida", + "University of Southern California", + "Tallahassee Community College", + "Texas Christian University", + "Temple University", + "Texas A&M University", + "Texas Tech University", + "The University of Texas at Austin", + "The University of Texas at Dallas", + "Thomas Aquinas College - California", + "Towson University", + "Trinity College - Connecticut", + "Trinity University", + "Truman State University", + "Tufts University", + "Tulane University", + "Tuskegee University", + "University of Tampa", + "University of Tennessee - Knoxville", + "University of Toronto", + "University of Tulsa", + "Union College - New York", + "United States Air Force Academy", + "United States Coast Guard Academy", + "United States Merchant Marine Academy", + "United States Military Academy", + "United States Naval Academy", + "University of the Sciences in Philadelphia", + "Ursinus College", + "Ursuline College", + "University of Vermont", + "University of Virginia", + "Valparaiso University", + "Vanderbilt University", + "Vassar College", + "Villanova University", + "Virginia Commonwealth University", + "Virginia Tech", + "Virginia Wesleyan College", + "College of William and Mary", + "College of Wooster", + "University of Washington", + "University of Wisconsin - Madison", + "University of Wyoming", + "Wabash College", + "Wagner College", + "Wake Forest University", + "Warren Wilson College", + "Washington and Lee University", + "Washington College", + "Washington State University", + "Washington University in St. Louis", + "University of Waterloo", + "Webb Institute", + "Wellesley College", + "Wells College", + "Wesleyan College", + "Wesleyan University", + "West Virginia University", + "Western Michigan University", + "Western Washington University", + "Westminster College - Pennsylvania", + "Wheaton College - Illinois", + "Wheaton College - Massachusetts", + "Whitman College", + "Whittier College", + "Willamette University", + "William Jewell College", + "Williams College", + "Wittenberg University", + "Wofford College", + "Worcester Polytechnic Institute", + "Wright State University", + "Xavier University", + "Yale University", + "Yeshiva University" +] diff --git a/lib/data/index.js b/app/store/index.js similarity index 71% rename from lib/data/index.js rename to app/store/index.js index 2c32261..4d239e0 100644 --- a/lib/data/index.js +++ b/app/store/index.js @@ -1,5 +1,5 @@ /** - * Load any static data and constants + * Initialization file for app-wide store. * * TODO: Move any applicable data from here into the database and load them * on app start into the cache @@ -9,27 +9,35 @@ */ 'use strict'; -import schoolData from './schools.json'; +import schools from './data/schools.json'; +import majors from './data/majors.json'; +import anonStats from './data/anon-stats.json'; +// store represents an object containing all static data to be used in the app +let store = {}; -var store = {}; - -// Add all data to the store -store.HOST_NAME = 'hackfsu.com'; +store.app = { + name: 'HackFSU', + host_name: 'hackfsu.com', + copyright: `\u00a9 ${new Date().getFullYear()} HackFSU` // Uses unicode value for copyright symbol +}; store.email = { - FROM_EMAIL_NOREPLY: 'noreply@' + exports.HOST_NAME, // fake - FROM_EMAIL_REGISTER: 'register@' + exports.HOST_NAME, // fake - FROM_EMAIL_INFO: 'info@' + exports.HOST_NAME, // valid - FROM_NAME: 'HackFSU' + noreply: 'noreply@' + store.HOST_NAME, + register: 'register@' + store.HOST_NAME, + info: 'info@' + store.HOST_NAME, + from_name: 'HackFSU' }; store.links = { twitter: 'http://www.twitter.com/HackFSU', - facebook: '' + facebook: 'https://www.facebook.com/hackfsu', + instagram: 'https://www.instagram.com/hackfsu' }; -store.schoolData = schoolData; +store.schools = schools; +store.majors = majors; +store.anonStats = anonStats; store.shirtSizes = { 'm-s': 'Men\'s Small', @@ -42,31 +50,6 @@ store.shirtSizes = { 'w-xl': 'Women\'s Extra Large' }; -// List of stats and their option choices. -// Ids are explicit to allow for verboseness. Do not change them once data -// has been collected. -store.anonStats = { - 0: { - name: 'Ethnicity', - options: { - 0: 'White', - 1: 'Asian', - 2: 'Hispanic', - 3: 'Multicultural', - 4: 'Other' - } - }, - - 1: { - name: 'Gender', - options: { - 0: 'Male', - 1: 'Female', - 2: 'Other' - } - } -}; - store.hackerGoals = { 0: 'ios', 1: 'android', @@ -78,7 +61,7 @@ store.hackerGoals = { store.jobGoals = { 0: 'internship', - 1: 'partTime', + 1: 'partTime', 2: 'fullTime' }; @@ -98,7 +81,7 @@ store.util = { }, /** - * Searches for the ids of the stat and option AnonStat pair by name. + * Searches for the ids of the stat and option AnonStat pair by name. * Result object should be checked for statId & optionId */ getAnonStatIdPair: function(statName, optionName) { @@ -146,7 +129,7 @@ store.util = { id = loopkupFunction(value); if(id) { arrayOfIds.push(id); - } + } }); return arrayOfIds; @@ -154,4 +137,4 @@ store.util = { }; -export default store; +export default store; diff --git a/app/views/layouts/_footer.jade b/app/views/layouts/_footer.jade index 39e7d7a..7fde494 100644 --- a/app/views/layouts/_footer.jade +++ b/app/views/layouts/_footer.jade @@ -1,11 +1,11 @@ .clear.center-text.footer .footer-content.center-text.block.content-960.center-relative .social.center-text - a(href='https://twitter.com/HackFSU' style='text-decoration:none;') + a(href='#{store.links.twitter}' style='text-decoration:none;') i.fa.fa-twitter - a(href='https://www.facebook.com/hackfsu' style='text-decoration:none;') + a(href='#{store.links.facebook}' style='text-decoration:none;') i.fa.fa-facebook - a(href='https://www.instagram.com/hackfsu/' style='text-decoration:none;') + a(href='#{store.links.instagram}' style='text-decoration:none;') i.last.fa.fa-instagram .footer-copyright.center-text - | © 2015 HackFSU + = store.app.copyright diff --git a/app/views/registration/index.jade b/app/views/registration/index.jade index 7e34c36..799c1cf 100644 --- a/app/views/registration/index.jade +++ b/app/views/registration/index.jade @@ -69,459 +69,8 @@ block content .one_half input#school(type='text' name='school' placeholder='Florida State University' list='school-list' data-validation='required') datalist#school-list - option Adelphi University - option Agnes Scott College - option University of Alabama - option University of Alabama Birmingham - option University of Alabama Huntsville - option Albion College - option Albright College - option Alfred University - option Allegheny College - option American International College - option American University - option Amherst College - option Antioch College - option University of Arizona - option Arizona State University - option University of Arkansas - option Assumption College - option College of the Atlantic - option Auburn University - option Austin College - option Babson College - option Ball State University - option Bard College - option Baruch College, City University of New York - option Baylor University - option Belmont University - option Beloit College - option Bennington College - option Bentley University - option Birmingham Southern College - option Berea College - option Boston College - option Boston University - option Bowling Green State University - option Bradley University - option Brandeis University - option Brigham Young University - option University of British Columbia - option Brooklyn College - option Brown University - option Bucknell University - option Butler University - option University of California - Berkeley - option University of California - Davis - option University of California - Irvine - option University of California - Los Angeles - option University of California - Merced - option University of California - Riverside - option University of California - San Diego - option University of California - Santa Barbara - option University of California - Santa Cruz - option California Institute of Technology - option California Lutheran University - option Cal Poly Pomona - option Cal Poly San Luis Obispo - option California State University - GENERAL - option California State University - Fresno - option California State University - Fullerton - option California State University - Long Beach - option California State University - Los Angeles - option California State University - Monterey Bay - option California State University - Northridge - option Carleton College - option Carnegie Mellon University - option Carroll College - option Case Western Reserve University - option Catholic University of America - option Central Connecticut State University - option Centre College - option Champlain College - option Chapman University - option University of Chicago - option Christopher Newport University - option University of Cincinnati - option City College of New York - option Claremont McKenna College - option Clark University - option Clarkson University - option Clemson University - option Coe College - option Colby College - option Colgate University - option College of Charleston - option University of Colorado - Boulder - option Colorado College - option Colorado School of Mines - option Colorado State University - option Columbia College Chicago - option University of Connecticut - option Connecticut College - option Cooper Union - option Cornell College - option Columbia University - option Cornell University - option Creighton University - option CUNY System - option Dartmouth College - option University of Dayton - option Deep Springs College - option DePaul University - option DePauw University - option Denison University - option University of Delaware - option University of Denver - option Dickinson College - option Dominican University of California - option Drew University - option Drexel University - option Duke University - option Duquesne University - option Earlham College - option East Carolina University - option Eckerd College - option Elizabethtown College - option Elon University - option Embry-Riddle - Daytona Beach - option Embry-Riddle - Prescott - option Emerson College - option Emory University - option Florida State University - option University of Florida - option University of Central Florida - option Fairfield University - option Fairleigh Dickinson University - option Fashion Institute of Technology - option Fisk University - option Flagler College - option Florida Atlantic University - option Florida A&M University - option Florida Institute of Technology - option Florida International University - option Fordham University - option Franklin & Marshall College - option Furman University - option George Mason University - option George Washington University - option Georgetown University - option Georgia Institute of Technology - option Georgia State University - option Georgia Tech - option Gettysburg College - option Goddard College - option Golden Gate University - option Gonzaga University - option Goucher College - option Grinnell College - option Grove City College - option Gustavus Adolphus College - option University of Georgia - option Hamilton College - option Hampden-Sydney College - option Hampshire College - option Hampton University - option Hanover College - option University of Hartford - option Hartwick College - option Harvard University - option Harvey Mudd College - option Haverford College - option Hendrix College - option High Point University - option Hillsdale College - option Hiram College - option Hobart and William Smith Colleges - option Hofstra University - option Hollins University - option College of the Holy Cross - option Hope College - option Howard University - option Humboldt State University - option Illinois Institute of Technology - option Illinois Wesleyan University - option Indiana University - Bloomington - option Indiana University - South Bend - option Indiana University of Pennsylvania - option Indiana University-Purdue University Indianapolis - option Ithaca College - option University of Illinois - Chicago - option University of Illinois - Urbana-Champaign - option University of Iowa - option Iowa State University - option James Madison University - option Johns Hopkins University - option Juniata College - option The Juilliard School - option Kalamazoo College - option Kansas State University - option Kent State University - option Kenyon College - option Knox College - option University of Kansas - option University of Kentucky - option Lafayette College - option Lake Forest College - option LaSalle University - option Lawrence University - option Lehigh University - option Lewis & Clark College - option Linfield College - option Louisiana State University - option Loyola Marymount University - option Loyola University Maryland - option Loyola University - New Orleans - option Loyola University of Chicago - option Lynchburg College - option Macalester College - option Manhattan College - option Manhattanville College - option Marietta College - option Marist College - option Marlboro College - option Marquette University - option Massachusetts Institute of Technology - option Marymount Manhattan College - option McGill University - option Mercer University - option Merrimack College - option Miami University - Ohio - option Michigan State University - option Michigan Technological University - option Middlebury College - option Mills College - option Millsaps College - option Mississippi State University - option Monmouth University - option Montclair State University - option Moravian College - option Morehouse College - option Mount Holyoke College - option Muhlenberg College - option University of Maine - option University of Mary Washington - option University of Maryland - Baltimore County - option University of Maryland - College Park - option University of Massachusetts - Amherst - option University of Massachusetts - Boston - option University of Miami - Florida - option University of Michigan - Ann Arbor - option University of Minnesota - Twin Cities - option University of Mississippi - option University of Missouri - Columbia - option University of Missouri - Kansas City - option Missouri University of Science and Technology - option University of Montana - Missoula - option New College of Florida - option New England College - option New Jersey Institute of Technology - option New Mexico Institute of Mining & Technology - option New York University - option University of North Carolina - Chapel Hill - option North Carolina School of the Arts - option North Carolina State University - option Northeastern University - option Northern Arizona University - option Northwestern University - option The College of New Jersey - option University of Nebraska - Lincoln - option University of Nevada - Las Vegas - option University of New Hampshire - option University of New Haven - option University of New Mexico - option University of New Orleans - option University of North Carolina - Asheville - option University of North Carolina - Charlotte - option University of North Carolina - Greensboro - option University of North Carolina - Wilmington - option University of North Dakota - option University of Notre Dame - option University of North Florida - option Oberlin College - option Occidental College - option Oglethorpe University - option Ohio Northern University - option Ohio State University - Columbus - option Ohio University - Athens - option Ohio Wesleyan University - option Old Dominion University - option Olin College - option Oregon State University - option University of Oklahoma - option University of Oregon - option Pace University - option Parsons School of Design - option Penn State - University Park - option Pepperdine University - option Philadelphia University - option Pitzer College - option Pomona College - option Pratt Institute - option Princeton University - option Providence College - option Purdue University - West Lafayette - option University of Pennsylvania - option University of Pittsburgh - option University of Puget Sound - option University of the Pacific - option Queens University - Kingston, Ontario - option Quinnipiac University - option Randolph College - option Randolph-Macon College - option Reed College - option Regis University - option Rensselaer Polytechnic Institute - option Rhode Island school of Design - option Rhodes College - Memphis - option Rice University - option Rider University - option Ripon College - option Rochester Institute of Technology - option Rollins College - option Rose-Hulman Institute of Technology - option Rowan University - option Rutgers - option University of Redlands - option University of Rhode Island - option University of Richmond - option University of Rochester - option Sacred Heart University - option Saint Anselm College - option St. Bonaventure University - option St. John's College (Maryland) - option St. John's College (New Mexico) - option St. John's University - option Saint John's University - College of Saint Benedict - option Saint Joseph's University - option St. Lawrence University - option Saint Louis University - option Saint Mary's College - Notre Dame - option Saint Mary's College of California - option St. Mary's College of Maryland - option Saint Michael's College - option Saint Olaf College - option Salisbury University - option Salve Regina University - option Samford University - option San Diego State University - option San Francisco State University - option Santa Clara University - option Sarah Lawrence College - option Savannah College of Art and Design - option School of Visual Arts - option Scripps College - option Seattle University - option Seton Hall University - option Sewanee: The University of the South - option Shimer College - option Siena College - option Simmons College - option Simon's Rock College of Bard - option Skidmore College - option Smith College - option Soka University of America - option Sonoma State University - option Southern Methodist University - option Southwestern University - option Spelman College - option Stanford University - option Stephens College - option Stetson University - option Stevens Institute of Technology - option Stevenson University - option Stonehill College - option SUNY - General - option SUNY at Albany - option SUNY at Binghamton - option SUNY at Buffalo - option SUNY at Stony Brook - option SUNY College at Geneseo - option SUNY College at Purchase - option Susquehanna University - option Swarthmore College - option Sweet Briar College - option Syracuse University - option University of San Diego - option University of San Francisco - option University of Scranton - option University of South Carolina - Columbia - option University of South Florida - option University of Southern California - option Tallahassee Community College - option Texas Christian University - option Temple University - option Texas A&M University - option Texas Tech University - option The University of Texas at Austin - option The University of Texas at Dallas - option Thomas Aquinas College - California - option Towson University - option Trinity College - Connecticut - option Trinity University - option Truman State University - option Tufts University - option Tulane University - option Tuskegee University - option University of Tampa - option University of Tennessee - Knoxville - option University of Toronto - option University of Tulsa - option Union College - New York - option United States Air Force Academy - option United States Coast Guard Academy - option United States Merchant Marine Academy - option United States Military Academy - option United States Naval Academy - option University of the Sciences in Philadelphia - option Ursinus College - option Ursuline College - option University of Vermont - option University of Virginia - option Valparaiso University - option Vanderbilt University - option Vassar College - option Villanova University - option Virginia Commonwealth University - option Virginia Tech - option Virginia Wesleyan College - option College of William and Mary - option College of Wooster - option University of Washington - option University of Wisconsin - Madison - option University of Wyoming - option Wabash College - option Wagner College - option Wake Forest University - option Warren Wilson College - option Washington and Lee University - option Washington College - option Washington State University - option Washington University in St. Louis - option University of Waterloo - option Webb Institute - option Wellesley College - option Wells College - option Wesleyan College - option Wesleyan University - option West Virginia University - option Western Michigan University - option Western Washington University - option Westminster College - Pennsylvania - option Wheaton College - Illinois - option Wheaton College - Massachusetts - option Whitman College - option Whittier College - option Willamette University - option William Jewell College - option Williams College - option Wittenberg University - option Wofford College - option Worcester Polytechnic Institute - option Wright State University - option Xavier University - option Yale University - option Yeshiva University + each school in store.schools + option= school .one_fourth.last .clear @@ -544,14 +93,8 @@ block content .one_half select#shirtSize(name='shirtSize' value='shirtSize' data-validation='required') option(selected='true' disabled='true') Pick a size - option(value='m-s') Men's Small - option(value='m-m') Men's Medium - option(value='m-l') Men's Large - option(value='m-xl') Men's Extra Large - option(value='w-s') Women's Small - option(value='w-m') Women's Medium - option(value='w-l') Women's Large - option(value='w-xl') Women's Extra Large + each val, key in store.shirtSizes + option(value='#{key}')= val .one_fourth.last .clear @@ -560,182 +103,9 @@ block content .one_half input#major(type='text' name='major' placeholder="What books you readin'" data-validation='required' list='majors-list') datalist#majors-list - option Agriculture - option Ethnic Studies - option Agricultural Sciences - option Animal Sciences - option Plant & Soil Sciences - option Agricultural Business & Management - option Range Management - option Agricultural Mechanization - option Horticulture - option Veterinary Sciences - option African Studies - option American Studies - option Asian & Pacific Area Studies - option European Studies - option Latin American Studies - option Middle Eastern Studies - option Afro-American (Black) Studies - option Native American Studies - option Hispanic-American Studies - option Islamic Studies - option Judaism & Jewish Studies - option Biology - option Biochemistry - option Biophysics - option Botany - option Molecular Biology - option Microbiology/Bacteriology - option Zoology - option Marine Biology - option Physical Sciences - option Astronomy - option Astrophysics - option Atmospheric Sciences - option Meteorology - option Chemistry - option Geological Sciences - option Physics - option Earth & Space Sciences - option Computer Science - option Mathematics - option Information Sciences - option Computer Programming - option Data Processing - option Information Mgmt. Sciences - option Computer Mathematics - option Library Science - option Museums & Preservation - option Photography - option Dramatic Arts - option Fashion Design - option Film Arts - option Fine Arts - option Music - option Mathematics - option Actuarial Sciences - option Applied Mathematics - option Statistics - option Bilingual/Crosscultural Education - option Special Education - option Counseling Adult & Continuing Education - option Elementary Education - option Pre-School Education - option Junior Education - option Senior High Education - option Art, Music, & Drama Education - option Home Economics Education - option Physical/Health/Fitness Education - option Science Education - option Vocational/Industrial Education - option Business Education - option Foreign Language Teacher Education - option Liberal Arts Education - option Social Science Education - option Mathematics Education - option Religious Education - option Aerospace Engineering - option Agricultural Engineering - option Architectural Engineering - option Bioengineering - option Biomedical Engineering - option Ceramic Engineering - option Chemical Engineering - option Civil Engineering - option Communications Engineering - option Computer Engineering - option Electrical Engineering - option Electronics Engineering - option Geological Engineering - option Geophysical Engineering - option Industrial Engineering - option Design Materials Engineering - option Mechanical Engineering - option Metallurgical Engineering - option Mining & Mineral Engineering - option Marine Engineering - option Naval Architecture - option Nuclear Engineering - option Petroleum Engineering - option Surveying & Mapping Sciences - option Systems Analysis & Engineering - option Drafting - option Automotive Engineering & Technology - option Electrical Technology - option Electromechanical Technology - option Environmental/Energy Control Technology - option Engineering Mechanics - option Occupational Safety & Health Technology - option Construction & Building Technology - option Aviation & Air Transportation - option Transportation/Logistics - option English - option Literature - option General & Interdisciplinary Studies - option Military Science - option English Language - option Classics & Classical Studies - option Comparative Literature - option Creative Writing - option Linguistics - option American Literature - option English Literature - option Speech & Rhetorical Studies - option Technical and Business Writing - option Humanities - option Conflict Resolution/Peace Studies - option Women's Studies - option Liberal/General Studies - option Multi/Interdisciplinary Studies - option Criminal Justice & Law Enforcement - option Fire Protection & Security - option Foreign Languages - option Parks & Recreation - option Philosophy - option Religion - option Theology - option Chinese - option Japanese - option German - option French - option Italian - option Spanish - option Portuguese - option Latin - option Greek - option Hebrew - option Russian - option Slavic (other than Russian) - option Parks Administration - option Sports, Recreation, & Leisure Studies - option Equestrian Studies - option Conservation Management & Protection - option Forestry Production & Processing - option Forestry Wildlife & Fish Management - option Ecology Sciences - option Environmental Sciences - option Environmental Studies - option Bible Studies - option Religious Education - option Religious Music - option Public Affairs & Law - option Social Work - option Pre-Law - option Social Sciences - option Anthropology - option Archaeology - option Criminology - option Economics - option Geography - option History - option International Affairs/Relations - option Political Science - option Psychology - option Sociology - option Urban Studies - option Sports Medicine - option Pre-Dental + each major in store.majors + option= major + .one_fourth.last .clear @@ -759,9 +129,9 @@ block content .one_fourth label(for='resume') Resume .one_half - input#resume(type='file' name='resume') + input#resume(type='file' name='resume' data-validation='mime size' data-validation-allowing='pdf' data-validation-max-size='2M') textarea#resumeBase64(name='resumeBase64' style='display: none;') - .help-block File size must be less than 2mb. + .help-block File size must be less than 2mb and in PDF format. .one_fourth.last .clear @@ -840,9 +210,8 @@ block content .one_half select#gender(name='gender') option(selected='true' disabled='true') Select your gender - option(value='male') Male - option(value='female') Female - option(value='other') Other + each val, key in store.anonStats.gender + option(value='#{key}')= val .help-block Answering this optional field is anonymous and will not be associated with your account. .one_fourth.last .clear @@ -852,12 +221,8 @@ block content .one_half select#ethnicity(name='ethnicity') option(selected='true' disabled='true') Select your ethnicity - option(value='white') White - option(value='asian') Asian - option(value='hispanic') Hispanic - option(value='black') Black - option(value='multicultural') Multicultural - option(value='other') Other + each val, key in store.anonStats.ethnicity + option(value='#{key}')= val .help-block Answering this optional field is anonymous and will not be associated with your account. .one_fourth.last .clear diff --git a/boot/config.js b/boot/config.js index 68951b9..28d6508 100644 --- a/boot/config.js +++ b/boot/config.js @@ -8,7 +8,6 @@ import http from 'http'; import express from 'express'; import validator from 'validator'; -import expressValidator from 'express-validator'; import session from 'express-session'; import io from 'socket.io'; import Parse from 'parse/node'; @@ -28,7 +27,7 @@ import morgan from 'morgan'; // Project utilities/core import * as customLoader from '../lib/customLoader'; import * as helpers from '../app/helpers'; -import store from '../lib/data'; +import store from '../app/store'; import EmailManager from '../lib/EmailManager'; import { default as validate } from '../lib/validate'; import ACL from '../lib/acl'; diff --git a/lib/data/index.coffee b/lib/data/index.coffee deleted file mode 100644 index 015c3b7..0000000 --- a/lib/data/index.coffee +++ /dev/null @@ -1,16 +0,0 @@ -## -# Load any static data and constants -## - -# Base -exports.HOST_NAME = 'hackfsu.com' - -# Email -exports.email = - FROM_EMAIL_NOREPY: 'noreply@' + exports.HOST_NAME # fake - FROM_EMAIL_REGISTER: 'register@' + exports.HOST_NAME # fake - FROM_EMAIL_INFO: 'info@' + exports.HOST_NAME # valid - FROM_NAME: 'HackFSU' - -# TODO -exports.schools = require './schools.json' diff --git a/lib/data/schools.json b/lib/data/schools.json deleted file mode 100644 index 0637a08..0000000 --- a/lib/data/schools.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/public/es6/register.js b/public/es6/register.js index 7477e7e..c7b6379 100644 --- a/public/es6/register.js +++ b/public/es6/register.js @@ -28,7 +28,7 @@ if (window.File && window.FileReader && window.FileList && window.Blob) { $.validate({ form: '#application', - modules: 'html5, security', + modules: 'html5, security, file', borderColorOnError: '#ef626c', errorElementClass: 'form-error', errorMessagePosition: $errorMessages, diff --git a/reg-test.json b/test/reg-test.json similarity index 100% rename from reg-test.json rename to test/reg-test.json diff --git a/updateRefs.js b/updateRefs.js deleted file mode 100644 index cab20d7..0000000 --- a/updateRefs.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Simple script to generate main.d.ts based on files - */ - -var glob = require('glob'); -var fs = require('fs'); -var path = require('path'); -var Q = require('q'); - -module.exports = function() { - var output = ''; - var outFile = 'main.d.ts'; - - var dfd = Q.defer(); - - // Get filenames - var patterns = [ - 'app/**/*.d.ts', - 'boot/**/*.d.ts', - 'lib/**/*.d.ts' - ]; - - var filenames = []; - for(i = 0; i < patterns.length; ++i) { - filenames = filenames.concat(glob.sync(patterns[i], { - root: __dirname - })); - } - - console.log('Found ' + filenames.length + ' definitions...'); - - // Make the references - output += '/* Generated by `node '+path.basename(__filename)+'` */\n'; - output += '/// \n'; - for(i = 0; i < filenames.length; ++i) { - output += '/// \n'; - } - - // Save new file - fs.writeFile(outFile, output, function(err) { - if(err) { - console.log(err); - dfd.reject(); - return; - } - - console.log('References updated in "' + outFile+ '"'); - dfd.resolve(); - }); - - return dfd.promise; -}; -