submit date on blur when in accessibility mode

As the accessibility mode has no date picker, we can submit it right away
pull/4563/head
Jens Ulferts 9 years ago
parent bbc7025ea9
commit 124987499a
  1. 1
      frontend/app/components/wp-edit/field-types/wp-edit-date-field.directive.html
  2. 7
      frontend/app/components/wp-edit/wp-edit-field/wp-edit-field.directive.ts

@ -7,6 +7,7 @@
type="text"
class="wp-inline-edit--field"
transform-date-value
ng-blur="vm.onlyInAccessibilityMode(vm.handleUserBlur)"
ng-required="vm.field.required"
focus="vm.shouldFocus()"
focus-priority="vm.shouldFocus()"

@ -62,6 +62,7 @@ export class WorkPackageEditFieldController {
protected $q,
protected FocusHelper,
protected NotificationsService,
protected ConfigurationService,
protected wpCacheService: WorkPackageCacheService,
protected I18n) {
@ -251,6 +252,12 @@ export class WorkPackageEditFieldController {
this.deactivate();
}
public onlyInAccessibilityMode(callback) {
if (this.ConfigurationService.accessibilityModeEnabled()) {
callback.apply(this);
}
}
protected buildEditField(): ng.IPromise<any> {
return this.formCtrl.loadSchema().then(schema => {
this.field = <EditField>this.wpEditField.getField(this.workPackage, this.fieldName, schema[this.fieldName]);

Loading…
Cancel
Save