diff options
Diffstat (limited to 'client/src/app/videos/+video-edit')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 12 | ||||
-rw-r--r-- | client/src/app/videos/+video-edit/video-update.component.ts | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 21311b184..d930423c2 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
@@ -11,12 +11,13 @@ import { | |||
11 | VIDEO_LICENCE, | 11 | VIDEO_LICENCE, |
12 | VIDEO_LANGUAGE, | 12 | VIDEO_LANGUAGE, |
13 | VIDEO_DESCRIPTION, | 13 | VIDEO_DESCRIPTION, |
14 | VIDEO_TAGS | 14 | VIDEO_TAGS, |
15 | VIDEO_FILE | ||
15 | } from '../../shared' | 16 | } from '../../shared' |
17 | import { ServerService} from '../../core' | ||
16 | import { VideoService } from '../shared' | 18 | import { VideoService } from '../shared' |
17 | import { VideoCreate } from '../../../../../shared' | 19 | import { VideoCreate } from '../../../../../shared' |
18 | import { HttpEventType, HttpResponse } from '@angular/common/http' | 20 | import { HttpEventType, HttpResponse } from '@angular/common/http' |
19 | import { VIDEO_FILE } from '../../shared/forms/form-validators/video' | ||
20 | 21 | ||
21 | @Component({ | 22 | @Component({ |
22 | selector: 'my-videos-add', | 23 | selector: 'my-videos-add', |
@@ -59,6 +60,7 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
59 | private formBuilder: FormBuilder, | 60 | private formBuilder: FormBuilder, |
60 | private router: Router, | 61 | private router: Router, |
61 | private notificationsService: NotificationsService, | 62 | private notificationsService: NotificationsService, |
63 | private serverService: ServerService, | ||
62 | private videoService: VideoService | 64 | private videoService: VideoService |
63 | ) { | 65 | ) { |
64 | super() | 66 | super() |
@@ -84,9 +86,9 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
84 | } | 86 | } |
85 | 87 | ||
86 | ngOnInit () { | 88 | ngOnInit () { |
87 | this.videoCategories = this.videoService.videoCategories | 89 | this.videoCategories = this.serverService.getVideoCategories() |
88 | this.videoLicences = this.videoService.videoLicences | 90 | this.videoLicences = this.serverService.getVideoLicences() |
89 | this.videoLanguages = this.videoService.videoLanguages | 91 | this.videoLanguages = this.serverService.getVideoLanguages() |
90 | 92 | ||
91 | this.buildForm() | 93 | this.buildForm() |
92 | } | 94 | } |
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index 141ed3522..6d45265e7 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component, ElementRef, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { FormBuilder, FormGroup } from '@angular/forms' | 2 | import { FormBuilder, FormGroup } from '@angular/forms' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | 4 | ||
5 | import { NotificationsService } from 'angular2-notifications' | 5 | import { NotificationsService } from 'angular2-notifications' |
6 | 6 | ||
7 | import { AuthService } from '../../core' | 7 | import { ServerService } from '../../core' |
8 | import { | 8 | import { |
9 | FormReactive, | 9 | FormReactive, |
10 | VIDEO_NAME, | 10 | VIDEO_NAME, |
@@ -52,12 +52,11 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
52 | fileError = '' | 52 | fileError = '' |
53 | 53 | ||
54 | constructor ( | 54 | constructor ( |
55 | private authService: AuthService, | ||
56 | private elementRef: ElementRef, | ||
57 | private formBuilder: FormBuilder, | 55 | private formBuilder: FormBuilder, |
58 | private route: ActivatedRoute, | 56 | private route: ActivatedRoute, |
59 | private router: Router, | 57 | private router: Router, |
60 | private notificationsService: NotificationsService, | 58 | private notificationsService: NotificationsService, |
59 | private serverService: ServerService, | ||
61 | private videoService: VideoService | 60 | private videoService: VideoService |
62 | ) { | 61 | ) { |
63 | super() | 62 | super() |
@@ -80,9 +79,9 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
80 | ngOnInit () { | 79 | ngOnInit () { |
81 | this.buildForm() | 80 | this.buildForm() |
82 | 81 | ||
83 | this.videoCategories = this.videoService.videoCategories | 82 | this.videoCategories = this.serverService.getVideoCategories() |
84 | this.videoLicences = this.videoService.videoLicences | 83 | this.videoLicences = this.serverService.getVideoLicences() |
85 | this.videoLanguages = this.videoService.videoLanguages | 84 | this.videoLanguages = this.serverService.getVideoLanguages() |
86 | 85 | ||
87 | const uuid: string = this.route.snapshot.params['uuid'] | 86 | const uuid: string = this.route.snapshot.params['uuid'] |
88 | this.videoService.getVideo(uuid) | 87 | this.videoService.getVideo(uuid) |