From 768e04305ac3e583e24e107ca5adb4d5072b81e9 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:34:57 -0700 Subject: [PATCH 01/79] end of video commit --- app/app.component.ts | 7 +++++++ app/main.ts | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/app/app.component.ts b/app/app.component.ts index e69de29..af037af 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -0,0 +1,7 @@ +import {Component} from 'angular2/core'; + +@Component({ + selector: 'app', + template: '

My App

' +}) +export class AppComponent {} \ No newline at end of file diff --git a/app/main.ts b/app/main.ts index e69de29..acb4b62 100644 --- a/app/main.ts +++ b/app/main.ts @@ -0,0 +1,4 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {AppComponent} from './app.component'; + +bootstrap(AppComponent); \ No newline at end of file From 627c5322a059c476021a0747b9ddb871ff52da57 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:46:56 -0700 Subject: [PATCH 02/79] end of video commit --- app/app.component.ts | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/app.component.ts b/app/app.component.ts index af037af..2c7bddc 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,7 +1,7 @@ import {Component} from 'angular2/core'; @Component({ - selector: 'app', + selector: 'media-tracker-app', template: '

My App

' }) export class AppComponent {} \ No newline at end of file diff --git a/index.html b/index.html index b4749c0..249ee45 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@ - Loading... + Loading... \ No newline at end of file From 233516f0bdc5e0f191e3d1ec2bd8d111f7422f31 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:48:49 -0700 Subject: [PATCH 03/79] end of video commit --- app/app.component.html | 2 ++ app/app.component.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 app/app.component.html diff --git a/app/app.component.html b/app/app.component.html new file mode 100644 index 0000000..9a25cb1 --- /dev/null +++ b/app/app.component.html @@ -0,0 +1,2 @@ +

My App

+

Keeping track of the media I want to watch.

\ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 2c7bddc..0768888 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -2,6 +2,6 @@ import {Component} from 'angular2/core'; @Component({ selector: 'media-tracker-app', - template: '

My App

' + templateUrl: 'app/app.component.html' }) export class AppComponent {} \ No newline at end of file From 0ffac31f8477654f5a36aa18850c241a7e760fde Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:50:26 -0700 Subject: [PATCH 04/79] end of video commit --- app/app.component.css | 18 ++++++++++++ app/app.component.html | 8 +++-- app/app.component.ts | 3 +- app/media-item.component.css | 55 +++++++++++++++++++++++++++++++++++ app/media-item.component.html | 16 ++++++++++ app/media-item.component.ts | 9 ++++++ 6 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 app/app.component.css create mode 100644 app/media-item.component.css create mode 100644 app/media-item.component.html create mode 100644 app/media-item.component.ts diff --git a/app/app.component.css b/app/app.component.css new file mode 100644 index 0000000..4872cdd --- /dev/null +++ b/app/app.component.css @@ -0,0 +1,18 @@ +:host { + display: flex; + font-family: Arial, Helvetica, sans-serif; +} +section { + width: 100%; + background-color: #32435b; +} +section > header { + color: #ffffff; + padding: 10px; +} +section > header > h1 { + font-size: 2em; +} +section > header .description { + font-style: italic; +} \ No newline at end of file diff --git a/app/app.component.html b/app/app.component.html index 9a25cb1..2fc4c75 100644 --- a/app/app.component.html +++ b/app/app.component.html @@ -1,2 +1,6 @@ -

My App

-

Keeping track of the media I want to watch.

\ No newline at end of file +
+
+

Media Watch List

+

Keeping track of the media I want to watch.

+
+
\ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 0768888..4d48e7a 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -2,6 +2,7 @@ import {Component} from 'angular2/core'; @Component({ selector: 'media-tracker-app', - templateUrl: 'app/app.component.html' + templateUrl: 'app/app.component.html', + styleUrls: ['app/app.component.css'] }) export class AppComponent {} \ No newline at end of file diff --git a/app/media-item.component.css b/app/media-item.component.css new file mode 100644 index 0000000..11163b6 --- /dev/null +++ b/app/media-item.component.css @@ -0,0 +1,55 @@ +:host { + display: flex; + flex-direction: column; + width: 140px; + height: 200px; + border: 2px solid; + background-color: #29394b; + padding: 10px; + color: #bdc2c5; +} +h2 { + font-size: 1.6em; + flex: 1; +} +:host.medium-movies { + border-color: #53ace4; +} +:host.medium-movies > h2 { + color: #53ace4; +} +:host.medium-series { + border-color: #45bf94; +} +:host.medium-series > h2 { + color: #45bf94; +} +.tools { + margin-top: 8px; + display: flex; + flex-wrap: nowrap; + justify-content: space-between; +} +.favorite { + width: 24px; + height: 24px; + fill: #bdc2c5; +} +.delete { + display: block; + background-color: #ec4342; + padding: 4px; + font-size: .8em; + border-radius: 4px; + color: #ffffff; + cursor: pointer; +} +.details { + display: block; + background-color: #37ad79; + padding: 4px; + font-size: .8em; + border-radius: 4px; + color: #ffffff; + text-decoration: none; +} \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html new file mode 100644 index 0000000..444ebcf --- /dev/null +++ b/app/media-item.component.html @@ -0,0 +1,16 @@ +

The Redemption

+
Watched on 1/13/2016
+
Action
+
2016
+ \ No newline at end of file diff --git a/app/media-item.component.ts b/app/media-item.component.ts new file mode 100644 index 0000000..fb70020 --- /dev/null +++ b/app/media-item.component.ts @@ -0,0 +1,9 @@ +import {Component} from 'angular2/core'; + +@Component({ + selector: 'media-item', + templateUrl: 'app/media-item.component.html', + styleUrls: ['app/media-item.component.css'] +}) +export class MediaItemComponent { +} \ No newline at end of file From 82b76f4cdae53363f7d7f3f389aa9ccdbb1cc82d Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:51:22 -0700 Subject: [PATCH 05/79] end of video commit --- app/app.component.html | 3 +++ app/app.component.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/app.component.html b/app/app.component.html index 2fc4c75..c37d12d 100644 --- a/app/app.component.html +++ b/app/app.component.html @@ -3,4 +3,7 @@

Media Watch List

Keeping track of the media I want to watch.

+ + + \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 4d48e7a..634c92e 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,7 +1,9 @@ import {Component} from 'angular2/core'; +import {MediaItemComponent} from './media-item.component'; @Component({ selector: 'media-tracker-app', + directives: [MediaItemComponent], templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'] }) From 05dbce6681e1b83af284f9578bab2ea7e218fcd0 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:52:18 -0700 Subject: [PATCH 06/79] end of video commit --- app/app.component.html | 2 -- app/media-item.component.html | 2 +- app/media-item.component.ts | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/app.component.html b/app/app.component.html index c37d12d..e786f09 100644 --- a/app/app.component.html +++ b/app/app.component.html @@ -4,6 +4,4 @@

Media Watch List

Keeping track of the media I want to watch.

- - \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html index 444ebcf..80c1d4d 100644 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,4 +1,4 @@ -

The Redemption

+

{{ name }}

Watched on 1/13/2016
Action
2016
diff --git a/app/media-item.component.ts b/app/media-item.component.ts index fb70020..6cbe390 100644 --- a/app/media-item.component.ts +++ b/app/media-item.component.ts @@ -6,4 +6,5 @@ import {Component} from 'angular2/core'; styleUrls: ['app/media-item.component.css'] }) export class MediaItemComponent { + name = 'The Redemption'; } \ No newline at end of file From 5b1f1c260d4cd3493302f23e0f7104f41523b826 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:53:42 -0700 Subject: [PATCH 07/79] end of video commit --- app/media-item.component.html | 2 +- app/media-item.component.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/media-item.component.html b/app/media-item.component.html index 80c1d4d..444ebcf 100644 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,4 +1,4 @@ -

{{ name }}

+

The Redemption

Watched on 1/13/2016
Action
2016
diff --git a/app/media-item.component.ts b/app/media-item.component.ts index 6cbe390..fb70020 100644 --- a/app/media-item.component.ts +++ b/app/media-item.component.ts @@ -6,5 +6,4 @@ import {Component} from 'angular2/core'; styleUrls: ['app/media-item.component.css'] }) export class MediaItemComponent { - name = 'The Redemption'; } \ No newline at end of file From 5703f0941e0e0749ef7a3ea893fe3c38dc198af3 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:56:31 -0700 Subject: [PATCH 08/79] end of video commit --- app/app.component.ts | 12 +++++++++++- app/media-item.component.css | 9 +++++++++ app/media-item.component.html | 2 +- app/media-item.component.ts | 3 +++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/app.component.ts b/app/app.component.ts index 634c92e..24275c9 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -7,4 +7,14 @@ import {MediaItemComponent} from './media-item.component'; templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'] }) -export class AppComponent {} \ No newline at end of file +export class AppComponent { + firstMediaItem = { + id: 1, + name: "Firebug", + medium: "Series", + category: "Science Fiction", + year: 2010, + watchedOn: 1294166565384, + isFavorite: false + }; +} \ No newline at end of file diff --git a/app/media-item.component.css b/app/media-item.component.css index 11163b6..8cfcb4e 100644 --- a/app/media-item.component.css +++ b/app/media-item.component.css @@ -35,6 +35,15 @@ h2 { height: 24px; fill: #bdc2c5; } +.favorite.is-favorite { + fill: #37ad79; +} +.favorite.is-favorite-hovering { + fill: #45bf94; +} +.favorite.is-favorite.is-favorite-hovering { + fill: #ec4342; +} .delete { display: block; background-color: #ec4342; diff --git a/app/media-item.component.html b/app/media-item.component.html index 444ebcf..659196d 100644 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -7,7 +7,7 @@

The Redemption

- + remove diff --git a/app/media-item.component.ts b/app/media-item.component.ts index fb70020..3ece851 100644 --- a/app/media-item.component.ts +++ b/app/media-item.component.ts @@ -6,4 +6,7 @@ import {Component} from 'angular2/core'; styleUrls: ['app/media-item.component.css'] }) export class MediaItemComponent { + onDelete() { + console.log('deleted'); + } } \ No newline at end of file From 38e8eea342f575c50d0a11375764befcb703cf4b Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Wed, 6 Jul 2016 00:57:39 -0700 Subject: [PATCH 09/79] end of video commit --- app/app.component.html | 2 +- app/media-item.component.html | 8 ++++---- app/media-item.component.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/app.component.html b/app/app.component.html index e786f09..9907dde 100644 --- a/app/app.component.html +++ b/app/app.component.html @@ -3,5 +3,5 @@

Media Watch List

Keeping track of the media I want to watch.

- + \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html index 659196d..253ae48 100644 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,7 +1,7 @@ -

The Redemption

-
Watched on 1/13/2016
-
Action
-
2016
+

{{ mediaItem.name }}

+
Watched on {{ mediaItem.watchedOn }}
+
{{ mediaItem.category }}
+
{{ mediaItem.year }}
Date: Sat, 16 Jul 2016 09:54:53 -0700 Subject: [PATCH 10/79] end of video commit --- app/app.component.css | 34 ++++----- app/app.component.html | 13 ++-- app/app.component.ts | 42 +++++++----- app/main.ts | 6 +- app/media-item.component.css | 126 +++++++++++++++++----------------- app/media-item.component.html | 30 ++++---- app/media-item.component.ts | 27 ++++---- 7 files changed, 142 insertions(+), 136 deletions(-) mode change 100644 => 100755 app/app.component.css mode change 100644 => 100755 app/app.component.html mode change 100644 => 100755 app/app.component.ts mode change 100644 => 100755 app/main.ts mode change 100644 => 100755 app/media-item.component.css mode change 100644 => 100755 app/media-item.component.html mode change 100644 => 100755 app/media-item.component.ts diff --git a/app/app.component.css b/app/app.component.css old mode 100644 new mode 100755 index 4872cdd..93654a0 --- a/app/app.component.css +++ b/app/app.component.css @@ -1,18 +1,18 @@ -:host { - display: flex; - font-family: Arial, Helvetica, sans-serif; -} -section { - width: 100%; - background-color: #32435b; -} -section > header { - color: #ffffff; - padding: 10px; -} -section > header > h1 { - font-size: 2em; -} -section > header .description { - font-style: italic; +:host { + display: flex; + font-family: Arial, Helvetica, sans-serif; +} +section { + width: 100%; + background-color: #32435b; +} +section > header { + color: #ffffff; + padding: 10px; +} +section > header > h1 { + font-size: 2em; +} +section > header .description { + font-style: italic; } \ No newline at end of file diff --git a/app/app.component.html b/app/app.component.html old mode 100644 new mode 100755 index 9907dde..a50515e --- a/app/app.component.html +++ b/app/app.component.html @@ -1,7 +1,8 @@ -
-
-

Media Watch List

-

Keeping track of the media I want to watch.

- - +
+
+

Media Watch List

+

Keeping track of the media I want to watch.

+
+
\ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts old mode 100644 new mode 100755 index 24275c9..98203bc --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,20 +1,24 @@ -import {Component} from 'angular2/core'; -import {MediaItemComponent} from './media-item.component'; - -@Component({ - selector: 'media-tracker-app', - directives: [MediaItemComponent], - templateUrl: 'app/app.component.html', - styleUrls: ['app/app.component.css'] -}) -export class AppComponent { - firstMediaItem = { - id: 1, - name: "Firebug", - medium: "Series", - category: "Science Fiction", - year: 2010, - watchedOn: 1294166565384, - isFavorite: false - }; +import {Component} from 'angular2/core'; +import {MediaItemComponent} from './media-item.component'; + +@Component({ + selector: 'media-tracker-app', + directives: [MediaItemComponent], + templateUrl: 'app/app.component.html', + styleUrls: ['app/app.component.css'] +}) +export class AppComponent { + firstMediaItem = { + id: 1, + name: "Firebug", + medium: "Series", + category: "Science Fiction", + year: 2010, + watchedOn: 1294166565384, + isFavorite: false + }; + + onMediaItemDeleted(mediaItem) { + + } } \ No newline at end of file diff --git a/app/main.ts b/app/main.ts old mode 100644 new mode 100755 index acb4b62..c772c66 --- a/app/main.ts +++ b/app/main.ts @@ -1,4 +1,4 @@ -import {bootstrap} from 'angular2/platform/browser'; -import {AppComponent} from './app.component'; - +import {bootstrap} from 'angular2/platform/browser'; +import {AppComponent} from './app.component'; + bootstrap(AppComponent); \ No newline at end of file diff --git a/app/media-item.component.css b/app/media-item.component.css old mode 100644 new mode 100755 index 8cfcb4e..3d2c660 --- a/app/media-item.component.css +++ b/app/media-item.component.css @@ -1,64 +1,64 @@ -:host { - display: flex; - flex-direction: column; - width: 140px; - height: 200px; - border: 2px solid; - background-color: #29394b; - padding: 10px; - color: #bdc2c5; -} -h2 { - font-size: 1.6em; - flex: 1; -} -:host.medium-movies { - border-color: #53ace4; -} -:host.medium-movies > h2 { - color: #53ace4; -} -:host.medium-series { - border-color: #45bf94; -} -:host.medium-series > h2 { - color: #45bf94; -} -.tools { - margin-top: 8px; - display: flex; - flex-wrap: nowrap; - justify-content: space-between; -} -.favorite { - width: 24px; - height: 24px; - fill: #bdc2c5; -} -.favorite.is-favorite { - fill: #37ad79; -} -.favorite.is-favorite-hovering { - fill: #45bf94; -} -.favorite.is-favorite.is-favorite-hovering { - fill: #ec4342; -} -.delete { - display: block; - background-color: #ec4342; - padding: 4px; - font-size: .8em; - border-radius: 4px; - color: #ffffff; - cursor: pointer; -} -.details { - display: block; - background-color: #37ad79; - padding: 4px; - font-size: .8em; - border-radius: 4px; - color: #ffffff; - text-decoration: none; +:host { + display: flex; + flex-direction: column; + width: 140px; + height: 200px; + border: 2px solid; + background-color: #29394b; + padding: 10px; + color: #bdc2c5; +} +h2 { + font-size: 1.6em; + flex: 1; +} +:host.medium-movies { + border-color: #53ace4; +} +:host.medium-movies > h2 { + color: #53ace4; +} +:host.medium-series { + border-color: #45bf94; +} +:host.medium-series > h2 { + color: #45bf94; +} +.tools { + margin-top: 8px; + display: flex; + flex-wrap: nowrap; + justify-content: space-between; +} +.favorite { + width: 24px; + height: 24px; + fill: #bdc2c5; +} +.favorite.is-favorite { + fill: #37ad79; +} +.favorite.is-favorite-hovering { + fill: #45bf94; +} +.favorite.is-favorite.is-favorite-hovering { + fill: #ec4342; +} +.delete { + display: block; + background-color: #ec4342; + padding: 4px; + font-size: .8em; + border-radius: 4px; + color: #ffffff; + cursor: pointer; +} +.details { + display: block; + background-color: #37ad79; + padding: 4px; + font-size: .8em; + border-radius: 4px; + color: #ffffff; + text-decoration: none; } \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html old mode 100644 new mode 100755 index 253ae48..a9b1133 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,16 +1,16 @@ -

{{ mediaItem.name }}

-
Watched on {{ mediaItem.watchedOn }}
-
{{ mediaItem.category }}
-
{{ mediaItem.year }}
-
- - - - - remove - - - watch - +

{{ mediaItem.name }}

+
Watched on {{ mediaItem.watchedOn }}
+
{{ mediaItem.category }}
+
{{ mediaItem.year }}
+ \ No newline at end of file diff --git a/app/media-item.component.ts b/app/media-item.component.ts old mode 100644 new mode 100755 index a90ea8b..ef27144 --- a/app/media-item.component.ts +++ b/app/media-item.component.ts @@ -1,14 +1,15 @@ -import {Component, Input} from 'angular2/core'; - -@Component({ - selector: 'media-item', - templateUrl: 'app/media-item.component.html', - styleUrls: ['app/media-item.component.css'] -}) -export class MediaItemComponent { - @Input('mediaItemToWatch') mediaItem; - - onDelete() { - console.log('deleted'); - } +import {Component, Input, Output, EventEmitter} from 'angular2/core'; + +@Component({ + selector: 'media-item', + templateUrl: 'app/media-item.component.html', + styleUrls: ['app/media-item.component.css'] +}) +export class MediaItemComponent { + @Input('mediaItemToWatch') mediaItem; + @Output('deleted') delete = new EventEmitter(); + + onDelete() { + this.delete.emit(this.mediaItem); + } } \ No newline at end of file From 8b1f537d9e7dfaf1c2f1c712768876f22ee1891d Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 09:56:17 -0700 Subject: [PATCH 11/79] end of video commit --- app/app.component.html | 3 +- app/app.component.ts | 17 +-------- app/media-item-list.component.css | 38 +++++++++++++++++++ app/media-item-list.component.html | 4 ++ app/media-item-list.component.ts | 59 ++++++++++++++++++++++++++++++ app/media-item.component.html | 4 +- 6 files changed, 107 insertions(+), 18 deletions(-) create mode 100755 app/media-item-list.component.css create mode 100755 app/media-item-list.component.html create mode 100755 app/media-item-list.component.ts diff --git a/app/app.component.html b/app/app.component.html index a50515e..216d12d 100755 --- a/app/app.component.html +++ b/app/app.component.html @@ -3,6 +3,5 @@

Media Watch List

Keeping track of the media I want to watch.

- + \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 98203bc..8478339 100755 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,24 +1,11 @@ import {Component} from 'angular2/core'; -import {MediaItemComponent} from './media-item.component'; +import {MediaItemListComponent} from './media-item-list.component'; @Component({ selector: 'media-tracker-app', - directives: [MediaItemComponent], + directives: [MediaItemListComponent], templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'] }) export class AppComponent { - firstMediaItem = { - id: 1, - name: "Firebug", - medium: "Series", - category: "Science Fiction", - year: 2010, - watchedOn: 1294166565384, - isFavorite: false - }; - - onMediaItemDeleted(mediaItem) { - - } } \ No newline at end of file diff --git a/app/media-item-list.component.css b/app/media-item-list.component.css new file mode 100755 index 0000000..5383cf2 --- /dev/null +++ b/app/media-item-list.component.css @@ -0,0 +1,38 @@ +:host { + display: flex; + min-height: 90vh; + flex-direction: column; + padding: 10px; +} +header { + color: #c6c5c3; +} +header.medium-movies { + color: #53ace4; +} +header.medium-series { + color: #45bf94; +} +header > h2 { + font-size: 1.4em; +} +header > h2.error { + color: #d93a3e; +} +section { + flex: 1; + display: flex; + flex-flow: row wrap; + align-content: flex-start; +} +section > media-item { + margin: 10px; +} +footer { + text-align: right; +} +footer .icon { + width: 64px; + height: 64px; + margin: 15px; +} \ No newline at end of file diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html new file mode 100755 index 0000000..b0e814e --- /dev/null +++ b/app/media-item-list.component.html @@ -0,0 +1,4 @@ +
+ +
\ No newline at end of file diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts new file mode 100755 index 0000000..05c5e3f --- /dev/null +++ b/app/media-item-list.component.ts @@ -0,0 +1,59 @@ +import {Component} from 'angular2/core'; +import {MediaItemComponent} from './media-item.component'; + +@Component({ + selector: 'media-item-list', + directives: [MediaItemComponent], + templateUrl: 'app/media-item-list.component.html', + styleUrls: ['app/media-item-list.component.css'] +}) +export class MediaItemListComponent { + + onMediaItemDeleted(mediaItem) { + } + + mediaItems = [ + { + id: 1, + name: "Firebug", + medium: "Series", + category: "Science Fiction", + year: 2010, + watchedOn: 1294166565384, + isFavorite: false + }, + { + id: 2, + name: "The Small Tall", + medium: "Movies", + category: "Comedy", + year: 2015, + watchedOn: null, + isFavorite: true + }, { + id: 3, + name: "The Redemption", + medium: "Movies", + category: "Action", + year: 2016, + watchedOn: null, + isFavorite: false + }, { + id: 4, + name: "Hoopers", + medium: "Series", + category: "Drama", + year: null, + watchedOn: null, + isFavorite: true + }, { + id: 5, + name: "Happy Joe: Cheery Road", + medium: "Movies", + category: "Action", + year: 2015, + watchedOn: 1457166565384, + isFavorite: false + } + ]; +} \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html index a9b1133..59f84ee 100755 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,5 +1,7 @@

{{ mediaItem.name }}

-
Watched on {{ mediaItem.watchedOn }}
+
{{ mediaItem.category }}
{{ mediaItem.year }}
From 3d68078ded41833135fc09c2421d07bee12ae27a Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 09:57:12 -0700 Subject: [PATCH 12/79] end of video commit --- app/media-item-list.component.html | 3 ++- app/media-item-list.component.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index b0e814e..b4426ac 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -1,4 +1,5 @@
-
\ No newline at end of file diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index 05c5e3f..8f421ee 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -8,7 +8,7 @@ import {MediaItemComponent} from './media-item.component'; styleUrls: ['app/media-item-list.component.css'] }) export class MediaItemListComponent { - + onMediaItemDeleted(mediaItem) { } From 22e5270ea1e261fdb7e4ceb60da4b361e6a1d857 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 09:58:14 -0700 Subject: [PATCH 13/79] end of video commit --- app/media-item-list.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index b4426ac..fbaa919 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -1,5 +1,6 @@
+ (deleted)="onMediaItemDeleted($event)" + [ngClass]="{'medium-movies': mediaItem.medium === 'Movies', 'medium-series': mediaItem.medium === 'Series'}">
\ No newline at end of file From 9ab79ab5fa6eda73c7ddb4046c035d33ac31c9fd Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 09:59:58 -0700 Subject: [PATCH 14/79] end of video commit --- app/favorite.directive.ts | 8 ++++++++ app/media-item.component.html | 3 ++- app/media-item.component.ts | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 app/favorite.directive.ts diff --git a/app/favorite.directive.ts b/app/favorite.directive.ts new file mode 100755 index 0000000..cdeda93 --- /dev/null +++ b/app/favorite.directive.ts @@ -0,0 +1,8 @@ +import {Directive, HostBinding} from 'angular2/core'; + +@Directive({ + selector: '[mwFavorite]' +}) +export class FavoriteDirective { + @HostBinding('class.is-favorite') isFavorite = true; +} \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html index 59f84ee..edb3d6a 100755 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -5,7 +5,8 @@

{{ mediaItem.name }}

{{ mediaItem.category }}
{{ mediaItem.year }}
- + diff --git a/app/media-item.component.ts b/app/media-item.component.ts index ef27144..a12d2fb 100755 --- a/app/media-item.component.ts +++ b/app/media-item.component.ts @@ -1,7 +1,9 @@ import {Component, Input, Output, EventEmitter} from 'angular2/core'; +import {FavoriteDirective} from './favorite.directive'; @Component({ selector: 'media-item', + directives: [FavoriteDirective], templateUrl: 'app/media-item.component.html', styleUrls: ['app/media-item.component.css'] }) From d6d72a7e0e04f45c84697a2fefeed3f7070b6ccb Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:01:18 -0700 Subject: [PATCH 15/79] end of video commit --- app/favorite.directive.ts | 7 ++++++- app/media-item.component.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/favorite.directive.ts b/app/favorite.directive.ts index cdeda93..b59be6e 100755 --- a/app/favorite.directive.ts +++ b/app/favorite.directive.ts @@ -1,8 +1,13 @@ -import {Directive, HostBinding} from 'angular2/core'; +import {Directive, HostBinding, Input} from 'angular2/core'; @Directive({ selector: '[mwFavorite]' }) export class FavoriteDirective { @HostBinding('class.is-favorite') isFavorite = true; + + @Input() + set mwFavorite(value) { + this.isFavorite = value; + } } \ No newline at end of file diff --git a/app/media-item.component.html b/app/media-item.component.html index edb3d6a..0b04949 100755 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -5,7 +5,7 @@

{{ mediaItem.name }}

{{ mediaItem.category }}
{{ mediaItem.year }}
- From e249ccb6c346bf4411ba90d86b9911d7752ca912 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:02:04 -0700 Subject: [PATCH 16/79] end of video commit --- app/favorite.directive.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/favorite.directive.ts b/app/favorite.directive.ts index b59be6e..d502433 100755 --- a/app/favorite.directive.ts +++ b/app/favorite.directive.ts @@ -1,10 +1,21 @@ -import {Directive, HostBinding, Input} from 'angular2/core'; +import {Directive, HostBinding, HostListener, Input} from 'angular2/core'; @Directive({ selector: '[mwFavorite]' }) export class FavoriteDirective { @HostBinding('class.is-favorite') isFavorite = true; + @HostBinding('class.is-favorite-hovering') hovering = false; + + @HostListener('mouseenter') + onMouseEnter() { + this.hovering = true; + } + + @HostListener('mouseleave') + onMouseLeave() { + this.hovering = false; + } @Input() set mwFavorite(value) { From a5cd3a5dd622ce869371791b41b3652ab6cb9f35 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:02:46 -0700 Subject: [PATCH 17/79] end of video commit --- app/media-item.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/media-item.component.html b/app/media-item.component.html index 0b04949..d746d6e 100755 --- a/app/media-item.component.html +++ b/app/media-item.component.html @@ -1,6 +1,6 @@

{{ mediaItem.name }}

{{ mediaItem.category }}
{{ mediaItem.year }}
From bc2dc6b2ac17c8df76399f34d4ccd387930f0f83 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:06:17 -0700 Subject: [PATCH 18/79] end of video commit --- app/app.component.html | 1 + app/app.component.ts | 3 +- app/category-list.pipe.ts | 16 +++++++++ app/media-item-form.component.css | 52 ++++++++++++++++++++++++++++++ app/media-item-form.component.html | 34 +++++++++++++++++++ app/media-item-form.component.ts | 9 ++++++ app/media-item-list.component.html | 3 ++ app/media-item-list.component.ts | 2 ++ 8 files changed, 119 insertions(+), 1 deletion(-) create mode 100755 app/category-list.pipe.ts create mode 100755 app/media-item-form.component.css create mode 100755 app/media-item-form.component.html create mode 100755 app/media-item-form.component.ts diff --git a/app/app.component.html b/app/app.component.html index 216d12d..451928a 100755 --- a/app/app.component.html +++ b/app/app.component.html @@ -3,5 +3,6 @@

Media Watch List

Keeping track of the media I want to watch.

+ \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 8478339..9940f64 100755 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,9 +1,10 @@ import {Component} from 'angular2/core'; import {MediaItemListComponent} from './media-item-list.component'; +import {MediaItemFormComponent} from './media-item-form.component'; @Component({ selector: 'media-tracker-app', - directives: [MediaItemListComponent], + directives: [MediaItemListComponent, MediaItemFormComponent], templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'] }) diff --git a/app/category-list.pipe.ts b/app/category-list.pipe.ts new file mode 100755 index 0000000..8c7e0da --- /dev/null +++ b/app/category-list.pipe.ts @@ -0,0 +1,16 @@ +import {Pipe} from 'angular2/core'; + +@Pipe({ + name: 'categoryList' +}) +export class CategoryListPipe { + transform(mediaItems) { + var categories = []; + mediaItems.forEach(mediaItem => { + if (categories.indexOf(mediaItem.category) <= -1) { + categories.push(mediaItem.category); + } + }); + return categories.join(', '); + } +} \ No newline at end of file diff --git a/app/media-item-form.component.css b/app/media-item-form.component.css new file mode 100755 index 0000000..e548720 --- /dev/null +++ b/app/media-item-form.component.css @@ -0,0 +1,52 @@ +:host { + display: block; + padding: 10px; +} +ul { + list-style-type: none; +} +ul li { + margin: 10px 0; +} +header, label { + color: #53ace4; +} +input, select { + background-color: #29394b; + color: #c6c5c3; + border-radius: 3px; + border: none; + box-shadow: 0 1px 2px rgba(0,0,0,0.2) inset, 0 -1px 0 rgba(0,0,0,0.05) inset; + border-color: #53ace4; + padding: 6px; +} +.ng-invalid:not(.ng-pristine):not(.required-invalid) { + border: 1px solid #d93a3e; +} +input[required].ng-invalid { + border-right: 5px solid #d93a3e; +} +input[required]:not(.required-invalid), +input[required].ng-invalid:not(.required-invalid) { + border-right: 5px solid #37ad79; +} +.error { + color: #d93a3e; +} +#year { + width: 50px; +} +button[type=submit] { + background-color: #45bf94; + border: 0; + padding: 10px; + font-size: 1em; + border-radius: 4px; + color: #ffffff; + cursor: pointer; +} +button[type=submit]:disabled { + background-color: #333; + color: #666; + cursor: default; +} \ No newline at end of file diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html new file mode 100755 index 0000000..7fa9bef --- /dev/null +++ b/app/media-item-form.component.html @@ -0,0 +1,34 @@ +
+

Add Media to Watch

+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
\ No newline at end of file diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts new file mode 100755 index 0000000..ee87ca6 --- /dev/null +++ b/app/media-item-form.component.ts @@ -0,0 +1,9 @@ +import {Component} from 'angular2/core'; + +@Component({ + selector: 'media-item-form', + templateUrl: 'app/media-item-form.component.html', + styleUrls: ['app/media-item-form.component.css'] +}) +export class MediaItemFormComponent { +} \ No newline at end of file diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index fbaa919..4b4335a 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -1,3 +1,6 @@ +
+
{{ mediaItems | categoryList }}
+
Date: Sat, 16 Jul 2016 10:07:16 -0700 Subject: [PATCH 19/79] end of video commit --- app/media-item-form.component.html | 14 +++++++++----- app/media-item-form.component.ts | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html index 7fa9bef..6d657c4 100755 --- a/app/media-item-form.component.html +++ b/app/media-item-form.component.html @@ -1,22 +1,25 @@

Add Media to Watch

-
+
  • -
  • - +
  • - @@ -27,7 +30,8 @@

    Add Media to Watch

  • - +
diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index ee87ca6..809fd32 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -6,4 +6,7 @@ import {Component} from 'angular2/core'; styleUrls: ['app/media-item-form.component.css'] }) export class MediaItemFormComponent { + onSubmit(mediaItem) { + console.log(mediaItem); + } } \ No newline at end of file From c1dcd4b261af2dfb4723e90b75b62950cdde0885 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:09:04 -0700 Subject: [PATCH 20/79] end of video commit --- app/media-item-form.component.html | 2 +- app/media-item-form.component.ts | 12 ++++++++++++ sample.txt | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 sample.txt diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html index 6d657c4..c42b888 100755 --- a/app/media-item-form.component.html +++ b/app/media-item-form.component.html @@ -1,7 +1,7 @@

Add Media to Watch

- +
  • diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 809fd32..643f651 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,4 +1,5 @@ import {Component} from 'angular2/core'; +import {ControlGroup, Control} from 'angular2/common'; @Component({ selector: 'media-item-form', @@ -6,6 +7,17 @@ import {Component} from 'angular2/core'; styleUrls: ['app/media-item-form.component.css'] }) export class MediaItemFormComponent { + form; + + ngOnInit() { + this.form = new ControlGroup({ + 'medium': new Control('Movies'), + 'name': new Control(''), + 'category': new Control(''), + 'year': new Control('') + }); + } + onSubmit(mediaItem) { console.log(mediaItem); } diff --git a/sample.txt b/sample.txt new file mode 100755 index 0000000..ee2b104 --- /dev/null +++ b/sample.txt @@ -0,0 +1 @@ +[\\w\\-\\s\\/]+ \ No newline at end of file From 67a5a4ea14a56fa58dcc3f24e83659faf860d9d9 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:09:55 -0700 Subject: [PATCH 21/79] end of video commit --- app/media-item-form.component.html | 2 +- app/media-item-form.component.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html index c42b888..908c1b0 100755 --- a/app/media-item-form.component.html +++ b/app/media-item-form.component.html @@ -34,5 +34,5 @@

    Add Media to Watch

    ngControl="year">
- + \ No newline at end of file diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 643f651..5202ac1 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,5 +1,5 @@ import {Component} from 'angular2/core'; -import {ControlGroup, Control} from 'angular2/common'; +import {ControlGroup, Control, Validators} from 'angular2/common'; @Component({ selector: 'media-item-form', @@ -12,7 +12,10 @@ export class MediaItemFormComponent { ngOnInit() { this.form = new ControlGroup({ 'medium': new Control('Movies'), - 'name': new Control(''), + 'name': new Control('', Validators.compose([ + Validators.required, + Validators.pattern('[\\w\\-\\s\\/]+') + ])), 'category': new Control(''), 'year': new Control('') }); From 00f39e97356dab9a6d32d48e5b747eff30ce2c18 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:12:48 -0700 Subject: [PATCH 22/79] end of video commit --- app/media-item-form.component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 5202ac1..64ac9ce 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -17,9 +17,18 @@ export class MediaItemFormComponent { Validators.pattern('[\\w\\-\\s\\/]+') ])), 'category': new Control(''), - 'year': new Control('') + 'year': new Control('', this.yearValidator) }); } + + yearValidator(control) { + if (control.value.trim().length === 0) return null; + var year = parseInt(control.value); + var minYear = 1900; + var maxYear = 2100; + if (year >= minYear && year <= maxYear) return null; + return {'year': true}; + } onSubmit(mediaItem) { console.log(mediaItem); From 0162a271f136e468ccf59eb384c2fa1248ba5b17 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:13:59 -0700 Subject: [PATCH 23/79] end of video commit --- app/media-item-form.component.html | 12 ++++++++++-- app/media-item-form.component.ts | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html index 908c1b0..5eff419 100755 --- a/app/media-item-form.component.html +++ b/app/media-item-form.component.html @@ -14,7 +14,11 @@

Add Media to Watch

  • + ngControl="name" + #name="ngForm"> +
    + name has invalid characters +
  • @@ -31,7 +35,11 @@

    Add Media to Watch

  • + ngControl="year" + #year="ngForm"> +
    + must be between {{year.errors?.year.min}} and {{year.errors?.year.max}} +
  • diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 64ac9ce..fb50dd9 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -24,10 +24,10 @@ export class MediaItemFormComponent { yearValidator(control) { if (control.value.trim().length === 0) return null; var year = parseInt(control.value); - var minYear = 1900; - var maxYear = 2100; + var minYear = 1800; + var maxYear = 2500; if (year >= minYear && year <= maxYear) return null; - return {'year': true}; + return {'year': { 'min': minYear, 'max': maxYear }}; } onSubmit(mediaItem) { From a9d0ec9cc7101f8c46869da143fcd0bc909fe799 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:14:39 -0700 Subject: [PATCH 24/79] end of video commit --- app/media-item-form.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index fb50dd9..95ffb95 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,5 +1,5 @@ import {Component} from 'angular2/core'; -import {ControlGroup, Control, Validators} from 'angular2/common'; +import {Control, Validators, FormBuilder} from 'angular2/common'; @Component({ selector: 'media-item-form', @@ -8,9 +8,11 @@ import {ControlGroup, Control, Validators} from 'angular2/common'; }) export class MediaItemFormComponent { form; + + constructor(private formBuilder: FormBuilder) {} ngOnInit() { - this.form = new ControlGroup({ + this.form = this.formBuilder.group({ 'medium': new Control('Movies'), 'name': new Control('', Validators.compose([ Validators.required, From 7932afa1c7f6cc26ac828cebd66c116eeb7f1f4d Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:15:16 -0700 Subject: [PATCH 25/79] end of video commit --- app/media-item-form.component.ts | 7 ++-- app/media-item-list.component.ts | 53 +++++---------------------- app/media-item.service.ts | 61 ++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 46 deletions(-) create mode 100755 app/media-item.service.ts diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 95ffb95..c72938a 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,15 +1,18 @@ import {Component} from 'angular2/core'; import {Control, Validators, FormBuilder} from 'angular2/common'; +import {MediaItemService} from './media-item.service'; @Component({ selector: 'media-item-form', + providers: [MediaItemService], templateUrl: 'app/media-item-form.component.html', styleUrls: ['app/media-item-form.component.css'] }) export class MediaItemFormComponent { form; - constructor(private formBuilder: FormBuilder) {} + constructor(private formBuilder: FormBuilder, + private mediaItemService: MediaItemService) {} ngOnInit() { this.form = this.formBuilder.group({ @@ -33,6 +36,6 @@ export class MediaItemFormComponent { } onSubmit(mediaItem) { - console.log(mediaItem); + this.mediaItemService.add(mediaItem); } } \ No newline at end of file diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index a238623..e0aef0b 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -1,61 +1,26 @@ import {Component} from 'angular2/core'; import {MediaItemComponent} from './media-item.component'; import {CategoryListPipe} from './category-list.pipe'; +import {MediaItemService} from './media-item.service'; @Component({ selector: 'media-item-list', directives: [MediaItemComponent], pipes: [CategoryListPipe], + providers: [MediaItemService], templateUrl: 'app/media-item-list.component.html', styleUrls: ['app/media-item-list.component.css'] }) export class MediaItemListComponent { + constructor(private mediaItemService: MediaItemService) {} + + ngOnInit() { + this.mediaItems = this.mediaItemService.get(); + } onMediaItemDeleted(mediaItem) { + this.mediaItemService.delete(mediaItem); } - mediaItems = [ - { - id: 1, - name: "Firebug", - medium: "Series", - category: "Science Fiction", - year: 2010, - watchedOn: 1294166565384, - isFavorite: false - }, - { - id: 2, - name: "The Small Tall", - medium: "Movies", - category: "Comedy", - year: 2015, - watchedOn: null, - isFavorite: true - }, { - id: 3, - name: "The Redemption", - medium: "Movies", - category: "Action", - year: 2016, - watchedOn: null, - isFavorite: false - }, { - id: 4, - name: "Hoopers", - medium: "Series", - category: "Drama", - year: null, - watchedOn: null, - isFavorite: true - }, { - id: 5, - name: "Happy Joe: Cheery Road", - medium: "Movies", - category: "Action", - year: 2015, - watchedOn: 1457166565384, - isFavorite: false - } - ]; + mediaItems; } \ No newline at end of file diff --git a/app/media-item.service.ts b/app/media-item.service.ts new file mode 100755 index 0000000..bcc6919 --- /dev/null +++ b/app/media-item.service.ts @@ -0,0 +1,61 @@ +export class MediaItemService { + get() { + return this.mediaItems; + } + + add(mediaItem) { + this.mediaItems.push(mediaItem); + } + + delete(mediaItem) { + var index = this.mediaItems.indexOf(mediaItem); + if (index >= 0) { + this.mediaItems.splice(index, 1); + } + } + + mediaItems = [ + { + id: 1, + name: "Firebug", + medium: "Series", + category: "Science Fiction", + year: 2010, + watchedOn: 1294166565384, + isFavorite: false + }, + { + id: 2, + name: "The Small Tall", + medium: "Movies", + category: "Comedy", + year: 2015, + watchedOn: null, + isFavorite: true + }, { + id: 3, + name: "The Redemption", + medium: "Movies", + category: "Action", + year: 2016, + watchedOn: null, + isFavorite: false + }, { + id: 4, + name: "Hoopers", + medium: "Series", + category: "Drama", + year: null, + watchedOn: null, + isFavorite: true + }, { + id: 5, + name: "Happy Joe: Cheery Road", + medium: "Movies", + category: "Action", + year: 2015, + watchedOn: 1457166565384, + isFavorite: false + } + ]; +} \ No newline at end of file From 4aa2ccbe2e566a0a693884e73934e3215443ae6e Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:16:08 -0700 Subject: [PATCH 26/79] end of video commit --- app/main.ts | 11 ++++++++++- app/media-item-form.component.ts | 1 - app/media-item-list.component.ts | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/main.ts b/app/main.ts index c772c66..515dfde 100755 --- a/app/main.ts +++ b/app/main.ts @@ -1,4 +1,13 @@ import {bootstrap} from 'angular2/platform/browser'; import {AppComponent} from './app.component'; +import {MediaItemService} from './media-item.service'; +import {provide} from 'angular2/core'; -bootstrap(AppComponent); \ No newline at end of file +var lookupLists = { + mediums: ['Movies', 'Series'] +}; + +bootstrap(AppComponent, [ + MediaItemService, + provide('LOOKUP_LISTS', { useValue: lookupLists }) + ]); \ No newline at end of file diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index c72938a..4b14f29 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -4,7 +4,6 @@ import {MediaItemService} from './media-item.service'; @Component({ selector: 'media-item-form', - providers: [MediaItemService], templateUrl: 'app/media-item-form.component.html', styleUrls: ['app/media-item-form.component.css'] }) diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index e0aef0b..9b41ff0 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -7,7 +7,6 @@ import {MediaItemService} from './media-item.service'; selector: 'media-item-list', directives: [MediaItemComponent], pipes: [CategoryListPipe], - providers: [MediaItemService], templateUrl: 'app/media-item-list.component.html', styleUrls: ['app/media-item-list.component.css'] }) From 71ba8169371189123d3325c6bf92e1bbfc1ed676 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:17:06 -0700 Subject: [PATCH 27/79] end of video commit --- app/media-item-form.component.html | 3 +-- app/media-item-form.component.ts | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/media-item-form.component.html b/app/media-item-form.component.html index 5eff419..df27462 100755 --- a/app/media-item-form.component.html +++ b/app/media-item-form.component.html @@ -7,8 +7,7 @@

    Add Media to Watch

  • diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 4b14f29..e9d2414 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,4 +1,4 @@ -import {Component} from 'angular2/core'; +import {Component, Inject} from 'angular2/core'; import {Control, Validators, FormBuilder} from 'angular2/common'; import {MediaItemService} from './media-item.service'; @@ -11,7 +11,8 @@ export class MediaItemFormComponent { form; constructor(private formBuilder: FormBuilder, - private mediaItemService: MediaItemService) {} + private mediaItemService: MediaItemService, + @Inject('LOOKUP_LISTS') public lookupLists) {} ngOnInit() { this.form = this.formBuilder.group({ From abc514bd96ed51e2f0275f2f14655297a330bf68 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:19:15 -0700 Subject: [PATCH 28/79] end of video commit --- app/main.ts | 7 +- app/media-item-form.component.ts | 3 +- app/mock-xhr-backend.ts | 125 +++++++++++++++++++++++++++++++ app/providers.ts | 7 ++ media/01.png | Bin 0 -> 34383 bytes media/02.png | Bin 0 -> 34383 bytes media/03.png | Bin 0 -> 34383 bytes media/04.png | Bin 0 -> 34383 bytes 8 files changed, 136 insertions(+), 6 deletions(-) create mode 100755 app/mock-xhr-backend.ts create mode 100755 app/providers.ts create mode 100755 media/01.png create mode 100755 media/02.png create mode 100755 media/03.png create mode 100755 media/04.png diff --git a/app/main.ts b/app/main.ts index 515dfde..6281915 100755 --- a/app/main.ts +++ b/app/main.ts @@ -2,12 +2,9 @@ import {bootstrap} from 'angular2/platform/browser'; import {AppComponent} from './app.component'; import {MediaItemService} from './media-item.service'; import {provide} from 'angular2/core'; - -var lookupLists = { - mediums: ['Movies', 'Series'] -}; +import {LOOKUP_LISTS, lookupLists} from './providers'; bootstrap(AppComponent, [ MediaItemService, - provide('LOOKUP_LISTS', { useValue: lookupLists }) + provide(LOOKUP_LISTS, { useValue: lookupLists }) ]); \ No newline at end of file diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index e9d2414..8408e96 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -1,6 +1,7 @@ import {Component, Inject} from 'angular2/core'; import {Control, Validators, FormBuilder} from 'angular2/common'; import {MediaItemService} from './media-item.service'; +import {LOOKUP_LISTS} from './providers'; @Component({ selector: 'media-item-form', @@ -12,7 +13,7 @@ export class MediaItemFormComponent { constructor(private formBuilder: FormBuilder, private mediaItemService: MediaItemService, - @Inject('LOOKUP_LISTS') public lookupLists) {} + @Inject(LOOKUP_LISTS) public lookupLists) {} ngOnInit() { this.form = this.formBuilder.group({ diff --git a/app/mock-xhr-backend.ts b/app/mock-xhr-backend.ts new file mode 100755 index 0000000..b63b534 --- /dev/null +++ b/app/mock-xhr-backend.ts @@ -0,0 +1,125 @@ +import {Request, Response, ResponseOptions, RequestMethod} from 'angular2/http'; +import {Observable} from 'rxjs/Observable'; +import {Observer} from 'rxjs/Observer'; + +export class MockXHRBackend { + constructor() { + } + + createConnection(request: Request) { + var response = new Observable((responseObserver: Observer) => { + var responseData; + var responseOptions; + switch (request.method) { + case RequestMethod.Get: + if (request.url.indexOf('mediaitems?medium=') >= 0 || request.url === 'mediaitems') { + var medium; + if (request.url.indexOf('?') >= 0) { + medium = request.url.split('=')[1]; + if (medium === 'undefined') medium = ''; + } + var mediaItems; + if (medium) { + mediaItems = this._mediaItems.filter(mediaItem => mediaItem.medium === medium); + if (mediaItems.length === 0) { + responseOptions = new ResponseOptions({ + body: JSON.stringify({error: 'medium is not valid'}), + status: 404} + ); + responseObserver.error(new Response(responseOptions)); + } + } else { + mediaItems = this._mediaItems; + } + responseOptions = new ResponseOptions({ + body: { mediaItems: JSON.parse(JSON.stringify(mediaItems)) }, + status: 200 + }); + } else { + var id = parseInt(request.url.split('/')[1]); + mediaItems = this._mediaItems.filter(mediaItem => mediaItem.id === id); + responseOptions = new ResponseOptions({ + body: JSON.parse(JSON.stringify(mediaItems[0])), + status: 200 + }); + } + break; + case RequestMethod.Post: + var mediaItem = JSON.parse(request.text().toString()); + mediaItem.id = this._getNewId(); + this._mediaItems.push(mediaItem); + responseOptions = new ResponseOptions({ status: 201 }); + break; + case RequestMethod.Delete: + var id = parseInt(request.url.split('/')[1]); + this._deleteMediaItem(id); + responseOptions = new ResponseOptions({ status: 200 }); + } + + var responseObject = new Response(responseOptions); + responseObserver.next(responseObject); + responseObserver.complete(); + return () => { }; + }); + return { response }; + } + + _deleteMediaItem(id) { + var mediaItem = this._mediaItems.find(mediaItem => mediaItem.id === id); + var index = this._mediaItems.indexOf(mediaItem); + if (index >= 0) { + this._mediaItems.splice(index, 1); + } + } + + _getNewId() { + if (this._mediaItems.length > 0) { + return Math.max.apply(Math, this._mediaItems.map(mediaItem => mediaItem.id)) + 1; + } + } + + _mediaItems = [ + { + id: 1, + name: "Firebug", + medium: "Series", + category: "Science Fiction", + year: 2010, + watchedOn: 1294166565384, + isFavorite: false + }, + { + id: 2, + name: "The Small Tall", + medium: "Movies", + category: "Comedy", + year: 2015, + watchedOn: null, + isFavorite: true + }, { + id: 3, + name: "The Redemption", + medium: "Movies", + category: "Action", + year: 2016, + watchedOn: null, + isFavorite: false + }, { + id: 4, + name: "Hoopers", + medium: "Series", + category: "Drama", + year: null, + watchedOn: null, + isFavorite: true + }, { + id: 5, + name: "Happy Joe: Cheery Road", + medium: "Movies", + category: "Action", + year: 2015, + watchedOn: 1457166565384, + isFavorite: false + } + ]; +} \ No newline at end of file diff --git a/app/providers.ts b/app/providers.ts new file mode 100755 index 0000000..99d921a --- /dev/null +++ b/app/providers.ts @@ -0,0 +1,7 @@ +import {OpaqueToken} from 'angular2/core'; + +export var lookupLists = { + mediums: ['Movies', 'Series'] +}; + +export var LOOKUP_LISTS = new OpaqueToken('LookupLists'); \ No newline at end of file diff --git a/media/01.png b/media/01.png new file mode 100755 index 0000000000000000000000000000000000000000..ae2671bb532a10403f2baa14f467ba92801d3361 GIT binary patch literal 34383 zcmeHQ2UwHI(_f@_M6e+mz>0({FX^_D{jDY`h@ zkB6r-uV3LcS9Vs}3 z2E<+k`yDCC${XktUS(OpXwRU8wk2~Mh z!9haf%J${rYt}@pRv)LQuu|@!be`7EHH&sFUwN(S`Mh2J_fslf-mE?Gz_Q?AY3#8~ z=~NkoEzXAHj3X5G+xG4HY*BjJ<>z_&){%1kgOQ5NF>kHV8XYlIxxn0fsCKIKStJ&I zS6&9Cy2hkZ`z)(deq+0Bide*Au~hE*VIyTC)R6VuHMV<@wWC->?AC#9XuAZOex2!+ zi^h`C^g+MAyo(}YE4R%PLz6dYsf%r2k4W8E%k7chaC9*9rfXH~57IjU@Z z0&Rc&$fGnEW8<)6U2;}deqP?g5oxxQ8P`1K*ZN+Vmg-Rx@M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@V8uF2y0wR0KoF2fsYAO^bae;M@al- zul(<|tEB*7Js5=Fzo+mYQ2q+qpbOlh(`{=2zE=E-whahXRE2L0ANEOfoA|a0$&0C z(NqTp@pRMyPHe03_5i@Qc^Y2uH%#1t&+{`o@rg$q@975uD>#6J9W5_r#uo&lJOf@mD_w z1Gj|my+jW1CEyFd_}cy%aEDW803g`NbVy)U0PY5i0g(Z=1a8W9Cgi^begT{XjMwx| dB{-(n)txeT_n%TJ*%MoGaTsl%Xghu3{{i;7;8y?u literal 0 HcmV?d00001 diff --git a/media/02.png b/media/02.png new file mode 100755 index 0000000000000000000000000000000000000000..7ab30baab3c7ea15bffed5298a1caba85f5d7d9d GIT binary patch literal 34383 zcmeHQ2|SeB`+r3Ct)fEQL92{0cCr)-MP=!t<0#p5=MYIp6b~=RD`km{w1pY9%2mFA4w> zHrAF7=s6y|*<-d4Ky(_z!eaV#ZzhWw3g0q?=^!giaxh;TE)z9UO<6>G@+#$BPh{;c z4461kKp`t(761D6;p=4W)y3C{J{Bre-o1X=AFI|}uY0xl51)tW)vs?go_u6le6Tz& zIY%f%SbUqcw!Ln+_#VOp~mR-oB=y!jW;S2=a=r{!l))6?a2XgMy54**jGx389=Cm@BP0mGyc_Or z1u&fq^G5yp`W}SG)x<33gIQaYW%&}KfHa7{$`ZWC!NHs#*GvQ#O_1@Na>)=LlR?wQ z+0z=1o`Q^QX|dxVEDoCXt5%EwfyFQ{OI0-lmdAk1q|eUApT-`RE>=TG#T++I9d0-= zVwNy@zL2xChSKP4n;~Om^l1HPJH~5dE{c)UiqMgIS$-2BAxajFw!9%ETk>#rw%+;_ z$+_gW=LMTo+}sKpi*gPGpox3M3cJ&&PDz#zA14^@*SLE`nSl3CVhIbX*Loh88h;WJ zN}f8G2ViU_?%J68`}Lz2)Y^FJ+ob zn~Qpc4-1?(=HOEE(JOBqRaBctxj$Y}C&S)*<>mlMjm#ORB~1dPYH7mp7e=Q?hzLx` z5*|cTe!7a!ZH2#5(hO_G&nAKW3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fb5872e3ba67f3cbddb6f1423 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:21:48 -0700 Subject: [PATCH 29/79] end of video commit --- app/main.ts | 6 +++++- app/mock-xhr-backend.ts | 8 ++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/main.ts b/app/main.ts index 6281915..ace3402 100755 --- a/app/main.ts +++ b/app/main.ts @@ -3,8 +3,12 @@ import {AppComponent} from './app.component'; import {MediaItemService} from './media-item.service'; import {provide} from 'angular2/core'; import {LOOKUP_LISTS, lookupLists} from './providers'; +import {HTTP_PROVIDERS, XHRBackend} from 'angular2/http'; +import {MockXHRBackend} from './mock-xhr-backend'; bootstrap(AppComponent, [ MediaItemService, - provide(LOOKUP_LISTS, { useValue: lookupLists }) + provide(LOOKUP_LISTS, { useValue: lookupLists }), + HTTP_PROVIDERS, + provide(XHRBackend, { useClass: MockXHRBackend }) ]); \ No newline at end of file diff --git a/app/mock-xhr-backend.ts b/app/mock-xhr-backend.ts index b63b534..e478c7c 100755 --- a/app/mock-xhr-backend.ts +++ b/app/mock-xhr-backend.ts @@ -12,12 +12,8 @@ export class MockXHRBackend { var responseOptions; switch (request.method) { case RequestMethod.Get: - if (request.url.indexOf('mediaitems?medium=') >= 0 || request.url === 'mediaitems') { - var medium; - if (request.url.indexOf('?') >= 0) { - medium = request.url.split('=')[1]; - if (medium === 'undefined') medium = ''; - } + if (request.url.indexOf('mediaitems?medium=') >= 0) { + var medium = request.url.split('=')[1]; var mediaItems; if (medium) { mediaItems = this._mediaItems.filter(mediaItem => mediaItem.medium === medium); From 27d7fd2519c01e1bf744a546cae00117a6babd9c Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:28:11 -0700 Subject: [PATCH 30/79] fix xhr backend get method --- app/mock-xhr-backend.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/mock-xhr-backend.ts b/app/mock-xhr-backend.ts index e478c7c..b63b534 100755 --- a/app/mock-xhr-backend.ts +++ b/app/mock-xhr-backend.ts @@ -12,8 +12,12 @@ export class MockXHRBackend { var responseOptions; switch (request.method) { case RequestMethod.Get: - if (request.url.indexOf('mediaitems?medium=') >= 0) { - var medium = request.url.split('=')[1]; + if (request.url.indexOf('mediaitems?medium=') >= 0 || request.url === 'mediaitems') { + var medium; + if (request.url.indexOf('?') >= 0) { + medium = request.url.split('=')[1]; + if (medium === 'undefined') medium = ''; + } var mediaItems; if (medium) { mediaItems = this._mediaItems.filter(mediaItem => mediaItem.medium === medium); From e1021d68a3b7dd8c1961fc9ad5266058b1fdef6e Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:35:44 -0700 Subject: [PATCH 31/79] end of video commit --- app/media-item-list.component.html | 15 ++++++++++++++- app/media-item-list.component.ts | 13 +++++++++++-- app/media-item.service.ts | 12 +++++++++++- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index 4b4335a..ca45bac 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -1,4 +1,17 @@ -
    + +
    +

    {{medium}}

    {{ mediaItems | categoryList }}
    diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index 9b41ff0..0881fd4 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -11,15 +11,24 @@ import {MediaItemService} from './media-item.service'; styleUrls: ['app/media-item-list.component.css'] }) export class MediaItemListComponent { + medium = ''; + mediaItems = []; + constructor(private mediaItemService: MediaItemService) {} ngOnInit() { - this.mediaItems = this.mediaItemService.get(); + this.getMediaItems(this.medium); } onMediaItemDeleted(mediaItem) { this.mediaItemService.delete(mediaItem); } - mediaItems; + getMediaItems(medium) { + this.medium = medium; + this.mediaItemService.get() + .subscribe(mediaItems => { + this.mediaItems = mediaItems; + }); + } } \ No newline at end of file diff --git a/app/media-item.service.ts b/app/media-item.service.ts index bcc6919..2cc2877 100755 --- a/app/media-item.service.ts +++ b/app/media-item.service.ts @@ -1,6 +1,16 @@ +import {Injectable} from 'angular2/core'; +import {Http} from 'angular2/http'; +import 'rxjs/add/operator/map'; + +@Injectable() export class MediaItemService { + constructor(private http: Http) {} + get() { - return this.mediaItems; + return this.http.get('mediaitems') + .map(response => { + return response.json().mediaItems; + }); } add(mediaItem) { From 6c7799327434fffe29c8b9e233e9af03e8d5708c Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:38:18 -0700 Subject: [PATCH 32/79] end of video commit --- app/media-item-list.component.ts | 2 +- app/media-item.service.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index 0881fd4..f3745e8 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -26,7 +26,7 @@ export class MediaItemListComponent { getMediaItems(medium) { this.medium = medium; - this.mediaItemService.get() + this.mediaItemService.get(medium) .subscribe(mediaItems => { this.mediaItems = mediaItems; }); diff --git a/app/media-item.service.ts b/app/media-item.service.ts index 2cc2877..074fb1b 100755 --- a/app/media-item.service.ts +++ b/app/media-item.service.ts @@ -1,13 +1,15 @@ import {Injectable} from 'angular2/core'; -import {Http} from 'angular2/http'; +import {Http, URLSearchParams} from 'angular2/http'; import 'rxjs/add/operator/map'; @Injectable() export class MediaItemService { constructor(private http: Http) {} - get() { - return this.http.get('mediaitems') + get(medium) { + var searchParams = new URLSearchParams(); + searchParams.append('medium', medium); + return this.http.get('mediaitems', {search: searchParams}) .map(response => { return response.json().mediaItems; }); From bce1981a1c2a5febb37893c41dd9f70b88333744 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:44:56 -0700 Subject: [PATCH 33/79] end of video commit --- app/media-item-form.component.ts | 3 ++- app/media-item-list.component.ts | 5 ++++- app/media-item.service.ts | 12 ++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 8408e96..9e58273 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -37,6 +37,7 @@ export class MediaItemFormComponent { } onSubmit(mediaItem) { - this.mediaItemService.add(mediaItem); + this.mediaItemService.add(mediaItem) + .subscribe(); } } \ No newline at end of file diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index f3745e8..d7adaf4 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -21,7 +21,10 @@ export class MediaItemListComponent { } onMediaItemDeleted(mediaItem) { - this.mediaItemService.delete(mediaItem); + this.mediaItemService.delete(mediaItem) + .subscribe(() => { + this.getMediaItems(this.medium); + }); } getMediaItems(medium) { diff --git a/app/media-item.service.ts b/app/media-item.service.ts index 074fb1b..f2b7139 100755 --- a/app/media-item.service.ts +++ b/app/media-item.service.ts @@ -1,5 +1,5 @@ import {Injectable} from 'angular2/core'; -import {Http, URLSearchParams} from 'angular2/http'; +import {Http, URLSearchParams, Headers} from 'angular2/http'; import 'rxjs/add/operator/map'; @Injectable() @@ -16,14 +16,14 @@ export class MediaItemService { } add(mediaItem) { - this.mediaItems.push(mediaItem); + var headers = new Headers({ 'Content-Type': 'application/json' }); + return this.http.post('mediaitems', JSON.stringify(mediaItem), { headers: headers }) + .map(response => {}); } delete(mediaItem) { - var index = this.mediaItems.indexOf(mediaItem); - if (index >= 0) { - this.mediaItems.splice(index, 1); - } + return this.http.delete(`mediaitems/${mediaItem.id}`) + .map(response => {}); } mediaItems = [ From 548a14e1bc53676df87401bac0d16fff29c63753 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:46:07 -0700 Subject: [PATCH 34/79] end of video commit --- app/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/main.ts b/app/main.ts index ace3402..eee0a41 100755 --- a/app/main.ts +++ b/app/main.ts @@ -5,10 +5,12 @@ import {provide} from 'angular2/core'; import {LOOKUP_LISTS, lookupLists} from './providers'; import {HTTP_PROVIDERS, XHRBackend} from 'angular2/http'; import {MockXHRBackend} from './mock-xhr-backend'; +import {ROUTER_PROVIDERS} from 'angular2/router'; bootstrap(AppComponent, [ MediaItemService, provide(LOOKUP_LISTS, { useValue: lookupLists }), HTTP_PROVIDERS, - provide(XHRBackend, { useClass: MockXHRBackend }) + provide(XHRBackend, { useClass: MockXHRBackend }), + ROUTER_PROVIDERS ]); \ No newline at end of file From a33513da89066a2f616d0eb949296e3a2f1ea85d Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:47:54 -0700 Subject: [PATCH 35/79] end of video commit --- app/app.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/app.component.ts b/app/app.component.ts index 9940f64..c8038b0 100755 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,7 +1,12 @@ import {Component} from 'angular2/core'; import {MediaItemListComponent} from './media-item-list.component'; import {MediaItemFormComponent} from './media-item-form.component'; +import {RouteConfig} from 'angular2/router'; +@RouteConfig([ + { path: '/:medium', component: MediaItemListComponent, name: 'List' }, + { path: '/add', component: MediaItemFormComponent, name: 'AddMediaItem' } +]) @Component({ selector: 'media-tracker-app', directives: [MediaItemListComponent, MediaItemFormComponent], From 4c7f8335d7003975ea234c26f95f34084b444758 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:49:18 -0700 Subject: [PATCH 36/79] end of video commit --- app/app.component.css | 12 ++++++++++++ app/app.component.html | 14 ++++++++++++-- app/app.component.ts | 4 ++-- app/media-item-list.component.html | 18 ++++++------------ 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/app/app.component.css b/app/app.component.css index 93654a0..6d985c9 100755 --- a/app/app.component.css +++ b/app/app.component.css @@ -2,6 +2,18 @@ display: flex; font-family: Arial, Helvetica, sans-serif; } +nav { + display: flex; + flex-direction: column; + width: 68px; + height: 100vh; + background-color: #53ace4; +} +nav .icon { + width: 48px; + height: 48px; + margin: 10px; +} section { width: 100%; background-color: #32435b; diff --git a/app/app.component.html b/app/app.component.html index 451928a..1e0eec2 100755 --- a/app/app.component.html +++ b/app/app.component.html @@ -1,8 +1,18 @@ +

    Media Watch List

    Keeping track of the media I want to watch.

    - - +
    \ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index c8038b0..f61196e 100755 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,7 +1,7 @@ import {Component} from 'angular2/core'; import {MediaItemListComponent} from './media-item-list.component'; import {MediaItemFormComponent} from './media-item-form.component'; -import {RouteConfig} from 'angular2/router'; +import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router'; @RouteConfig([ { path: '/:medium', component: MediaItemListComponent, name: 'List' }, @@ -9,7 +9,7 @@ import {RouteConfig} from 'angular2/router'; ]) @Component({ selector: 'media-tracker-app', - directives: [MediaItemListComponent, MediaItemFormComponent], + directives: [ROUTER_DIRECTIVES], templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'] }) diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index ca45bac..ebb19f1 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -1,14 +1,3 @@ -

    {{medium}}

    @@ -19,4 +8,9 @@

    {{medium}}

    [mediaItemToWatch]="mediaItem" (deleted)="onMediaItemDeleted($event)" [ngClass]="{'medium-movies': mediaItem.medium === 'Movies', 'medium-series': mediaItem.medium === 'Series'}"> -
    \ No newline at end of file +

  • + \ No newline at end of file From cc9d90cc10d09d9b797c71e931e04b63bd323760 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 10:51:17 -0700 Subject: [PATCH 37/79] end of video commit --- app/app.component.html | 6 +++--- app/media-item-form.component.ts | 4 +++- app/media-item-list.component.html | 2 +- app/media-item-list.component.ts | 7 +++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/app.component.html b/app/app.component.html index 1e0eec2..7a4aee9 100755 --- a/app/app.component.html +++ b/app/app.component.html @@ -1,11 +1,11 @@ diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index 9e58273..c933b08 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -38,6 +38,8 @@ export class MediaItemFormComponent { onSubmit(mediaItem) { this.mediaItemService.add(mediaItem) - .subscribe(); + .subscribe(() => { + + }); } } \ No newline at end of file diff --git a/app/media-item-list.component.html b/app/media-item-list.component.html index ebb19f1..86e05dc 100755 --- a/app/media-item-list.component.html +++ b/app/media-item-list.component.html @@ -10,7 +10,7 @@

    {{medium}}

    [ngClass]="{'medium-movies': mediaItem.medium === 'Movies', 'medium-series': mediaItem.medium === 'Series'}"> \ No newline at end of file diff --git a/app/media-item-list.component.ts b/app/media-item-list.component.ts index d7adaf4..6c557cc 100755 --- a/app/media-item-list.component.ts +++ b/app/media-item-list.component.ts @@ -2,10 +2,11 @@ import {Component} from 'angular2/core'; import {MediaItemComponent} from './media-item.component'; import {CategoryListPipe} from './category-list.pipe'; import {MediaItemService} from './media-item.service'; +import {RouteParams, ROUTER_DIRECTIVES} from 'angular2/router'; @Component({ selector: 'media-item-list', - directives: [MediaItemComponent], + directives: [MediaItemComponent, ROUTER_DIRECTIVES], pipes: [CategoryListPipe], templateUrl: 'app/media-item-list.component.html', styleUrls: ['app/media-item-list.component.css'] @@ -14,9 +15,11 @@ export class MediaItemListComponent { medium = ''; mediaItems = []; - constructor(private mediaItemService: MediaItemService) {} + constructor(private mediaItemService: MediaItemService, + private routeParams: RouteParams) {} ngOnInit() { + this.medium = this.routeParams.get('medium'); this.getMediaItems(this.medium); } From 918c7f397bed3453fd709f0bdb8194df3d64d196 Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 11:09:00 -0700 Subject: [PATCH 38/79] end of video commit --- app/media-item-form.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/media-item-form.component.ts b/app/media-item-form.component.ts index c933b08..4665fa0 100755 --- a/app/media-item-form.component.ts +++ b/app/media-item-form.component.ts @@ -2,6 +2,7 @@ import {Component, Inject} from 'angular2/core'; import {Control, Validators, FormBuilder} from 'angular2/common'; import {MediaItemService} from './media-item.service'; import {LOOKUP_LISTS} from './providers'; +import {Router} from 'angular2/router'; @Component({ selector: 'media-item-form', @@ -13,7 +14,8 @@ export class MediaItemFormComponent { constructor(private formBuilder: FormBuilder, private mediaItemService: MediaItemService, - @Inject(LOOKUP_LISTS) public lookupLists) {} + @Inject(LOOKUP_LISTS) public lookupLists, + private router: Router) {} ngOnInit() { this.form = this.formBuilder.group({ @@ -39,7 +41,7 @@ export class MediaItemFormComponent { onSubmit(mediaItem) { this.mediaItemService.add(mediaItem) .subscribe(() => { - + this.router.navigate(['../List', { medium: mediaItem.medium }]); }); } } \ No newline at end of file From 37edbc1bb32bfae6a46bfda0e7cc50cca02b034e Mon Sep 17 00:00:00 2001 From: Justin Schwartzenberger Date: Sat, 16 Jul 2016 11:11:34 -0700 Subject: [PATCH 39/79] add missing http script tag --- index.html | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 index.html diff --git a/index.html b/index.html old mode 100644 new mode 100755 index 249ee45..c0bb8ba --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ +