From 4fd8aa327004b27530fd96bdde5df60e6745a1f6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 May 2016 17:49:18 +0200 Subject: Alphabetical --- client/app/videos/video-add/video-add.component.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'client/app/videos/video-add') diff --git a/client/app/videos/video-add/video-add.component.ts b/client/app/videos/video-add/video-add.component.ts index 67a04a2b4..b11475ae9 100644 --- a/client/app/videos/video-add/video-add.component.ts +++ b/client/app/videos/video-add/video-add.component.ts @@ -18,20 +18,21 @@ declare var jQuery: any; }) export class VideoAddComponent implements OnInit { - user: User; fileToUpload: any; progressBar: { value: number; max: number; } = { value: 0, max: 0 }; + user: User; - private _form: any; + private form: any; constructor( - private _router: Router, private _elementRef: ElementRef, - private _authService: AuthService + private router: Router, + private elementRef: ElementRef, + private authService: AuthService ) {} ngOnInit() { this.user = User.load(); - jQuery(this._elementRef.nativeElement).find('#videofile').fileupload({ + jQuery(this.elementRef.nativeElement).find('#videofile').fileupload({ url: '/api/v1/videos', dataType: 'json', singleFileUploads: true, @@ -39,7 +40,7 @@ export class VideoAddComponent implements OnInit { autoupload: false, add: (e, data) => { - this._form = data; + this.form = data; this.fileToUpload = data['files'][0]; }, @@ -55,14 +56,14 @@ export class VideoAddComponent implements OnInit { console.log('Video uploaded.'); // Print all the videos once it's finished - this._router.navigate(['VideosList']); + this.router.navigate(['VideosList']); } }); } uploadFile() { - this._form.headers = this._authService.getRequestHeader().toJSON(); - this._form.formData = jQuery(this._elementRef.nativeElement).find('form').serializeArray(); - this._form.submit(); + this.form.headers = this.authService.getRequestHeader().toJSON(); + this.form.formData = jQuery(this.elementRef.nativeElement).find('form').serializeArray(); + this.form.submit(); } } -- cgit v1.2.3