From 8af0d2770348014442030210606d8efac7e1dd6b Mon Sep 17 00:00:00 2001 From: Tanisha Date: Tue, 28 Nov 2017 14:57:03 -0800 Subject: [PATCH 01/37] add underscore template --- dist/index.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dist/index.html b/dist/index.html index b873b1e..d14dbc5 100644 --- a/dist/index.html +++ b/dist/index.html @@ -15,6 +15,26 @@ + + From dcaa74821db5773d156c43842f89126cfb900750 Mon Sep 17 00:00:00 2001 From: Tanisha Date: Tue, 28 Nov 2017 15:06:45 -0800 Subject: [PATCH 02/37] add trip model --- src/app/models/trip.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/app/models/trip.js diff --git a/src/app/models/trip.js b/src/app/models/trip.js new file mode 100644 index 0000000..c67a37a --- /dev/null +++ b/src/app/models/trip.js @@ -0,0 +1,7 @@ +import Backbone from 'backbone' + +const Trip = Backbone.Model.extend({ + +}); + +export default Trip; From 83bf6d5f3d70bf2b62fa5898e01048bdacf88763 Mon Sep 17 00:00:00 2001 From: Tanisha Date: Tue, 28 Nov 2017 15:14:09 -0800 Subject: [PATCH 03/37] add trips api to collection --- dist/index.html | 1 + src/app/collections/trip_list.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/app/collections/trip_list.js diff --git a/dist/index.html b/dist/index.html index d14dbc5..d2deaff 100644 --- a/dist/index.html +++ b/dist/index.html @@ -35,6 +35,7 @@ + diff --git a/src/app/collections/trip_list.js b/src/app/collections/trip_list.js new file mode 100644 index 0000000..de58a11 --- /dev/null +++ b/src/app/collections/trip_list.js @@ -0,0 +1,12 @@ +import Backbone from 'backbone' +import Trip from '../models/trip'; + +const TripList = Backbone.Collection.extend({ + model: Trip, + url: 'https://ada-backtrek-api.herokuapp.com/trips', + parse: function(response) { + return response['trips']; + } +}); + +export default TripList; From 9fd5d5b7977deca52c9d3d31ed9f7148c2f4bc5c Mon Sep 17 00:00:00 2001 From: Tanisha Date: Tue, 28 Nov 2017 15:36:14 -0800 Subject: [PATCH 04/37] set up app.js --- dist/index.html | 2 +- src/app.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/index.html b/dist/index.html index d2deaff..2aa6c51 100644 --- a/dist/index.html +++ b/dist/index.html @@ -10,7 +10,7 @@
- + see trips