From a99593ed9f3244e75f7db793ba6716754d664573 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 May 2016 23:00:58 +0200 Subject: Make the sort/results bar less ugly --- .../videos/components/list/video-sort.component.html | 2 +- .../components/list/videos-list.component.html | 6 +++--- .../components/list/videos-list.component.scss | 20 ++++++++++++++++++++ .../videos/components/list/videos-list.component.ts | 12 +++++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) (limited to 'client/angular/videos') diff --git a/client/angular/videos/components/list/video-sort.component.html b/client/angular/videos/components/list/video-sort.component.html index b1392ccca..3bece0b22 100644 --- a/client/angular/videos/components/list/video-sort.component.html +++ b/client/angular/videos/components/list/video-sort.component.html @@ -1,4 +1,4 @@ - diff --git a/client/angular/videos/components/list/videos-list.component.html b/client/angular/videos/components/list/videos-list.component.html index 5524ab546..3e30b39b0 100644 --- a/client/angular/videos/components/list/videos-list.component.html +++ b/client/angular/videos/components/list/videos-list.component.html @@ -1,6 +1,6 @@ -
- {{ pagination.total }} - +
+
{{ pagination.total }} videos
+
diff --git a/client/angular/videos/components/list/videos-list.component.scss b/client/angular/videos/components/list/videos-list.component.scss index 05c38b833..2abc47b1b 100644 --- a/client/angular/videos/components/list/videos-list.component.scss +++ b/client/angular/videos/components/list/videos-list.component.scss @@ -10,3 +10,23 @@ pagination { display: block; text-align: center; } + +.videos-info { + + padding-bottom: 20px; + margin-bottom: 20px; + border-bottom: 1px solid #f1f1f1; + height: 40px; + line-height: 40px; + width: 765px; + margin-left: 15px; + + my-video-sort { + padding-right: 0; + } + + .videos-total-results { + font-size: 13px; + padding-left: 0; + } +} diff --git a/client/angular/videos/components/list/videos-list.component.ts b/client/angular/videos/components/list/videos-list.component.ts index db64a856e..94b064e16 100644 --- a/client/angular/videos/components/list/videos-list.component.ts +++ b/client/angular/videos/components/list/videos-list.component.ts @@ -78,7 +78,17 @@ export class VideosListComponent implements OnInit { onSort(sort: SortField) { this.sort = sort; - this._router.navigate(['VideosList', { sort: this.sort }]); + + const params: any = { + sort: this.sort + }; + + if (this.search.value) { + params.search = this.search.value; + params.field = this.search.field; + } + + this._router.navigate(['VideosList', params]); this.getVideos(); } } -- cgit v1.2.3