From 00cfe83dc511938999bc45d004082b2f20a8dd9b Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 15:44:04 -0800 Subject: [PATCH 01/41] import quote view --- src/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.js b/src/app.js index 03ec910..8b185e0 100644 --- a/src/app.js +++ b/src/app.js @@ -3,8 +3,12 @@ import 'css/app.css'; import $ from 'jquery'; +// models import Simulator from 'models/simulator'; +//collections import QuoteList from 'collections/quote_list'; +//views +import QuoteView from './views/quote_view'; const quoteData = [ { From f0e90478751531f93b114af1c99c2e72d0767fb2 Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 15:44:34 -0800 Subject: [PATCH 02/41] create empty history_view.js --- src/views/history_view.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/views/history_view.js diff --git a/src/views/history_view.js b/src/views/history_view.js new file mode 100644 index 0000000..58a9528 --- /dev/null +++ b/src/views/history_view.js @@ -0,0 +1,4 @@ +import Backbone from 'backbone'; + +import QuotesView from './quotes_view'; +import OpenOrdersView from './open_orders_view'; From e6b48a5a484ea843a1343667f17d2f3ec1ece588 Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 15:44:51 -0800 Subject: [PATCH 03/41] create empty open_order_view.js --- src/views/open_order_view.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/views/open_order_view.js diff --git a/src/views/open_order_view.js b/src/views/open_order_view.js new file mode 100644 index 0000000..96273b0 --- /dev/null +++ b/src/views/open_order_view.js @@ -0,0 +1 @@ +import Backbone from 'backbone'; From fa97c2120f45fcd2120a9bd17f56d4ddaecf1c35 Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 15:45:32 -0800 Subject: [PATCH 04/41] create quote_view.js, basic setup --- src/views/quote_view.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/views/quote_view.js diff --git a/src/views/quote_view.js b/src/views/quote_view.js new file mode 100644 index 0000000..9f6e391 --- /dev/null +++ b/src/views/quote_view.js @@ -0,0 +1,16 @@ +import Backbone from 'backbone'; +import Quote from '../models/quote'; + +const QuoteView = Backbone.View.extend({ + initialize(params) { + this.template = params.template; + }, + render() { + const compiledTemplate = this.template(this.model.toJSON()); + // use $el to ensure that we only select items within the view + this.$el.html(compiledTemplate); + return this; + }, +}); + +export default QuoteView; From 19c25e31d599b81d2291e43afbafb5b53097fe1b Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 16:13:58 -0800 Subject: [PATCH 05/41] deleted history_view.js --- src/views/history_view.js | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/views/history_view.js diff --git a/src/views/history_view.js b/src/views/history_view.js deleted file mode 100644 index 58a9528..0000000 --- a/src/views/history_view.js +++ /dev/null @@ -1,4 +0,0 @@ -import Backbone from 'backbone'; - -import QuotesView from './quotes_view'; -import OpenOrdersView from './open_orders_view'; From c34dd5d59c0d749054d1c472bb094bb633f506d2 Mon Sep 17 00:00:00 2001 From: Sara Frandsen Date: Tue, 12 Dec 2017 16:14:26 -0800 Subject: [PATCH 06/41] made separation of html and templates more clear --- dist/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/index.html b/dist/index.html index 8a046fa..19b9bcc 100644 --- a/dist/index.html +++ b/dist/index.html @@ -33,6 +33,7 @@

Quotes

Trade History

    +
@@ -82,6 +83,8 @@

Order Entry Form

+ + + + + +