Skip to content

Commit

Permalink
Remove post modal (it was causing some problems)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Dec 16, 2016
1 parent db135b8 commit 66c0176
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 91 deletions.
3 changes: 1 addition & 2 deletions angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/bootstrap/js/dist/util.js",
"../node_modules/bootstrap/js/dist/dropdown.js",
"../node_modules/bootstrap/js/dist/modal.js"
"../node_modules/bootstrap/js/dist/dropdown.js"
],
"environments": {
"source": "environments/environment.ts",
Expand Down
2 changes: 0 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { NavbarContainerComponent } from './navbar/navbar.container';
import { PostComponent } from './post/post.component';
import { TimelineComponent } from './timeline/timeline.component';
import { TimelineContainerComponent } from './timeline/timeline.container';
import { PostModalComponent } from './post-modal/post-modal.component';
import { NewPostNotificationComponent } from './new-post-notification/new-post-notification.component';
import { NewPostFormComponent } from './new-post-form/new-post-form.component';
import { HomeComponent } from './home/home.component';
Expand All @@ -31,7 +30,6 @@ import { rootReducer } from './app.reducers';
PostComponent,
TimelineComponent,
TimelineContainerComponent,
PostModalComponent,
NewPostNotificationComponent,
NewPostFormComponent,
HomeComponent,
Expand Down
Empty file.
13 changes: 0 additions & 13 deletions src/app/post-modal/post-modal.component.html

This file was deleted.

28 changes: 0 additions & 28 deletions src/app/post-modal/post-modal.component.spec.ts

This file was deleted.

29 changes: 0 additions & 29 deletions src/app/post-modal/post-modal.component.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/post/post.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
class="repost-button mr-3"
[class.reposted]="post.reposted"
[name]="'retweet'"
(click)="handleRepostButtonClick($event)"
(click)="handleRepostButtonClick()"
></fa>

<fa
class="like-button"
[class.liked]="post.liked"
[name]="'heart'"
(click)="handleLikeButtonClick($event)"
(click)="handleLikeButtonClick()"
></fa>
</div>
</div>
Expand Down
10 changes: 2 additions & 8 deletions src/app/post/post.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@ export class PostComponent {
@Output() private toggleRepost: EventEmitter<void> = new EventEmitter<void>();

// tslint:disable-next-line:no-unused-variable
private handleLikeButtonClick(event) {
private handleLikeButtonClick() {
this.toggleLikePost.emit(null);

// Prevent the post modal from opening.
event.stopPropagation();
}

// tslint:disable-next-line:no-unused-variable
private handleRepostButtonClick(event) {
private handleRepostButtonClick() {
this.toggleRepost.emit(null);

// Prevent the post modal from opening.
event.stopPropagation();
}
}
7 changes: 0 additions & 7 deletions src/app/timeline/timeline.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,9 @@
>
<app-post
[post]="post"
(click)="postModal.open()"
(toggleLikePost)="handleToggleLikePost(post)"
(toggleRepost)="handleToggleRepost(post)"
></app-post>
<app-post-modal
#postModal
[post]="post"
(toggleLikePost)="handleToggleLikePost(post)"
(toggleRepost)="handleToggleRepost(post)"
></app-post-modal>
</li>
</ul>
</div>

0 comments on commit 66c0176

Please sign in to comment.