aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/search
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/search')
-rw-r--r--client/src/app/search/search-filters.component.ts16
1 files changed, 11 insertions, 5 deletions
diff --git a/client/src/app/search/search-filters.component.ts b/client/src/app/search/search-filters.component.ts
index 57131fcac..344a260df 100644
--- a/client/src/app/search/search-filters.component.ts
+++ b/client/src/app/search/search-filters.component.ts
@@ -1,10 +1,10 @@
1import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core' 1import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
2import { ValidatorFn } from '@angular/forms' 2import { ValidatorFn } from '@angular/forms'
3import { VideoValidatorsService } from '@app/shared' 3import { VideoValidatorsService } from '@app/shared'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
5import { I18n } from '@ngx-translate/i18n-polyfill' 5import { I18n } from '@ngx-translate/i18n-polyfill'
6import { AdvancedSearch } from '@app/search/advanced-search.model' 6import { AdvancedSearch } from '@app/search/advanced-search.model'
7import { VideoConstant } from '../../../../shared' 7import { ServerConfig, VideoConstant } from '../../../../shared'
8 8
9@Component({ 9@Component({
10 selector: 'my-search-filters', 10 selector: 'my-search-filters',
@@ -33,6 +33,8 @@ export class SearchFiltersComponent implements OnInit {
33 originallyPublishedStartYear: string 33 originallyPublishedStartYear: string
34 originallyPublishedEndYear: string 34 originallyPublishedEndYear: string
35 35
36 private serverConfig: ServerConfig
37
36 constructor ( 38 constructor (
37 private i18n: I18n, 39 private i18n: I18n,
38 private videoValidatorsService: VideoValidatorsService, 40 private videoValidatorsService: VideoValidatorsService,
@@ -99,9 +101,13 @@ export class SearchFiltersComponent implements OnInit {
99 } 101 }
100 102
101 ngOnInit () { 103 ngOnInit () {
102 this.serverService.videoCategoriesLoaded.subscribe(() => this.videoCategories = this.serverService.getVideoCategories()) 104 this.serverConfig = this.serverService.getTmpConfig()
103 this.serverService.videoLicencesLoaded.subscribe(() => this.videoLicences = this.serverService.getVideoLicences()) 105 this.serverService.getConfig()
104 this.serverService.videoLanguagesLoaded.subscribe(() => this.videoLanguages = this.serverService.getVideoLanguages()) 106 .subscribe(config => this.serverConfig = config)
107
108 this.serverService.getVideoCategories().subscribe(categories => this.videoCategories = categories)
109 this.serverService.getVideoLicences().subscribe(licences => this.videoLicences = licences)
110 this.serverService.getVideoLanguages().subscribe(languages => this.videoLanguages = languages)
105 111
106 this.loadFromDurationRange() 112 this.loadFromDurationRange()
107 this.loadFromPublishedRange() 113 this.loadFromPublishedRange()