Skip to content

Commit 67843e1

Browse files
author
Ian Redpath
committed
enter functionality on searchbars. add year to saved movies
1 parent aa4801f commit 67843e1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

public/project/components/libraries/libraries.view.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ <h1>Libraries</h1>
33
<div class="row searchbar-wrapper">
44
<div class="col-md-8 col-md-push-2 col-lg-6 col-lg-push-3 col-sm-8 col-sm-push-2 col-xs-8 col-xs-push-2">
55
<div class="input-group">
6-
<input type="text" class="form-control" placeholder="Search by library name, user, or movie" [(ngModel)]="query">
6+
<input type="text" class="form-control" placeholder="Search by library name, user, or movie" [(ngModel)]="query" (keyup.enter)="search()">
77
<span class="input-group-btn">
8-
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()" (keyup.enter)="search()"></button>
8+
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()"></button>
99
</span>
1010
</div>
1111
</div>

public/project/components/movies/movie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class Movie {
8282
this.posterService.getPosterFor(imdbId)
8383
.subscribe(posterResp => {
8484
const image = `data:image/png;base64,${posterResp.text()}`
85-
this.movieService.addMovie({ imdbId, title: this.omdbMovie.title, image })
85+
this.movieService.addMovie({ imdbId, title: this.omdbMovie.title, image, year: this.omdbMovie.year })
8686
.subscribe(response => {
8787
const createResp = response.json().data
8888
if (createResp.movie) {

public/project/components/movies/movies.view.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ <h1>Movies</h1>
33
<div class="row searchbar-wrapper">
44
<div class="col-md-8 col-md-push-2 col-lg-6 col-lg-push-3 col-sm-8 col-sm-push-2 col-xs-8 col-xs-push-2">
55
<div class="input-group">
6-
<input type="text" class="form-control" placeholder="Search by title" [(ngModel)]="query">
6+
<input type="text" class="form-control" placeholder="Search by title" [(ngModel)]="query" (keyup.enter)="search()">
77
<span class="input-group-btn">
8-
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()" (keyup.enter)="search()"></button>
8+
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()"></button>
99
</span>
1010
</div>
1111
</div>

public/project/components/users/users.view.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ <h1>Users</h1>
33
<div class="row searchbar-wrapper">
44
<div class="col-md-8 col-md-push-2 col-lg-6 col-lg-push-3 col-sm-8 col-sm-push-2 col-xs-8 col-xs-push-2">
55
<div class="input-group">
6-
<input type="text" class="form-control" placeholder="Search by username, name, or email" [(ngModel)]="query">
6+
<input type="text" class="form-control" placeholder="Search by username, name, or email" [(ngModel)]="query" (keyup.enter)="search()">
77
<span class="input-group-btn">
8-
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()" (keyup.enter)="search()"></button>
8+
<button class="btn btn-default glyphicon glyphicon-search search-icon" type="button" (click)="search()"></button>
99
</span>
1010
</div>
1111
</div>

0 commit comments

Comments
 (0)