From 0f7fedc39857ebc0eb29182c1588a92b9adfb75a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Jul 2018 14:44:19 +0200 Subject: Improve frontend accessibility In particular checkboxes, likes/dislikes, share button, video thumbnails and help buttons --- .../src/app/videos/+video-edit/shared/video-edit.component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client/src/app/videos/+video-edit/shared/video-edit.component.ts') diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 743c015cb..00c7bc41d 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts @@ -49,6 +49,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { calendarDateFormat: string private schedulerInterval + private firstPatchDone = false constructor ( private formValidatorService: FormValidatorService, @@ -167,6 +168,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { .pipe(map(res => parseInt(res.toString(), 10))) .subscribe( newPrivacyId => { + this.schedulePublicationEnabled = newPrivacyId === this.SPECIAL_SCHEDULED_PRIVACY // Value changed @@ -182,11 +184,18 @@ export class VideoEditComponent implements OnInit, OnDestroy { scheduleControl.clearValidators() waitTranscodingControl.enable() - waitTranscodingControl.setValue(true) + + // Do not update the control value on first patch (values come from the server) + if (this.firstPatchDone === true) { + waitTranscodingControl.setValue(true) + } } scheduleControl.updateValueAndValidity() waitTranscodingControl.updateValueAndValidity() + + this.firstPatchDone = true + } ) } -- cgit v1.2.3