From a530e70cf84b313ecb40488cd4b002c52b11ab9d Mon Sep 17 00:00:00 2001 From: Dana Kulp Date: Thu, 27 Oct 2016 19:10:28 -0700 Subject: [PATCH 1/4] Scaffold object constructor. --- app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app.js b/app.js index ad9a93a..ec1573d 100644 --- a/app.js +++ b/app.js @@ -1 +1,13 @@ 'use strict'; +var allLocations = [ ]; + +var Location = function(name, hood, address, phone, days, times, restrictions) { + this.name = name; + this.hood = hood; + this.address = address; + this.phone = phone; + this.daysOpen = days; + this.timesOpen = times; + this.restrictions = restrictions; + +} From 0ad350dde2188e0dc8889f523d452f379b88882c Mon Sep 17 00:00:00 2001 From: Dana Kulp Date: Thu, 27 Oct 2016 19:33:39 -0700 Subject: [PATCH 2/4] Set up separate data JS file to house location data for object construction. --- app.js | 11 ++++++----- data.js | 12 ++++++++++++ index.html | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 data.js diff --git a/app.js b/app.js index ec1573d..131e267 100644 --- a/app.js +++ b/app.js @@ -1,13 +1,14 @@ 'use strict'; var allLocations = [ ]; -var Location = function(name, hood, address, phone, days, times, restrictions) { +//Object constructor for locations +var Location = function(obj) { this.name = name; this.hood = hood; this.address = address; - this.phone = phone; this.daysOpen = days; - this.timesOpen = times; + this.openTime = openTime; + this.closeTime = closeTime; this.restrictions = restrictions; - -} + allLocations.push(this); +}; diff --git a/data.js b/data.js new file mode 100644 index 0000000..da0e777 --- /dev/null +++ b/data.js @@ -0,0 +1,12 @@ +var breakfastLocationData = [ + {name: 'Millionaire Club Charity Breakfast', hood: 'Belltown', address: '2515 Western Ave, Seattle', days: [1, 2, 3, 4, 5], openTime: 6, closeTime: 7, restrictions: 'none'}, + {} +]; + +var lunchLocationData = [ + +]; + +var dinnerLocationData = [ + +]; diff --git a/index.html b/index.html index e292e40..30f0e88 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,6 @@
- + From 45bd0783964c381200890bbb1ec6619798e23839 Mon Sep 17 00:00:00 2001 From: Maksim Mikoss Date: Thu, 27 Oct 2016 20:09:09 -0700 Subject: [PATCH 3/4] ObjConstr added infor to dinnerLocationData --- data.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/data.js b/data.js index da0e777..c81ba6d 100644 --- a/data.js +++ b/data.js @@ -1,12 +1,21 @@ var breakfastLocationData = [ {name: 'Millionaire Club Charity Breakfast', hood: 'Belltown', address: '2515 Western Ave, Seattle', days: [1, 2, 3, 4, 5], openTime: 6, closeTime: 7, restrictions: 'none'}, - {} + { } ]; - +//1 = Mon var lunchLocationData = [ ]; var dinnerLocationData = [ - + {name: 'Union Gospel Mission', hood: 'Pioneer Square', address: '318 2nd Ave Ext S', days: [1, 2, 3, 4, 5, 6, 7], openTime: 17, closeTime: 19, restrictions: 'none'}, //1 + {name: 'Bread Of Life Mission', hood: 'Downtown', address: '97 S Main St, Seattle, WA 98104', days: [1, 2, 3, 4, 5, 6, 7], openTime: 17, closeTime: 18, restrictions: 'Chapel attendance required'}, //2 + {name: 'Lord\'s Table', hood: 'Downtown', address: '6th Ave & Columbia St', days: [1, 2, 3, 4], openTime: 19, closeTime: 21, restrictions: 'none'}, //3 + {name: 'Women\'s Referal Center', hood: 'Belltown', address: '2030 3rd Ave', days: [1, 2, 3, 4, 5, 6, 7], openTime: 18, closeTime: 19, restrictions: 'women 18+'}, //4 + {name: 'New Horizons Ministries', hood: 'Belltown', address: '2709 3rd Ave', days: [1, 2, 3, 7], openTime: 18, closeTime: 20, restrictions: 'Youth under 21'}, //5 + {name: 'Recovery Cafe', hood: 'SLU', address: '2022 Boren Ave', days: [2, 3, 4, 5, 6], openTime: 17, closeTime: 18, restrictions: 'Must be sober 24 hours'}, //6 + {name: 'Friday Feasts ROOTS', hood: 'U District', address: '1415 NE 43rd St', days: [5], openTime: 18, closeTime: 19, restrictions: 'none'}, //7 + {name: 'Phinney Neighborhood Association', hood: 'Greenlake', address: '5515 Phinney Ave N', days: [2], openTime: 17, closeTime: 18, restrictions: 'none'}, //8 + {name: 'Saint Martin de Porres Shelter', hood: 'SODO', address: '1561 Alaskan Way S', days: [1, 2, 3, 4, 5, 6, 7], openTime: 18, closeTime: 22, restrictions: 'men 55+'}, //9 + // {name: ' ', hood: ' ', address: ' ', days: [1, 2, 3, 4, 5, 6, 7], openTime: 17, closeTime: 19, restrictions: ' '}, //10 ]; From 3140ba00ef7456d5e23149e7bd917d863fd84f04 Mon Sep 17 00:00:00 2001 From: Hasnake Date: Thu, 27 Oct 2016 20:17:17 -0700 Subject: [PATCH 4/4] Adding lunch data for each location --- data.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/data.js b/data.js index da0e777..f9f468c 100644 --- a/data.js +++ b/data.js @@ -4,7 +4,16 @@ var breakfastLocationData = [ ]; var lunchLocationData = [ - + {name: 'Millionaire Club Charity lunch', hood: 'Belltown', address: '2515 Western Ave, Seattle', days: [1, 2, 3, 4, 5], openTime: 12, closeTime: 13, restrictions: 'none'}, + {name: 'YWCA Angeline\'s Meals lunch', hood: 'Belltown', address: '2030 3rd Ave, Seattle', days: [1, 2, 3, 4, 5,6,7], openTime: 11, closeTime: 13, restrictions: 'Women 18+'}, + {name: 'Pike Market Senior Center lunch', hood: 'Downtown', address: '85 Pike St., #200, Seattle', days: [1, 2, 3, 4, 5,6,7], openTime: 12, closeTime: 13, restrictions: 'Seniors 55+'}, + {name: 'Bible Study Outreach Ministries lunch', hood: 'Downtown', address: '6th Ave & Columbia St', days: [6], openTime: 12, closeTime: 13, restrictions: 'none'}, + {name: 'Operation Sack Lunch', hood: 'Downtown', address: '6th Ave & Columbia St', days: [1, 2, 3, 4, 5], openTime: 13, closeTime: 14, restrictions: 'none'}, + {name: 'Lazarus Day Center lunch', hood: 'Pioneer Square', address: '416 2nd Ave Ext S', days: [1, 2, 3, 4, 5,6,7], openTime: 12, closeTime: 13, restrictions: 'Seniors 50+'}, + {name: 'Union Gospel Mission lunch', hood: 'Pioneer Square', address: '318 2nd Ave Ext S', days: [1, 2, 3, 4, 5,6,7], openTime: 12, closeTime: 13, restrictions: 'Chapel Service required prior to lunch'}, + {name: 'Bread of Life Mission lunch', hood: 'Pioneer Square', address: '97 S Main', days: [1, 2, 3, 4, 5], openTime: 12, closeTime: 13, restrictions: 'none'}, + {name: 'Peace for the Streets by Kids from the Streets lunch', hood: 'Capitol Hill', address: '1814 Summit Ave', days: [2, 3, 4, 5], openTime: 11, closeTime: 13, restrictions: 'Youth, Under 21'}, + {name: 'Community Lunch on Capitol Hill', hood: 'Capitol Hill', address: '1710 11th Ave', days: [2, 5], openTime: 12, closeTime: 13, restrictions: 'none'}, ]; var dinnerLocationData = [