mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
117544: port to 8.0 standard after merge
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
|||||||
} from 'rxjs/operators';
|
} from 'rxjs/operators';
|
||||||
|
|
||||||
import { BulkAccessControlService } from '../../shared/access-control-form-container/bulk-access-control.service';
|
import { BulkAccessControlService } from '../../shared/access-control-form-container/bulk-access-control.service';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { SelectableListState } from '../../shared/object-list/selectable-list/selectable-list.reducer';
|
import { SelectableListState } from '../../shared/object-list/selectable-list/selectable-list.reducer';
|
||||||
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service';
|
||||||
import { BulkAccessBrowseComponent } from './browse/bulk-access-browse.component';
|
import { BulkAccessBrowseComponent } from './browse/bulk-access-browse.component';
|
||||||
@@ -27,6 +28,7 @@ import { BulkAccessSettingsComponent } from './settings/bulk-access-settings.com
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BulkAccessSettingsComponent,
|
BulkAccessSettingsComponent,
|
||||||
BulkAccessBrowseComponent,
|
BulkAccessBrowseComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -42,6 +42,7 @@ import { EPersonDataService } from '../../core/eperson/eperson-data.service';
|
|||||||
import { EPerson } from '../../core/eperson/models/eperson.model';
|
import { EPerson } from '../../core/eperson/models/eperson.model';
|
||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
import { PageInfo } from '../../core/shared/page-info.model';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { FormBuilderService } from '../../shared/form/builder/form-builder.service';
|
import { FormBuilderService } from '../../shared/form/builder/form-builder.service';
|
||||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||||
import { getMockFormBuilderService } from '../../shared/mocks/form-builder-service.mock';
|
import { getMockFormBuilderService } from '../../shared/mocks/form-builder-service.mock';
|
||||||
@@ -57,7 +58,6 @@ import { NotificationsServiceStub } from '../../shared/testing/notifications-ser
|
|||||||
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
||||||
import { EPeopleRegistryComponent } from './epeople-registry.component';
|
import { EPeopleRegistryComponent } from './epeople-registry.component';
|
||||||
import { EPersonFormComponent } from './eperson-form/eperson-form.component';
|
import { EPersonFormComponent } from './eperson-form/eperson-form.component';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('EPeopleRegistryComponent', () => {
|
describe('EPeopleRegistryComponent', () => {
|
||||||
let component: EPeopleRegistryComponent;
|
let component: EPeopleRegistryComponent;
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="displayResetPassword" between class="btn-group">
|
<div *ngIf="displayResetPassword" between class="btn-group">
|
||||||
<button class="btn btn-primary" [disabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
|
<button class="btn btn-primary" [dsDisabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
|
||||||
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -45,6 +45,7 @@ import { GroupDataService } from '../../../core/eperson/group-data.service';
|
|||||||
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
||||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||||
import { PageInfo } from '../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../core/shared/page-info.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
||||||
import { FormComponent } from '../../../shared/form/form.component';
|
import { FormComponent } from '../../../shared/form/form.component';
|
||||||
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||||
@@ -68,7 +69,6 @@ import { HasNoValuePipe } from '../../../shared/utils/has-no-value.pipe';
|
|||||||
import { EPeopleRegistryComponent } from '../epeople-registry.component';
|
import { EPeopleRegistryComponent } from '../epeople-registry.component';
|
||||||
import { EPersonFormComponent } from './eperson-form.component';
|
import { EPersonFormComponent } from './eperson-form.component';
|
||||||
import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('EPersonFormComponent', () => {
|
describe('EPersonFormComponent', () => {
|
||||||
let component: EPersonFormComponent;
|
let component: EPersonFormComponent;
|
||||||
@@ -547,7 +547,7 @@ describe('EPersonFormComponent', () => {
|
|||||||
// ePersonDataServiceStub.activeEPerson = eperson;
|
// ePersonDataServiceStub.activeEPerson = eperson;
|
||||||
spyOn(component.epersonService, 'deleteEPerson').and.returnValue(createSuccessfulRemoteDataObject$('No Content', 204));
|
spyOn(component.epersonService, 'deleteEPerson').and.returnValue(createSuccessfulRemoteDataObject$('No Content', 204));
|
||||||
const deleteButton = fixture.debugElement.query(By.css('.delete-button'));
|
const deleteButton = fixture.debugElement.query(By.css('.delete-button'));
|
||||||
expect(deleteButton.nativeElement.getAttribute('aria-disabled')).toBe('false');
|
expect(deleteButton.nativeElement.getAttribute('aria-disabled')).toBeNull();
|
||||||
expect(deleteButton.nativeElement.classList.contains('disabled')).toBeFalse();
|
expect(deleteButton.nativeElement.classList.contains('disabled')).toBeFalse();
|
||||||
deleteButton.triggerEventHandler('click', null);
|
deleteButton.triggerEventHandler('click', null);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@@ -66,6 +66,7 @@ import { PageInfo } from '../../../core/shared/page-info.model';
|
|||||||
import { Registration } from '../../../core/shared/registration.model';
|
import { Registration } from '../../../core/shared/registration.model';
|
||||||
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
|
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
|
||||||
import { ConfirmationModalComponent } from '../../../shared/confirmation-modal/confirmation-modal.component';
|
import { ConfirmationModalComponent } from '../../../shared/confirmation-modal/confirmation-modal.component';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
||||||
import { FormComponent } from '../../../shared/form/form.component';
|
import { FormComponent } from '../../../shared/form/form.component';
|
||||||
@@ -92,6 +93,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
|||||||
PaginationComponent,
|
PaginationComponent,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
HasNoValuePipe,
|
HasNoValuePipe,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -35,14 +35,14 @@
|
|||||||
<div class="btn-group edit-field">
|
<div class="btn-group edit-field">
|
||||||
<button (click)="deleteMemberFromGroup(epersonDTO.eperson)"
|
<button (click)="deleteMemberFromGroup(epersonDTO.eperson)"
|
||||||
*ngIf="epersonDTO.ableToDelete"
|
*ngIf="epersonDTO.ableToDelete"
|
||||||
[disabled]="actionConfig.remove.disabled"
|
[dsDisabled]="actionConfig.remove.disabled"
|
||||||
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
|
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
|
||||||
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
|
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
|
||||||
<i [ngClass]="actionConfig.remove.icon"></i>
|
<i [ngClass]="actionConfig.remove.icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="!epersonDTO.ableToDelete"
|
<button *ngIf="!epersonDTO.ableToDelete"
|
||||||
(click)="addMemberToGroup(epersonDTO.eperson)"
|
(click)="addMemberToGroup(epersonDTO.eperson)"
|
||||||
[disabled]="actionConfig.add.disabled"
|
[dsDisabled]="actionConfig.add.disabled"
|
||||||
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
||||||
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
|
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
|
||||||
<i [ngClass]="actionConfig.add.icon"></i>
|
<i [ngClass]="actionConfig.add.icon"></i>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<div class="btn-group edit-field">
|
<div class="btn-group edit-field">
|
||||||
<button (click)="addMemberToGroup(eperson)"
|
<button (click)="addMemberToGroup(eperson)"
|
||||||
[disabled]="actionConfig.add.disabled"
|
[dsDisabled]="actionConfig.add.disabled"
|
||||||
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
||||||
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
|
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
|
||||||
<i [ngClass]="actionConfig.add.icon"></i>
|
<i [ngClass]="actionConfig.add.icon"></i>
|
||||||
|
@@ -55,6 +55,7 @@ import {
|
|||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
|
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||||
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
|
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
|
||||||
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
|
||||||
@@ -113,6 +114,7 @@ export interface EPersonListActionConfig {
|
|||||||
RouterLink,
|
RouterLink,
|
||||||
NgClass,
|
NgClass,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -50,6 +50,7 @@ import { RouteService } from '../../core/services/route.service';
|
|||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { NoContent } from '../../core/shared/NoContent.model';
|
import { NoContent } from '../../core/shared/NoContent.model';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
import { PageInfo } from '../../core/shared/page-info.model';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
DSONameServiceMock,
|
DSONameServiceMock,
|
||||||
UNDEFINED_NAME,
|
UNDEFINED_NAME,
|
||||||
@@ -71,7 +72,6 @@ import { NotificationsServiceStub } from '../../shared/testing/notifications-ser
|
|||||||
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
||||||
import { routeServiceStub } from '../../shared/testing/route-service.stub';
|
import { routeServiceStub } from '../../shared/testing/route-service.stub';
|
||||||
import { GroupsRegistryComponent } from './groups-registry.component';
|
import { GroupsRegistryComponent } from './groups-registry.component';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('GroupsRegistryComponent', () => {
|
describe('GroupsRegistryComponent', () => {
|
||||||
let component: GroupsRegistryComponent;
|
let component: GroupsRegistryComponent;
|
||||||
@@ -209,7 +209,7 @@ describe('GroupsRegistryComponent', () => {
|
|||||||
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
|
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
GroupsRegistryComponent,
|
GroupsRegistryComponent,
|
||||||
DisabledDirective
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [GroupsRegistryComponent,
|
providers: [GroupsRegistryComponent,
|
||||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||||
|
@@ -62,6 +62,7 @@ import {
|
|||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../core/shared/operators';
|
} from '../../core/shared/operators';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
import { PageInfo } from '../../core/shared/page-info.model';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
@@ -84,6 +85,7 @@ import { followLink } from '../../shared/utils/follow-link-config.model';
|
|||||||
NgSwitchCase,
|
NgSwitchCase,
|
||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template ngbPanelContent>
|
<ng-template ngbPanelContent>
|
||||||
<select id="collSel" name="collSel" class="form-control" multiple="multiple" size="10" formControlName="collections">
|
<select id="collSel" name="collSel" class="form-control" multiple="multiple" size="10" formControlName="collections">
|
||||||
<option *ngFor="let item of collections" [value]="item.id" [disabled]="item.disabled">{{item.name$ | async}}</option>
|
<option *ngFor="let item of collections" [value]="item.id" [dsDisabled]="item.disabled">{{item.name$ | async}}</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span class="col-3"></span>
|
<span class="col-3"></span>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button class="btn btn-light" (click)="addQueryPredicate()">+</button>
|
<button class="btn btn-light" (click)="addQueryPredicate()">+</button>
|
||||||
|
|
||||||
<button class="btn btn-light" [disabled]="deleteQueryPredicateDisabled()" (click)="deleteQueryPredicate(i)">–</button>
|
<button class="btn btn-light" [dsDisabled]="deleteQueryPredicateDisabled()" (click)="deleteQueryPredicate(i)">–</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -158,8 +158,8 @@
|
|||||||
{{'admin.reports.commons.page' | translate}} {{ currentPage + 1 }} {{'admin.reports.commons.of' | translate}} {{ pageCount() }}
|
{{'admin.reports.commons.page' | translate}} {{ currentPage + 1 }} {{'admin.reports.commons.of' | translate}} {{ pageCount() }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button id="prev" class="btn btn-light" (click)="prevPage()" [disabled]="!canNavigatePrevious()">{{'admin.reports.commons.previous-page' | translate}}</button>
|
<button id="prev" class="btn btn-light" (click)="prevPage()" [dsDisabled]="!canNavigatePrevious()">{{'admin.reports.commons.previous-page' | translate}}</button>
|
||||||
<button id="next" class="btn btn-light" (click)="nextPage()" [disabled]="!canNavigateNext()">{{'admin.reports.commons.next-page' | translate}}</button>
|
<button id="next" class="btn btn-light" (click)="nextPage()" [dsDisabled]="!canNavigateNext()">{{'admin.reports.commons.next-page' | translate}}</button>
|
||||||
<!--
|
<!--
|
||||||
<button id="export">{{'admin.reports.commons.export' | translate}}</button>
|
<button id="export">{{'admin.reports.commons.export' | translate}}</button>
|
||||||
-->
|
-->
|
||||||
|
@@ -42,6 +42,7 @@ import { getFirstSucceededRemoteListPayload } from 'src/app/core/shared/operator
|
|||||||
import { isEmpty } from 'src/app/shared/empty.util';
|
import { isEmpty } from 'src/app/shared/empty.util';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { FiltersComponent } from '../filters-section/filters-section.component';
|
import { FiltersComponent } from '../filters-section/filters-section.component';
|
||||||
import { FilteredItems } from './filtered-items-model';
|
import { FilteredItems } from './filtered-items-model';
|
||||||
import { OptionVO } from './option-vo.model';
|
import { OptionVO } from './option-vo.model';
|
||||||
@@ -63,6 +64,7 @@ import { QueryPredicate } from './query-predicate.model';
|
|||||||
NgIf,
|
NgIf,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
FiltersComponent,
|
FiltersComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -16,6 +16,7 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
|||||||
import { CollectionDataService } from '../../core/data/collection-data.service';
|
import { CollectionDataService } from '../../core/data/collection-data.service';
|
||||||
import { Collection } from '../../core/shared/collection.model';
|
import { Collection } from '../../core/shared/collection.model';
|
||||||
import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component';
|
import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { VarDirective } from '../../shared/utils/var.directive';
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -19,32 +19,32 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button *ngIf="(testConfigRunning$ |async) !== true" class="btn btn-secondary"
|
<button *ngIf="(testConfigRunning$ |async) !== true" class="btn btn-secondary"
|
||||||
[disabled]="!(isEnabled)"
|
[dsDisabled]="!(isEnabled)"
|
||||||
(click)="testConfiguration(contentSource)">
|
(click)="testConfiguration(contentSource)">
|
||||||
<span>{{'collection.source.controls.test.submit' | translate}}</span>
|
<span>{{'collection.source.controls.test.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
|
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
|
||||||
[disabled]="true">
|
[dsDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span>{{'collection.source.controls.test.running' | translate}}</span>
|
<span>{{'collection.source.controls.test.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(importRunning$ |async) !== true" class="btn btn-primary"
|
<button *ngIf="(importRunning$ |async) !== true" class="btn btn-primary"
|
||||||
[disabled]="!(isEnabled)"
|
[dsDisabled]="!(isEnabled)"
|
||||||
(click)="importNow()">
|
(click)="importNow()">
|
||||||
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
|
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
|
||||||
[disabled]="true">
|
[dsDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
|
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(reImportRunning$ |async) !== true" class="btn btn-primary"
|
<button *ngIf="(reImportRunning$ |async) !== true" class="btn btn-primary"
|
||||||
[disabled]="!(isEnabled)"
|
[dsDisabled]="!(isEnabled)"
|
||||||
(click)="resetAndReimport()">
|
(click)="resetAndReimport()">
|
||||||
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.submit' | translate}}</span>
|
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
|
||||||
[disabled]="true">
|
[dsDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.running' | translate}}</span>
|
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -22,12 +22,12 @@ import { Collection } from '../../../../core/shared/collection.model';
|
|||||||
import { ContentSource } from '../../../../core/shared/content-source.model';
|
import { ContentSource } from '../../../../core/shared/content-source.model';
|
||||||
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
|
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
|
||||||
import { Process } from '../../../../process-page/processes/process.model';
|
import { Process } from '../../../../process-page/processes/process.model';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
||||||
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service.stub';
|
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service.stub';
|
||||||
import { VarDirective } from '../../../../shared/utils/var.directive';
|
import { VarDirective } from '../../../../shared/utils/var.directive';
|
||||||
import { CollectionSourceControlsComponent } from './collection-source-controls.component';
|
import { CollectionSourceControlsComponent } from './collection-source-controls.component';
|
||||||
import {DisabledDirective} from '../../../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('CollectionSourceControlsComponent', () => {
|
describe('CollectionSourceControlsComponent', () => {
|
||||||
let comp: CollectionSourceControlsComponent;
|
let comp: CollectionSourceControlsComponent;
|
||||||
|
@@ -40,6 +40,7 @@ import {
|
|||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
import { Process } from '../../../../process-page/processes/process.model';
|
import { Process } from '../../../../process-page/processes/process.model';
|
||||||
import { ProcessStatus } from '../../../../process-page/processes/process-status.model';
|
import { ProcessStatus } from '../../../../process-page/processes/process-status.model';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../../../shared/empty.util';
|
import { hasValue } from '../../../../shared/empty.util';
|
||||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||||
import { VarDirective } from '../../../../shared/utils/var.directive';
|
import { VarDirective } from '../../../../shared/utils/var.directive';
|
||||||
@@ -56,6 +57,7 @@ import { VarDirective } from '../../../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="d-inline-block float-right space-children-mr">
|
<div class="d-inline-block float-right space-children-mr">
|
||||||
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[disabled]="(hasChanges$ | async) !== true"
|
[dsDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[disabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
||||||
(click)="onSubmit()"><i
|
(click)="onSubmit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="d-inline-block float-right ml-1 space-children-mr">
|
<div class="d-inline-block float-right ml-1 space-children-mr">
|
||||||
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[disabled]="(hasChanges$ | async) !== true"
|
[dsDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[disabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
||||||
(click)="onSubmit()"><i
|
(click)="onSubmit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||||
|
@@ -56,6 +56,7 @@ import {
|
|||||||
getFirstCompletedRemoteData,
|
getFirstCompletedRemoteData,
|
||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -81,6 +82,7 @@ import { CollectionSourceControlsComponent } from './collection-source-controls/
|
|||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
FormComponent,
|
FormComponent,
|
||||||
CollectionSourceControlsComponent,
|
CollectionSourceControlsComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
<p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
<p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col text-right space-children-mr">
|
<div class="col text-right space-children-mr">
|
||||||
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [disabled]="(processing$ | async)">
|
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
|
||||||
<i class="fas fa-times" aria-hidden="true"></i> {{'community.delete.cancel' | translate}}
|
<i class="fas fa-times" aria-hidden="true"></i> {{'community.delete.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
|
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span>
|
||||||
<span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span>
|
<span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -16,6 +16,7 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
|||||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||||
import { Community } from '../../core/shared/community.model';
|
import { Community } from '../../core/shared/community.model';
|
||||||
import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component';
|
import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { VarDirective } from '../../shared/utils/var.directive';
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
[authorityValue]="mdValue.newValue.confidence"
|
[authorityValue]="mdValue.newValue.confidence"
|
||||||
[iconMode]="true"
|
[iconMode]="true"
|
||||||
></i>
|
></i>
|
||||||
<input class="form-control form-outline" data-test="authority-input" [(ngModel)]="mdValue.newValue.authority" [disabled]="!editingAuthority"
|
<input class="form-control form-outline" data-test="authority-input" [(ngModel)]="mdValue.newValue.authority" [dsDisabled]="!editingAuthority"
|
||||||
[attr.aria-label]="(dsoType + '.edit.metadata.edit.authority.key') | translate"
|
[attr.aria-label]="(dsoType + '.edit.metadata.edit.authority.key') | translate"
|
||||||
(change)="onChangeAuthorityKey()" />
|
(change)="onChangeAuthorityKey()" />
|
||||||
<button class="btn btn-outline-secondary btn-sm ng-star-inserted" id="metadata-confirm-btn" *ngIf="!editingAuthority"
|
<button class="btn btn-outline-secondary btn-sm ng-star-inserted" id="metadata-confirm-btn" *ngIf="!editingAuthority"
|
||||||
@@ -71,29 +71,29 @@
|
|||||||
<button class="btn btn-outline-primary btn-sm ng-star-inserted" data-test="metadata-edit-btn" *ngIf="!mdValue.editing"
|
<button class="btn btn-outline-primary btn-sm ng-star-inserted" data-test="metadata-edit-btn" *ngIf="!mdValue.editing"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.edit' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.edit' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.edit' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.edit' | translate }}"
|
||||||
[disabled]="isVirtual || mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE || (saving$ | async)" (click)="edit.emit()">
|
[dsDisabled]="isVirtual || mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE || (saving$ | async)" (click)="edit.emit()">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-success btn-sm ng-star-inserted" data-test="metadata-confirm-btn" *ngIf="mdValue.editing"
|
<button class="btn btn-outline-success btn-sm ng-star-inserted" data-test="metadata-confirm-btn" *ngIf="mdValue.editing"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.confirm' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.confirm' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.confirm' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.confirm' | translate }}"
|
||||||
[disabled]="isVirtual || (saving$ | async)" (click)="confirm.emit(true)">
|
[dsDisabled]="isVirtual || (saving$ | async)" (click)="confirm.emit(true)">
|
||||||
<i class="fas fa-check fa-fw"></i>
|
<i class="fas fa-check fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-danger btn-sm" data-test="metadata-remove-btn"
|
<button class="btn btn-outline-danger btn-sm" data-test="metadata-remove-btn"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.remove' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.remove' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.remove' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.remove' | translate }}"
|
||||||
[disabled]="isVirtual || (mdValue.change && mdValue.change !== DsoEditMetadataChangeTypeEnum.ADD) || mdValue.editing || (saving$ | async)" (click)="remove.emit()">
|
[dsDisabled]="isVirtual || (mdValue.change && mdValue.change !== DsoEditMetadataChangeTypeEnum.ADD) || mdValue.editing || (saving$ | async)" (click)="remove.emit()">
|
||||||
<i class="fas fa-trash-alt fa-fw"></i>
|
<i class="fas fa-trash-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-warning btn-sm" data-test="metadata-undo-btn"
|
<button class="btn btn-outline-warning btn-sm" data-test="metadata-undo-btn"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.undo' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.undo' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.undo' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.undo' | translate }}"
|
||||||
[disabled]="isVirtual || (!mdValue.change && mdValue.reordered) || (!mdValue.change && !mdValue.editing) || (saving$ | async)" (click)="undo.emit()">
|
[dsDisabled]="isVirtual || (!mdValue.change && mdValue.reordered) || (!mdValue.change && !mdValue.editing) || (saving$ | async)" (click)="undo.emit()">
|
||||||
<i class="fas fa-undo-alt fa-fw"></i>
|
<i class="fas fa-undo-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-secondary ds-drag-handle btn-sm" data-test="metadata-drag-btn" *ngVar="(isOnlyValue || (saving$ | async)) as disabled"
|
<button class="btn btn-outline-secondary ds-drag-handle btn-sm" data-test="metadata-drag-btn" *ngVar="(isOnlyValue || (saving$ | async)) as disabled"
|
||||||
cdkDragHandle [cdkDragHandleDisabled]="disabled" [ngClass]="{'disabled': disabled}" [disabled]="disabled"
|
cdkDragHandle [cdkDragHandleDisabled]="disabled" [ngClass]="{'disabled': disabled}" [dsDisabled]="disabled"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.drag' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.drag' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.drag' | translate }}">
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.drag' | translate }}">
|
||||||
<i class="fas fa-grip-vertical fa-fw"></i>
|
<i class="fas fa-grip-vertical fa-fw"></i>
|
||||||
|
@@ -34,6 +34,7 @@ import {
|
|||||||
VIRTUAL_METADATA_PREFIX,
|
VIRTUAL_METADATA_PREFIX,
|
||||||
} from '../../../core/shared/metadata.models';
|
} from '../../../core/shared/metadata.models';
|
||||||
import { ItemMetadataRepresentation } from '../../../core/shared/metadata-representation/item/item-metadata-representation.model';
|
import { ItemMetadataRepresentation } from '../../../core/shared/metadata-representation/item/item-metadata-representation.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { DsDynamicOneboxComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component';
|
import { DsDynamicOneboxComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component';
|
||||||
import { DsDynamicScrollableDropdownComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component';
|
import { DsDynamicScrollableDropdownComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component';
|
||||||
import { ThemedTypeBadgeComponent } from '../../../shared/object-collection/shared/badges/type-badge/themed-type-badge.component';
|
import { ThemedTypeBadgeComponent } from '../../../shared/object-collection/shared/badges/type-badge/themed-type-badge.component';
|
||||||
@@ -44,7 +45,6 @@ import {
|
|||||||
DsoEditMetadataValue,
|
DsoEditMetadataValue,
|
||||||
} from '../dso-edit-metadata-form';
|
} from '../dso-edit-metadata-form';
|
||||||
import { DsoEditMetadataValueComponent } from './dso-edit-metadata-value.component';
|
import { DsoEditMetadataValueComponent } from './dso-edit-metadata-value.component';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
|
||||||
|
|
||||||
const EDIT_BTN = 'edit';
|
const EDIT_BTN = 'edit';
|
||||||
const CONFIRM_BTN = 'confirm';
|
const CONFIRM_BTN = 'confirm';
|
||||||
@@ -189,7 +189,7 @@ describe('DsoEditMetadataValueComponent', () => {
|
|||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
DsoEditMetadataValueComponent,
|
DsoEditMetadataValueComponent,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RelationshipDataService, useValue: relationshipService },
|
{ provide: RelationshipDataService, useValue: relationshipService },
|
||||||
@@ -462,7 +462,8 @@ describe('DsoEditMetadataValueComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
const inputElement = fixture.nativeElement.querySelector('input[data-test="authority-input"]');
|
const inputElement = fixture.nativeElement.querySelector('input[data-test="authority-input"]');
|
||||||
expect(inputElement.disabled).toBeTruthy();
|
expect(inputElement.getAttribute('aria-disabled')).toBe('true');
|
||||||
|
expect(inputElement.classList.contains('disabled')).toBeTrue();
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -67,6 +67,7 @@ import {
|
|||||||
import { Vocabulary } from '../../../core/submission/vocabularies/models/vocabulary.model';
|
import { Vocabulary } from '../../../core/submission/vocabularies/models/vocabulary.model';
|
||||||
import { VocabularyOptions } from '../../../core/submission/vocabularies/models/vocabulary-options.model';
|
import { VocabularyOptions } from '../../../core/submission/vocabularies/models/vocabulary-options.model';
|
||||||
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
|
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { isNotEmpty } from '../../../shared/empty.util';
|
import { isNotEmpty } from '../../../shared/empty.util';
|
||||||
import { DsDynamicOneboxComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component';
|
import { DsDynamicOneboxComponent } from '../../../shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component';
|
||||||
import {
|
import {
|
||||||
@@ -94,7 +95,7 @@ import {
|
|||||||
styleUrls: ['./dso-edit-metadata-value.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'],
|
styleUrls: ['./dso-edit-metadata-value.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'],
|
||||||
templateUrl: './dso-edit-metadata-value.component.html',
|
templateUrl: './dso-edit-metadata-value.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [VarDirective, CdkDrag, NgClass, NgIf, FormsModule, DebounceDirective, RouterLink, ThemedTypeBadgeComponent, NgbTooltipModule, CdkDragHandle, AsyncPipe, TranslateModule, DsDynamicScrollableDropdownComponent, DsDynamicOneboxComponent, AuthorityConfidenceStateDirective],
|
imports: [VarDirective, CdkDrag, NgClass, NgIf, FormsModule, DebounceDirective, RouterLink, ThemedTypeBadgeComponent, NgbTooltipModule, CdkDragHandle, AsyncPipe, TranslateModule, DsDynamicScrollableDropdownComponent, DsDynamicOneboxComponent, AuthorityConfidenceStateDirective, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying a single editable row for a metadata value
|
* Component displaying a single editable row for a metadata value
|
||||||
|
@@ -1,23 +1,23 @@
|
|||||||
<div class="item-metadata" *ngIf="form">
|
<div class="item-metadata" *ngIf="form">
|
||||||
<div class="button-row top d-flex my-2 space-children-mr ml-gap">
|
<div class="button-row top d-flex my-2 space-children-mr ml-gap">
|
||||||
<button class="mr-auto btn btn-success" id="dso-add-btn" [disabled]="form.newValue || (saving$ | async)"
|
<button class="mr-auto btn btn-success" id="dso-add-btn" [dsDisabled]="form.newValue || (saving$ | async)"
|
||||||
[title]="dsoType + '.edit.metadata.add-button' | translate"
|
[title]="dsoType + '.edit.metadata.add-button' | translate"
|
||||||
(click)="add()"><i class="fas fa-plus" aria-hidden="true"></i>
|
(click)="add()"><i class="fas fa-plus" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.add-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.add-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-warning ml-1" id="dso-reinstate-btn" *ngIf="isReinstatable" [disabled]="(saving$ | async)"
|
<button class="btn btn-warning ml-1" id="dso-reinstate-btn" *ngIf="isReinstatable" [dsDisabled]="(saving$ | async)"
|
||||||
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
(click)="reinstate()"><i class="fas fa-undo-alt" aria-hidden="true"></i>
|
(click)="reinstate()"><i class="fas fa-undo-alt" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary ml-1" id="dso-save-btn" [disabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary ml-1" id="dso-save-btn" [dsDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
(click)="submit()"><i class="fas fa-save" aria-hidden="true"></i>
|
(click)="submit()"><i class="fas fa-save" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.save-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.save-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger ml-1" id="dso-discard-btn" *ngIf="!isReinstatable"
|
<button class="btn btn-danger ml-1" id="dso-discard-btn" *ngIf="!isReinstatable"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[disabled]="!hasChanges || (saving$ | async)"
|
[dsDisabled]="!hasChanges || (saving$ | async)"
|
||||||
(click)="discard()"><i class="fas fa-times" aria-hidden="true"></i>
|
(click)="discard()"><i class="fas fa-times" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.discard-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.discard-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -73,19 +73,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="button-row bottom d-inline-block w-100">
|
<div class="button-row bottom d-inline-block w-100">
|
||||||
<div class="mt-2 float-right space-children-mr ml-gap">
|
<div class="mt-2 float-right space-children-mr ml-gap">
|
||||||
<button class="btn btn-warning" *ngIf="isReinstatable" [disabled]="(saving$ | async)"
|
<button class="btn btn-warning" *ngIf="isReinstatable" [dsDisabled]="(saving$ | async)"
|
||||||
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
(click)="reinstate()">
|
(click)="reinstate()">
|
||||||
<i class="fas fa-undo-alt" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}
|
<i class="fas fa-undo-alt" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [disabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary" [dsDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
(click)="submit()">
|
(click)="submit()">
|
||||||
<i class="fas fa-save" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.save-button' | translate }}
|
<i class="fas fa-save" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.save-button' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[disabled]="!hasChanges || (saving$ | async)"
|
[dsDisabled]="!hasChanges || (saving$ | async)"
|
||||||
(click)="discard()">
|
(click)="discard()">
|
||||||
<i class="fas fa-times" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.discard-button' | translate }}
|
<i class="fas fa-times" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.discard-button' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -22,6 +22,7 @@ import { Item } from '../../core/shared/item.model';
|
|||||||
import { ITEM } from '../../core/shared/item.resource-type';
|
import { ITEM } from '../../core/shared/item.resource-type';
|
||||||
import { MetadataValue } from '../../core/shared/metadata.models';
|
import { MetadataValue } from '../../core/shared/metadata.models';
|
||||||
import { AlertComponent } from '../../shared/alert/alert.component';
|
import { AlertComponent } from '../../shared/alert/alert.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { TestDataService } from '../../shared/testing/test-data-service.mock';
|
import { TestDataService } from '../../shared/testing/test-data-service.mock';
|
||||||
@@ -32,7 +33,6 @@ import { DsoEditMetadataHeadersComponent } from './dso-edit-metadata-headers/dso
|
|||||||
import { DsoEditMetadataValueComponent } from './dso-edit-metadata-value/dso-edit-metadata-value.component';
|
import { DsoEditMetadataValueComponent } from './dso-edit-metadata-value/dso-edit-metadata-value.component';
|
||||||
import { DsoEditMetadataValueHeadersComponent } from './dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
|
import { DsoEditMetadataValueHeadersComponent } from './dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
|
||||||
import { MetadataFieldSelectorComponent } from './metadata-field-selector/metadata-field-selector.component';
|
import { MetadataFieldSelectorComponent } from './metadata-field-selector/metadata-field-selector.component';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
|
||||||
|
|
||||||
const ADD_BTN = 'add';
|
const ADD_BTN = 'add';
|
||||||
const REINSTATE_BTN = 'reinstate';
|
const REINSTATE_BTN = 'reinstate';
|
||||||
@@ -88,7 +88,6 @@ describe('DsoEditMetadataComponent', () => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DisabledDirective]
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
@@ -96,6 +95,7 @@ describe('DsoEditMetadataComponent', () => {
|
|||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
DsoEditMetadataComponent,
|
DsoEditMetadataComponent,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: mockDataServiceMap },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: mockDataServiceMap },
|
||||||
|
@@ -47,6 +47,7 @@ import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
|||||||
import { ResourceType } from '../../core/shared/resource-type';
|
import { ResourceType } from '../../core/shared/resource-type';
|
||||||
import { AlertComponent } from '../../shared/alert/alert.component';
|
import { AlertComponent } from '../../shared/alert/alert.component';
|
||||||
import { AlertType } from '../../shared/alert/alert-type';
|
import { AlertType } from '../../shared/alert/alert-type';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -66,7 +67,7 @@ import { MetadataFieldSelectorComponent } from './metadata-field-selector/metada
|
|||||||
styleUrls: ['./dso-edit-metadata.component.scss'],
|
styleUrls: ['./dso-edit-metadata.component.scss'],
|
||||||
templateUrl: './dso-edit-metadata.component.html',
|
templateUrl: './dso-edit-metadata.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
|
imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component showing a table of all metadata on a DSpaceObject and options to modify them
|
* Component showing a table of all metadata on a DSpaceObject and options to modify them
|
||||||
|
@@ -26,6 +26,7 @@ import {
|
|||||||
} from '../../core/shared/operators';
|
} from '../../core/shared/operators';
|
||||||
import { Registration } from '../../core/shared/registration.model';
|
import { Registration } from '../../core/shared/registration.model';
|
||||||
import { ProfilePageSecurityFormComponent } from '../../profile-page/profile-page-security-form/profile-page-security-form.component';
|
import { ProfilePageSecurityFormComponent } from '../../profile-page/profile-page-security-form/profile-page-security-form.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe';
|
import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe';
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@ import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe';
|
|||||||
ProfilePageSecurityFormComponent,
|
ProfilePageSecurityFormComponent,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -16,11 +16,11 @@ import { of as observableOf } from 'rxjs';
|
|||||||
import { LogOutAction } from '../../core/auth/auth.actions';
|
import { LogOutAction } from '../../core/auth/auth.actions';
|
||||||
import { AuthService } from '../../core/auth/auth.service';
|
import { AuthService } from '../../core/auth/auth.service';
|
||||||
import { EndUserAgreementService } from '../../core/end-user-agreement/end-user-agreement.service';
|
import { EndUserAgreementService } from '../../core/end-user-agreement/end-user-agreement.service';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
||||||
import { EndUserAgreementComponent } from './end-user-agreement.component';
|
import { EndUserAgreementComponent } from './end-user-agreement.component';
|
||||||
import { EndUserAgreementContentComponent } from './end-user-agreement-content/end-user-agreement-content.component';
|
import { EndUserAgreementContentComponent } from './end-user-agreement-content/end-user-agreement-content.component';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('EndUserAgreementComponent', () => {
|
describe('EndUserAgreementComponent', () => {
|
||||||
let component: EndUserAgreementComponent;
|
let component: EndUserAgreementComponent;
|
||||||
|
@@ -23,6 +23,7 @@ import { AppState } from '../../app.reducer';
|
|||||||
import { LogOutAction } from '../../core/auth/auth.actions';
|
import { LogOutAction } from '../../core/auth/auth.actions';
|
||||||
import { AuthService } from '../../core/auth/auth.service';
|
import { AuthService } from '../../core/auth/auth.service';
|
||||||
import { EndUserAgreementService } from '../../core/end-user-agreement/end-user-agreement.service';
|
import { EndUserAgreementService } from '../../core/end-user-agreement/end-user-agreement.service';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { isNotEmpty } from '../../shared/empty.util';
|
import { isNotEmpty } from '../../shared/empty.util';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { EndUserAgreementContentComponent } from './end-user-agreement-content/end-user-agreement-content.component';
|
import { EndUserAgreementContentComponent } from './end-user-agreement-content/end-user-agreement-content.component';
|
||||||
@@ -32,7 +33,7 @@ import { EndUserAgreementContentComponent } from './end-user-agreement-content/e
|
|||||||
templateUrl: './end-user-agreement.component.html',
|
templateUrl: './end-user-agreement.component.html',
|
||||||
styleUrls: ['./end-user-agreement.component.scss'],
|
styleUrls: ['./end-user-agreement.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule],
|
imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying the End User Agreement and an option to accept it
|
* Component displaying the End User Agreement and an option to accept it
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="control-group col-sm-12 text-right">
|
<div class="control-group col-sm-12 text-right">
|
||||||
<button [disabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
<button [dsDisabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -18,6 +18,7 @@ import { FeedbackDataService } from '../../../core/feedback/feedback-data.servic
|
|||||||
import { Feedback } from '../../../core/feedback/models/feedback.model';
|
import { Feedback } from '../../../core/feedback/models/feedback.model';
|
||||||
import { RouteService } from '../../../core/services/route.service';
|
import { RouteService } from '../../../core/services/route.service';
|
||||||
import { NativeWindowService } from '../../../core/services/window.service';
|
import { NativeWindowService } from '../../../core/services/window.service';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { NativeWindowMockFactory } from '../../../shared/mocks/mock-native-window-ref';
|
import { NativeWindowMockFactory } from '../../../shared/mocks/mock-native-window-ref';
|
||||||
import { RouterMock } from '../../../shared/mocks/router.mock';
|
import { RouterMock } from '../../../shared/mocks/router.mock';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
@@ -26,7 +27,6 @@ import { EPersonMock } from '../../../shared/testing/eperson.mock';
|
|||||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
||||||
import { routeServiceStub } from '../../../shared/testing/route-service.stub';
|
import { routeServiceStub } from '../../../shared/testing/route-service.stub';
|
||||||
import { FeedbackFormComponent } from './feedback-form.component';
|
import { FeedbackFormComponent } from './feedback-form.component';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
|
||||||
|
|
||||||
|
|
||||||
describe('FeedbackFormComponent', () => {
|
describe('FeedbackFormComponent', () => {
|
||||||
|
@@ -30,6 +30,7 @@ import {
|
|||||||
import { NoContent } from '../../../core/shared/NoContent.model';
|
import { NoContent } from '../../../core/shared/NoContent.model';
|
||||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||||
import { URLCombiner } from '../../../core/url-combiner/url-combiner';
|
import { URLCombiner } from '../../../core/url-combiner/url-combiner';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { ErrorComponent } from '../../../shared/error/error.component';
|
import { ErrorComponent } from '../../../shared/error/error.component';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ import { NotificationsService } from '../../../shared/notifications/notification
|
|||||||
templateUrl: './feedback-form.component.html',
|
templateUrl: './feedback-form.component.html',
|
||||||
styleUrls: ['./feedback-form.component.scss'],
|
styleUrls: ['./feedback-form.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule],
|
imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying the contents of the Feedback Statement
|
* Component displaying the contents of the Feedback Statement
|
||||||
|
@@ -55,6 +55,7 @@ import {
|
|||||||
getFirstCompletedRemoteData,
|
getFirstCompletedRemoteData,
|
||||||
getFirstSucceededRemoteDataPayload,
|
getFirstSucceededRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -71,6 +72,7 @@ import { getItemPageRoute } from '../../item-page-routing-paths';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
class="fas fa-undo-alt"></i>
|
class="fas fa-undo-alt"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [disabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
||||||
(click)="submit()"><i
|
(click)="submit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
||||||
[disabled]="(hasChanges$ | async) !== true || submitting"
|
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
class="fas fa-undo-alt"></i>
|
class="fas fa-undo-alt"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [disabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
||||||
(click)="submit()"><i
|
(click)="submit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
||||||
[disabled]="(hasChanges$ | async) !== true || submitting"
|
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||||
|
@@ -50,6 +50,7 @@ import {
|
|||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -79,6 +80,7 @@ import { ItemEditBitstreamDragHandleComponent } from './item-edit-bitstream-drag
|
|||||||
ItemEditBitstreamDragHandleComponent,
|
ItemEditBitstreamDragHandleComponent,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [ObjectValuesPipe],
|
providers: [ObjectValuesPipe],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
@@ -37,13 +37,13 @@
|
|||||||
title="{{'item.edit.bitstreams.edit.buttons.edit' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.edit' | translate}}">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button [disabled]="!canRemove()" (click)="remove()"
|
<button [dsDisabled]="!canRemove()" (click)="remove()"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.remove' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.remove' | translate"
|
||||||
class="btn btn-outline-danger btn-sm"
|
class="btn btn-outline-danger btn-sm"
|
||||||
title="{{'item.edit.bitstreams.edit.buttons.remove' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.remove' | translate}}">
|
||||||
<i class="fas fa-trash-alt fa-fw"></i>
|
<i class="fas fa-trash-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button [disabled]="!canUndo()" (click)="undo()"
|
<button [dsDisabled]="!canUndo()" (click)="undo()"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.undo' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.undo' | translate"
|
||||||
class="btn btn-outline-warning btn-sm"
|
class="btn btn-outline-warning btn-sm"
|
||||||
title="{{'item.edit.bitstreams.edit.buttons.undo' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.undo' | translate}}">
|
||||||
|
@@ -29,6 +29,7 @@ import {
|
|||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
|
import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
|
||||||
import { BrowserOnlyPipe } from '../../../../shared/utils/browser-only.pipe';
|
import { BrowserOnlyPipe } from '../../../../shared/utils/browser-only.pipe';
|
||||||
|
|
||||||
@@ -43,6 +44,7 @@ import { BrowserOnlyPipe } from '../../../../shared/utils/browser-only.pipe';
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="m-2" (click)="setSelected(typeDto.relationshipType, !selected)">
|
<div class="m-2" (click)="setSelected(typeDto.relationshipType, !selected)">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" [checked]="selected" [disabled]="isDeleting$ | async">
|
<input type="checkbox" [checked]="selected" [dsDisabled]="isDeleting$ | async">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -86,10 +86,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<div class="space-children-mr">
|
<div class="space-children-mr">
|
||||||
<button [disabled]="isDeleting$ | async" (click)="performAction()"
|
<button [dsDisabled]="isDeleting$ | async" (click)="performAction()"
|
||||||
class="btn btn-outline-secondary perform-action">{{confirmMessage | translate}}
|
class="btn btn-outline-secondary perform-action">{{confirmMessage | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button [disabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
<button [dsDisabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
||||||
class="btn btn-outline-secondary cancel">
|
class="btn btn-outline-secondary cancel">
|
||||||
{{cancelMessage| translate}}
|
{{cancelMessage| translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -56,6 +56,7 @@ import {
|
|||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { ViewMode } from '../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../core/shared/view-mode.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -109,6 +110,7 @@ class RelationshipDTO {
|
|||||||
VarDirective,
|
VarDirective,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -37,6 +37,7 @@ import {
|
|||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { SearchService } from '../../../core/shared/search/search.service';
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { AuthorizedCollectionSelectorComponent } from '../../../shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component';
|
import { AuthorizedCollectionSelectorComponent } from '../../../shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
||||||
@@ -56,6 +57,7 @@ import {
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
AuthorizedCollectionSelectorComponent,
|
AuthorizedCollectionSelectorComponent,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -6,9 +6,9 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { ItemOperationComponent } from './item-operation.component';
|
import { ItemOperationComponent } from './item-operation.component';
|
||||||
import { ItemOperation } from './itemOperation.model';
|
import { ItemOperation } from './itemOperation.model';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('ItemOperationComponent', () => {
|
describe('ItemOperationComponent', () => {
|
||||||
let itemOperation: ItemOperation;
|
let itemOperation: ItemOperation;
|
||||||
|
@@ -7,6 +7,7 @@ import { RouterLink } from '@angular/router';
|
|||||||
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { ItemOperation } from './itemOperation.model';
|
import { ItemOperation } from './itemOperation.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -17,6 +18,7 @@ import { ItemOperation } from './itemOperation.model';
|
|||||||
RouterLink,
|
RouterLink,
|
||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<h2 class="h4">
|
<h2 class="h4">
|
||||||
{{relationshipMessageKey$ | async | translate}}
|
{{relationshipMessageKey$ | async | translate}}
|
||||||
<button class="ml-2 btn btn-success" [disabled]="(hasChanges | async)" (click)="openLookup()">
|
<button class="ml-2 btn btn-success" [dsDisabled]="(hasChanges | async)" (click)="openLookup()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.relationships.edit.buttons.add" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.relationships.edit.buttons.add" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -65,6 +65,7 @@ import {
|
|||||||
getFirstSucceededRemoteDataPayload,
|
getFirstSucceededRemoteDataPayload,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -100,6 +101,7 @@ import { EditRelationshipComponent } from '../edit-relationship/edit-relationshi
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgClass,
|
NgClass,
|
||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -37,6 +37,7 @@ import {
|
|||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
|
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -54,6 +55,7 @@ import { VirtualMetadataComponent } from '../../virtual-metadata/virtual-metadat
|
|||||||
NgIf,
|
NgIf,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
VirtualMetadataComponent,
|
VirtualMetadataComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
<ng-template #buttons>
|
<ng-template #buttons>
|
||||||
<div class="d-flex space-children-mr justify-content-end">
|
<div class="d-flex space-children-mr justify-content-end">
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[disabled]="(hasChanges$ | async) !== true"
|
[dsDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()">
|
(click)="discard()">
|
||||||
<i aria-hidden="true" class="fas fa-times"></i>
|
<i aria-hidden="true" class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.discard-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.discard-button' | translate }}</span>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.reinstate-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.reinstate-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[disabled]="(hasChanges$ | async) !== true || (isSaving$ | async) === true"
|
[dsDisabled]="(hasChanges$ | async) !== true || (isSaving$ | async) === true"
|
||||||
(click)="submit()">
|
(click)="submit()">
|
||||||
<span *ngIf="isSaving$ | async" aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
|
<span *ngIf="isSaving$ | async" aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
|
||||||
<i *ngIf="(isSaving$ | async) !== true" aria-hidden="true" class="fas fa-save"></i>
|
<i *ngIf="(isSaving$ | async) !== true" aria-hidden="true" class="fas fa-save"></i>
|
||||||
|
@@ -42,6 +42,7 @@ import {
|
|||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
import { AlertType } from '../../../shared/alert/alert-type';
|
import { AlertType } from '../../../shared/alert/alert-type';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
import { followLink } from '../../../shared/utils/follow-link-config.model';
|
||||||
@@ -67,6 +68,7 @@ import { EditRelationshipListWrapperComponent } from './edit-relationship-list-w
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
EditRelationshipListWrapperComponent,
|
EditRelationshipListWrapperComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -12,6 +12,7 @@ import { Bitstream } from 'src/app/core/shared/bitstream.model';
|
|||||||
|
|
||||||
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
||||||
import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model';
|
import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { CaptionInfo } from './caption-info';
|
import { CaptionInfo } from './caption-info';
|
||||||
import { languageHelper } from './language-helper';
|
import { languageHelper } from './language-helper';
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ import { languageHelper } from './language-helper';
|
|||||||
NgbDropdownModule,
|
NgbDropdownModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
<div class="row" *ngIf="(ownerCanDisconnectProfileFromOrcid() | async)" data-test="unlinkOwner">
|
<div class="row" *ngIf="(ownerCanDisconnectProfileFromOrcid() | async)" data-test="unlinkOwner">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
|
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
|
||||||
[disabled]="(unlinkProcessing | async)">
|
[dsDisabled]="(unlinkProcessing | async)">
|
||||||
<span *ngIf="(unlinkProcessing | async) !== true"><i
|
<span *ngIf="(unlinkProcessing | async) !== true"><i
|
||||||
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
|
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
|
||||||
<span *ngIf="(unlinkProcessing | async)"><i
|
<span *ngIf="(unlinkProcessing | async)"><i
|
||||||
|
@@ -33,6 +33,7 @@ import {
|
|||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -45,6 +46,7 @@ import { NotificationsService } from '../../../shared/notifications/notification
|
|||||||
NgIf,
|
NgIf,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
AlertComponent,
|
AlertComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<!--CREATE-->
|
<!--CREATE-->
|
||||||
<ng-container *ngIf="canCreateVersion$ | async">
|
<ng-container *ngIf="canCreateVersion$ | async">
|
||||||
<button class="btn btn-outline-primary btn-sm version-row-element-create"
|
<button class="btn btn-outline-primary btn-sm version-row-element-create"
|
||||||
[disabled]="isAnyBeingEdited() || hasDraftVersion"
|
[dsDisabled]="isAnyBeingEdited() || hasDraftVersion"
|
||||||
(click)="createNewVersion(version)"
|
(click)="createNewVersion(version)"
|
||||||
title="{{createVersionTitle | translate }}">
|
title="{{createVersionTitle | translate }}">
|
||||||
<i class="fas fa-code-branch fa-fw"></i>
|
<i class="fas fa-code-branch fa-fw"></i>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<ng-container *ngIf="canDeleteVersion$ | async">
|
<ng-container *ngIf="canDeleteVersion$ | async">
|
||||||
<button class="btn btn-sm version-row-element-delete"
|
<button class="btn btn-sm version-row-element-delete"
|
||||||
[ngClass]="isAnyBeingEdited() ? 'btn-outline-primary' : 'btn-outline-danger'"
|
[ngClass]="isAnyBeingEdited() ? 'btn-outline-primary' : 'btn-outline-danger'"
|
||||||
[disabled]="isAnyBeingEdited()"
|
[dsDisabled]="isAnyBeingEdited()"
|
||||||
(click)="deleteVersion(version, version.id === itemVersion.id)"
|
(click)="deleteVersion(version, version.id === itemVersion.id)"
|
||||||
title="{{'item.version.history.table.action.deleteVersion' | translate}}">
|
title="{{'item.version.history.table.action.deleteVersion' | translate}}">
|
||||||
<i class="fas fa-trash fa-fw"></i>
|
<i class="fas fa-trash fa-fw"></i>
|
||||||
|
@@ -49,6 +49,7 @@ import { VersionHistory } from '../../../core/shared/version-history.model';
|
|||||||
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
||||||
import { WorkflowItemDataService } from '../../../core/submission/workflowitem-data.service';
|
import { WorkflowItemDataService } from '../../../core/submission/workflowitem-data.service';
|
||||||
import { WorkspaceitemDataService } from '../../../core/submission/workspaceitem-data.service';
|
import { WorkspaceitemDataService } from '../../../core/submission/workspaceitem-data.service';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import {
|
import {
|
||||||
getItemEditVersionhistoryRoute,
|
getItemEditVersionhistoryRoute,
|
||||||
@@ -67,6 +68,7 @@ import { ItemVersionsSummaryModalComponent } from '../item-versions-summary-moda
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgClass,
|
NgClass,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
templateUrl: './item-versions-row-element-version.component.html',
|
templateUrl: './item-versions-row-element-version.component.html',
|
||||||
styleUrl: './item-versions-row-element-version.component.scss',
|
styleUrl: './item-versions-row-element-version.component.scss',
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
<ng-container *ngIf="canEditVersion$(version) | async">
|
<ng-container *ngIf="canEditVersion$(version) | async">
|
||||||
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
||||||
*ngIf="!isThisBeingEdited(version)"
|
*ngIf="!isThisBeingEdited(version)"
|
||||||
[disabled]="isAnyBeingEdited()"
|
[dsDisabled]="isAnyBeingEdited()"
|
||||||
(click)="enableVersionEditing(version)"
|
(click)="enableVersionEditing(version)"
|
||||||
title="{{'item.version.history.table.action.editSummary' | translate}}">
|
title="{{'item.version.history.table.action.editSummary' | translate}}">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
|
@@ -42,6 +42,7 @@ import { VersionHistory } from '../../core/shared/version-history.model';
|
|||||||
import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service';
|
import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service';
|
||||||
import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-data.service';
|
import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-data.service';
|
||||||
import { AlertComponent } from '../../shared/alert/alert.component';
|
import { AlertComponent } from '../../shared/alert/alert.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||||
@@ -51,7 +52,6 @@ import { PaginationServiceStub } from '../../shared/testing/pagination-service.s
|
|||||||
import { createPaginatedList } from '../../shared/testing/utils.test';
|
import { createPaginatedList } from '../../shared/testing/utils.test';
|
||||||
import { VarDirective } from '../../shared/utils/var.directive';
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
import { ItemVersionsComponent } from './item-versions.component';
|
import { ItemVersionsComponent } from './item-versions.component';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
|
||||||
|
|
||||||
describe('ItemVersionsComponent', () => {
|
describe('ItemVersionsComponent', () => {
|
||||||
let component: ItemVersionsComponent;
|
let component: ItemVersionsComponent;
|
||||||
|
@@ -51,6 +51,7 @@ import { Version } from '../../core/shared/version.model';
|
|||||||
import { VersionHistory } from '../../core/shared/version-history.model';
|
import { VersionHistory } from '../../core/shared/version-history.model';
|
||||||
import { AlertComponent } from '../../shared/alert/alert.component';
|
import { AlertComponent } from '../../shared/alert/alert.component';
|
||||||
import { AlertType } from '../../shared/alert/alert-type';
|
import { AlertType } from '../../shared/alert/alert-type';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
hasValueOperator,
|
hasValueOperator,
|
||||||
@@ -69,7 +70,7 @@ import { ItemVersionsRowElementVersionComponent } from './item-versions-row-elem
|
|||||||
templateUrl: './item-versions.component.html',
|
templateUrl: './item-versions.component.html',
|
||||||
styleUrls: ['./item-versions.component.scss'],
|
styleUrls: ['./item-versions.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [VarDirective, NgIf, AlertComponent, PaginationComponent, NgFor, RouterLink, NgClass, FormsModule, AsyncPipe, DatePipe, TranslateModule, ItemVersionsRowElementVersionComponent],
|
imports: [VarDirective, NgIf, AlertComponent, PaginationComponent, NgFor, RouterLink, NgClass, FormsModule, AsyncPipe, DatePipe, TranslateModule, ItemVersionsRowElementVersionComponent, DisabledDirective],
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="add" *ngIf="(moreThanOne$ | async) !== true">
|
<div class="add" *ngIf="(moreThanOne$ | async) !== true">
|
||||||
<button class="btn btn-lg btn-outline-primary mt-1 ml-2"
|
<button class="btn btn-lg btn-outline-primary mt-1 ml-2"
|
||||||
[attr.aria-label]="'mydspace.new-submission-external' | translate" [disabled]="(initialized$ | async) !== true"
|
[attr.aria-label]="'mydspace.new-submission-external' | translate" [dsDisabled]="(initialized$ | async) !== true"
|
||||||
(click)="openPage(singleEntity)" role="button"
|
(click)="openPage(singleEntity)" role="button"
|
||||||
title="{{'mydspace.new-submission-external' | translate}}">
|
title="{{'mydspace.new-submission-external' | translate}}">
|
||||||
<i class="fa fa-file-import" aria-hidden="true"></i>
|
<i class="fa fa-file-import" aria-hidden="true"></i>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
ngbDropdown
|
ngbDropdown
|
||||||
*ngIf="(moreThanOne$ | async)">
|
*ngIf="(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
|
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
|
||||||
type="button" [disabled]="(initialized$ | async) !== true"
|
type="button" [dsDisabled]="(initialized$ | async) !== true"
|
||||||
[attr.aria-label]="'mydspace.new-submission-external' | translate"
|
[attr.aria-label]="'mydspace.new-submission-external' | translate"
|
||||||
[attr.data-test]="'import-dropdown' | dsBrowserOnly"
|
[attr.data-test]="'import-dropdown' | dsBrowserOnly"
|
||||||
title="{{'mydspace.new-submission-external' | translate}}">
|
title="{{'mydspace.new-submission-external' | translate}}">
|
||||||
|
@@ -27,6 +27,7 @@ import { FindListOptions } from '../../../core/data/find-list-options.model';
|
|||||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { ItemType } from '../../../core/shared/item-relationships/item-type.model';
|
import { ItemType } from '../../../core/shared/item-relationships/item-type.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component';
|
import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component';
|
||||||
import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
||||||
@@ -45,6 +46,7 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BrowserOnlyPipe,
|
BrowserOnlyPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="add" *ngIf="(moreThanOne$ | async) !== true">
|
<div class="add" *ngIf="(moreThanOne$ | async) !== true">
|
||||||
<button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate"
|
<button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate"
|
||||||
[disabled]="(initialized$ | async) !== true" (click)="openDialog(singleEntity)" role="button">
|
[dsDisabled]="(initialized$ | async) !== true" (click)="openDialog(singleEntity)" role="button">
|
||||||
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
ngbDropdown
|
ngbDropdown
|
||||||
*ngIf="(moreThanOne$ | async)">
|
*ngIf="(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
|
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
|
||||||
type="button" [disabled]="(initialized$ | async) !== true"
|
type="button" [dsDisabled]="(initialized$ | async) !== true"
|
||||||
[attr.aria-label]="'mydspace.new-submission' | translate"
|
[attr.aria-label]="'mydspace.new-submission' | translate"
|
||||||
[attr.data-test]="'submission-dropdown' | dsBrowserOnly"
|
[attr.data-test]="'submission-dropdown' | dsBrowserOnly"
|
||||||
title="{{'mydspace.new-submission' | translate}}">
|
title="{{'mydspace.new-submission' | translate}}">
|
||||||
|
@@ -28,6 +28,7 @@ import { FindListOptions } from '../../../core/data/find-list-options.model';
|
|||||||
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
import { PaginatedList } from '../../../core/data/paginated-list.model';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { ItemType } from '../../../core/shared/item-relationships/item-type.model';
|
import { ItemType } from '../../../core/shared/item-relationships/item-type.model';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { ThemedCreateItemParentSelectorComponent } from '../../../shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component';
|
import { ThemedCreateItemParentSelectorComponent } from '../../../shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component';
|
import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component';
|
||||||
@@ -47,6 +48,7 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BrowserOnlyPipe,
|
BrowserOnlyPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -138,7 +138,7 @@
|
|||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button *ngIf="!eventElement.hasProject"
|
<button *ngIf="!eventElement.hasProject"
|
||||||
class="btn btn-outline-primary btn-sm"
|
class="btn btn-outline-primary btn-sm"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="openModalLookup(eventElement); $event.stopPropagation();"
|
(click)="openModalLookup(eventElement); $event.stopPropagation();"
|
||||||
[attr.aria-label]="'quality-assurance.event.modal.project.select' | translate"
|
[attr.aria-label]="'quality-assurance.event.modal.project.select' | translate"
|
||||||
>
|
>
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button *ngIf="eventElement.hasProject"
|
<button *ngIf="eventElement.hasProject"
|
||||||
class="btn btn-outline-danger btn-sm"
|
class="btn btn-outline-danger btn-sm"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="removeProject(eventElement)"
|
(click)="removeProject(eventElement)"
|
||||||
[attr.aria-label]="'quality-assurance.event.modal.project.remove' | translate"
|
[attr.aria-label]="'quality-assurance.event.modal.project.remove' | translate"
|
||||||
>
|
>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
class="btn btn-outline-success btn-sm button-width"
|
class="btn btn-outline-success btn-sm button-width"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.import' | translate}}"
|
ngbTooltip="{{'quality-assurance.event.action.import' | translate}}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="modalChoice('ACCEPTED', eventElement, acceptModal)"
|
(click)="modalChoice('ACCEPTED', eventElement, acceptModal)"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.import' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.import' | translate"
|
||||||
>
|
>
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
class="btn btn-outline-success btn-sm button-width"
|
class="btn btn-outline-success btn-sm button-width"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}"
|
ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="executeAction('ACCEPTED', eventElement)"
|
(click)="executeAction('ACCEPTED', eventElement)"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.accept' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.accept' | translate"
|
||||||
>
|
>
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
<button class="btn btn-outline-dark btn-sm button-width"
|
<button class="btn btn-outline-dark btn-sm button-width"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.ignore' | translate}}"
|
ngbTooltip="{{'quality-assurance.event.action.ignore' | translate}}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="openModal('DISCARDED', eventElement, ignoreModal)"
|
(click)="openModal('DISCARDED', eventElement, ignoreModal)"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.ignore' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.ignore' | translate"
|
||||||
>
|
>
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
*ngIf="(isAdmin$ | async)"
|
*ngIf="(isAdmin$ | async)"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.reject' | translate}}"
|
ngbTooltip="{{'quality-assurance.event.action.reject' | translate}}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
(click)="openModal('REJECTED', eventElement, rejectModal)"
|
(click)="openModal('REJECTED', eventElement, rejectModal)"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.reject' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.reject' | translate"
|
||||||
>
|
>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
*ngIf="(isAdmin$ | async) === false"
|
*ngIf="(isAdmin$ | async) === false"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.undo' | translate }}"
|
ngbTooltip="{{'quality-assurance.event.action.undo' | translate }}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.undo' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.undo' | translate"
|
||||||
(click)="openModal('UNDO', eventElement, undoModal)">
|
(click)="openModal('UNDO', eventElement, undoModal)">
|
||||||
<i class="fas fa-trash-alt"></i>
|
<i class="fas fa-trash-alt"></i>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
<button class="btn btn-outline-danger btn-sm button-width"
|
<button class="btn btn-outline-danger btn-sm button-width"
|
||||||
ngbTooltip="{{'quality-assurance.event.action.undo' | translate}}"
|
ngbTooltip="{{'quality-assurance.event.action.undo' | translate}}"
|
||||||
container="body"
|
container="body"
|
||||||
[disabled]="eventElement.isRunning"
|
[dsDisabled]="eventElement.isRunning"
|
||||||
[attr.aria-label]="'quality-assurance.event.action.undo' | translate"
|
[attr.aria-label]="'quality-assurance.event.action.undo' | translate"
|
||||||
(click)="openModal('UNDO', eventElement, undoModal)">
|
(click)="openModal('UNDO', eventElement, undoModal)">
|
||||||
<i class="fas fa-trash-alt"></i>
|
<i class="fas fa-trash-alt"></i>
|
||||||
|
@@ -65,6 +65,7 @@ import {
|
|||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
|
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
|
||||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
@@ -86,7 +87,7 @@ import { EPersonDataComponent } from './ePerson-data/ePerson-data.component';
|
|||||||
templateUrl: './quality-assurance-events.component.html',
|
templateUrl: './quality-assurance-events.component.html',
|
||||||
styleUrls: ['./quality-assurance-events.component.scss'],
|
styleUrls: ['./quality-assurance-events.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [AlertComponent, NgIf, ThemedLoadingComponent, PaginationComponent, NgFor, RouterLink, NgbTooltipModule, AsyncPipe, TranslateModule, EPersonDataComponent],
|
imports: [AlertComponent, NgIf, ThemedLoadingComponent, PaginationComponent, NgFor, RouterLink, NgbTooltipModule, AsyncPipe, TranslateModule, EPersonDataComponent, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||||
/**
|
/**
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
<div id="project-search" class="input-group mb-3">
|
<div id="project-search" class="input-group mb-3">
|
||||||
<input type="text" class="form-control" (keyup.enter)="search(projectTitle)" [(ngModel)]="projectTitle" placeholder="{{labelPrefix + label + '.placeholder' |translate}}" aria-label="" aria-describedby="">
|
<input type="text" class="form-control" (keyup.enter)="search(projectTitle)" [(ngModel)]="projectTitle" placeholder="{{labelPrefix + label + '.placeholder' |translate}}" aria-label="" aria-describedby="">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button type="button" class="btn btn-outline-secondary" [disabled]="projectTitle === ''" (click)="projectTitle = ''">{{(labelPrefix + label + '.clear'|translate)}}</button>
|
<button type="button" class="btn btn-outline-secondary" [dsDisabled]="projectTitle === ''" (click)="projectTitle = ''">{{(labelPrefix + label + '.clear'|translate)}}</button>
|
||||||
<button type="button" class="btn btn-primary" [disabled]="projectTitle === ''" (click)="search(projectTitle)">{{(labelPrefix + label + '.search'|translate)}}</button>
|
<button type="button" class="btn btn-primary" [dsDisabled]="projectTitle === ''" (click)="search(projectTitle)">{{(labelPrefix + label + '.search'|translate)}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -66,6 +66,6 @@
|
|||||||
<button type="button" class="btn btn-outline-secondary" (click)="close()">{{ (labelPrefix + label + '.cancel' | translate) }}</button>
|
<button type="button" class="btn btn-outline-secondary" (click)="close()">{{ (labelPrefix + label + '.cancel' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="btn btn-primary" [disabled]="selectedImportType === importType.None" (click)="bound()">{{ (labelPrefix + label + '.bound' | translate) }}</button>
|
<button type="button" class="btn btn-primary" [dsDisabled]="selectedImportType === importType.None" (click)="bound()">{{ (labelPrefix + label + '.bound' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -29,6 +29,7 @@ import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
|||||||
import { Item } from '../../../core/shared/item.model';
|
import { Item } from '../../../core/shared/item.model';
|
||||||
import { SearchService } from '../../../core/shared/search/search.service';
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
|
import { DisabledDirective } from '../../../shared/disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -104,7 +105,7 @@ export interface QualityAssuranceEventData {
|
|||||||
styleUrls: ['./project-entry-import-modal.component.scss'],
|
styleUrls: ['./project-entry-import-modal.component.scss'],
|
||||||
templateUrl: './project-entry-import-modal.component.html',
|
templateUrl: './project-entry-import-modal.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [RouterLink, NgIf, FormsModule, ThemedLoadingComponent, ThemedSearchResultsComponent, AlertComponent, AsyncPipe, TranslateModule],
|
imports: [RouterLink, NgIf, FormsModule, ThemedLoadingComponent, ThemedSearchResultsComponent, AlertComponent, AsyncPipe, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component to display a modal window for linking a project to an Quality Assurance event
|
* Component to display a modal window for linking a project to an Quality Assurance event
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<button (click)="ignoreSuggestion()" class="btn btn-danger ml-2"><i class="fa fa-ban"></i>
|
<button (click)="ignoreSuggestion()" class="btn btn-danger ml-2"><i class="fa fa-ban"></i>
|
||||||
{{ ignoreSuggestionLabel() | translate}}</button>
|
{{ ignoreSuggestionLabel() | translate}}</button>
|
||||||
<button *ngIf="!isBulk" (click)="toggleSeeEvidences()" [disabled]="!hasEvidence" class="btn btn-info ml-2">
|
<button *ngIf="!isBulk" (click)="toggleSeeEvidences()" [dsDisabled]="!hasEvidence" class="btn btn-info ml-2">
|
||||||
<i class="fa fa-eye"></i>
|
<i class="fa fa-eye"></i>
|
||||||
<ng-container *ngIf="!seeEvidence"> {{ 'suggestion.seeEvidence' | translate}}</ng-container>
|
<ng-container *ngIf="!seeEvidence"> {{ 'suggestion.seeEvidence' | translate}}</ng-container>
|
||||||
<ng-container *ngIf="seeEvidence"> {{ 'suggestion.hideEvidence' | translate}}</ng-container>
|
<ng-container *ngIf="seeEvidence"> {{ 'suggestion.hideEvidence' | translate}}</ng-container>
|
||||||
|
@@ -15,6 +15,7 @@ import { take } from 'rxjs/operators';
|
|||||||
import { Suggestion } from '../../core/notifications/suggestions/models/suggestion.model';
|
import { Suggestion } from '../../core/notifications/suggestions/models/suggestion.model';
|
||||||
import { Collection } from '../../core/shared/collection.model';
|
import { Collection } from '../../core/shared/collection.model';
|
||||||
import { ItemType } from '../../core/shared/item-relationships/item-type.model';
|
import { ItemType } from '../../core/shared/item-relationships/item-type.model';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { ThemedCreateItemParentSelectorComponent } from '../../shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component';
|
import { ThemedCreateItemParentSelectorComponent } from '../../shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component';
|
||||||
import { EntityDropdownComponent } from '../../shared/entity-dropdown/entity-dropdown.component';
|
import { EntityDropdownComponent } from '../../shared/entity-dropdown/entity-dropdown.component';
|
||||||
import { SuggestionApproveAndImport } from '../suggestion-list-element/suggestion-approve-and-import';
|
import { SuggestionApproveAndImport } from '../suggestion-list-element/suggestion-approve-and-import';
|
||||||
@@ -31,6 +32,7 @@ import { SuggestionApproveAndImport } from '../suggestion-list-element/suggestio
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
NgbDropdownModule,
|
NgbDropdownModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -16,6 +16,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
import { PaginationComponent } from '../../shared/pagination/pagination.component';
|
||||||
import { VarDirective } from '../../shared/utils/var.directive';
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
@@ -31,7 +32,7 @@ import { ProcessOverviewTableComponent } from './table/process-overview-table.co
|
|||||||
selector: 'ds-process-overview',
|
selector: 'ds-process-overview',
|
||||||
templateUrl: './process-overview.component.html',
|
templateUrl: './process-overview.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgIf, RouterLink, PaginationComponent, NgFor, VarDirective, AsyncPipe, DatePipe, TranslateModule, NgTemplateOutlet, ProcessOverviewTableComponent],
|
imports: [NgIf, RouterLink, PaginationComponent, NgFor, VarDirective, AsyncPipe, DatePipe, TranslateModule, NgTemplateOutlet, ProcessOverviewTableComponent, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying a list of all processes in a paginated table
|
* Component displaying a list of all processes in a paginated table
|
||||||
|
@@ -25,6 +25,7 @@ import { Item } from '../../core/shared/item.model';
|
|||||||
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
import { getItemPageRoute } from '../../item-page/item-page-routing-paths';
|
import { getItemPageRoute } from '../../item-page/item-page-routing-paths';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { DSOSelectorModalWrapperComponent } from '../../shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component';
|
import { DSOSelectorModalWrapperComponent } from '../../shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component';
|
||||||
import { CollectionElementLinkType } from '../../shared/object-collection/collection-element-link.type';
|
import { CollectionElementLinkType } from '../../shared/object-collection/collection-element-link.type';
|
||||||
import { ListableObjectComponentLoaderComponent } from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
import { ListableObjectComponentLoaderComponent } from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||||
@@ -42,6 +43,7 @@ import { ProfileClaimService } from '../profile-claim/profile-claim.service';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -37,6 +37,7 @@ import {
|
|||||||
getFirstSucceededRemoteDataPayload,
|
getFirstSucceededRemoteDataPayload,
|
||||||
} from '../../core/shared/operators';
|
} from '../../core/shared/operators';
|
||||||
import { ConfirmationModalComponent } from '../../shared/confirmation-modal/confirmation-modal.component';
|
import { ConfirmationModalComponent } from '../../shared/confirmation-modal/confirmation-modal.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { isNotEmpty } from '../../shared/empty.util';
|
import { isNotEmpty } from '../../shared/empty.util';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { followLink } from '../../shared/utils/follow-link-config.model';
|
import { followLink } from '../../shared/utils/follow-link-config.model';
|
||||||
@@ -53,6 +54,7 @@ import { ProfileClaimItemModalComponent } from '../profile-claim-item-modal/prof
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
UiSwitchModule,
|
UiSwitchModule,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -48,13 +48,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="(!registrationVerification || ((googleRecaptchaService.captchaVersion() | async) !== 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible')); else v2Invisible">
|
<ng-container *ngIf="(!registrationVerification || ((googleRecaptchaService.captchaVersion() | async) !== 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible')); else v2Invisible">
|
||||||
<button class="btn btn-primary" [disabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
|
<button class="btn btn-primary" [dsDisabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
|
||||||
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-template #v2Invisible>
|
<ng-template #v2Invisible>
|
||||||
<button class="btn btn-primary" [disabled]="form.invalid" (click)="executeRecaptcha()">
|
<button class="btn btn-primary" [dsDisabled]="form.invalid" (click)="executeRecaptcha()">
|
||||||
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -55,6 +55,7 @@ import { Registration } from '../core/shared/registration.model';
|
|||||||
import { AlertComponent } from '../shared/alert/alert.component';
|
import { AlertComponent } from '../shared/alert/alert.component';
|
||||||
import { AlertType } from '../shared/alert/alert-type';
|
import { AlertType } from '../shared/alert/alert-type';
|
||||||
import { KlaroService } from '../shared/cookies/klaro.service';
|
import { KlaroService } from '../shared/cookies/klaro.service';
|
||||||
|
import { DisabledDirective } from '../shared/disabled-directive';
|
||||||
import { isNotEmpty } from '../shared/empty.util';
|
import { isNotEmpty } from '../shared/empty.util';
|
||||||
import { GoogleRecaptchaComponent } from '../shared/google-recaptcha/google-recaptcha.component';
|
import { GoogleRecaptchaComponent } from '../shared/google-recaptcha/google-recaptcha.component';
|
||||||
import { NotificationsService } from '../shared/notifications/notifications.service';
|
import { NotificationsService } from '../shared/notifications/notifications.service';
|
||||||
@@ -66,7 +67,7 @@ export const TYPE_REQUEST_REGISTER = 'register';
|
|||||||
selector: 'ds-base-register-email-form',
|
selector: 'ds-base-register-email-form',
|
||||||
templateUrl: './register-email-form.component.html',
|
templateUrl: './register-email-form.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule],
|
imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component responsible to render an email registration form.
|
* Component responsible to render an email registration form.
|
||||||
|
@@ -43,6 +43,7 @@ import {
|
|||||||
} from '../../core/shared/operators';
|
} from '../../core/shared/operators';
|
||||||
import { Registration } from '../../core/shared/registration.model';
|
import { Registration } from '../../core/shared/registration.model';
|
||||||
import { ProfilePageSecurityFormComponent } from '../../profile-page/profile-page-security-form/profile-page-security-form.component';
|
import { ProfilePageSecurityFormComponent } from '../../profile-page/profile-page-security-form/profile-page-security-form.component';
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { isEmpty } from '../../shared/empty.util';
|
import { isEmpty } from '../../shared/empty.util';
|
||||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
<div class="d-flex flex-row-reverse">
|
<div class="d-flex flex-row-reverse">
|
||||||
<button (click)="submit()"
|
<button (click)="submit()"
|
||||||
[disabled]="!subject || subject.length === 0"
|
[dsDisabled]="!subject || subject.length === 0"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
title="{{'grant-deny-request-copy.email.send' | translate }}">
|
title="{{'grant-deny-request-copy.email.send' | translate }}">
|
||||||
<i class="fas fa-envelope"></i> {{'grant-deny-request-copy.email.send' | translate }}
|
<i class="fas fa-envelope"></i> {{'grant-deny-request-copy.email.send' | translate }}
|
||||||
|
@@ -12,6 +12,7 @@ import {
|
|||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../shared/disabled-directive';
|
||||||
import { RequestCopyEmail } from './request-copy-email.model';
|
import { RequestCopyEmail } from './request-copy-email.model';
|
||||||
|
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ import { RequestCopyEmail } from './request-copy-email.model';
|
|||||||
styleUrls: ['./email-request-copy.component.scss'],
|
styleUrls: ['./email-request-copy.component.scss'],
|
||||||
templateUrl: './email-request-copy.component.html',
|
templateUrl: './email-request-copy.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, NgClass, NgIf, TranslateModule],
|
imports: [FormsModule, NgClass, NgIf, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* A form component for an email to send back to the user requesting an item
|
* A form component for an email to send back to the user requesting an item
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="accesscontroloption-{{control.id}}"
|
id="accesscontroloption-{{control.id}}"
|
||||||
[disabled]="ngForm.disabled"
|
[dsDisabled]="ngForm.disabled"
|
||||||
[(ngModel)]="control.itemName"
|
[(ngModel)]="control.itemName"
|
||||||
(ngModelChange)="accessControlChanged(control, $event)"
|
(ngModelChange)="accessControlChanged(control, $event)"
|
||||||
name="itemName-{{control.id}}"
|
name="itemName-{{control.id}}"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button
|
<button
|
||||||
class="btn btn-outline-secondary fas fa-calendar"
|
class="btn btn-outline-secondary fas fa-calendar"
|
||||||
[disabled]="ngForm.disabled"
|
[dsDisabled]="ngForm.disabled"
|
||||||
(click)="d.toggle()" type="button">
|
(click)="d.toggle()" type="button">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button
|
<button
|
||||||
type="button" class="btn btn-outline-secondary fas fa-calendar"
|
type="button" class="btn btn-outline-secondary fas fa-calendar"
|
||||||
[disabled]="ngForm.disabled"
|
[dsDisabled]="ngForm.disabled"
|
||||||
(click)="d1.toggle()">
|
(click)="d1.toggle()">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
<button type="button" class="btn btn-outline-danger"
|
<button type="button" class="btn btn-outline-danger"
|
||||||
[attr.aria-label]="'access-control-remove' | translate"
|
[attr.aria-label]="'access-control-remove' | translate"
|
||||||
[disabled]="ngForm.disabled || form.accessControls.length === 1"
|
[dsDisabled]="ngForm.disabled || form.accessControls.length === 1"
|
||||||
(click)="removeAccessControlItem(control.id)">
|
(click)="removeAccessControlItem(control.id)">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<button type="button" id="add-btn-{{type}}" class="btn btn-outline-primary mt-3"
|
<button type="button" id="add-btn-{{type}}" class="btn btn-outline-primary mt-3"
|
||||||
[disabled]="ngForm.disabled"
|
[dsDisabled]="ngForm.disabled"
|
||||||
(click)="addAccessControlItem()">
|
(click)="addAccessControlItem()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
{{'access-control-add-more' | translate}}
|
{{'access-control-add-more' | translate}}
|
||||||
|
@@ -17,6 +17,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { AccessesConditionOption } from '../../../core/config/models/config-accesses-conditions-options.model';
|
import { AccessesConditionOption } from '../../../core/config/models/config-accesses-conditions-options.model';
|
||||||
import { dateToISOFormat } from '../../date.util';
|
import { dateToISOFormat } from '../../date.util';
|
||||||
|
import { DisabledDirective } from '../../disabled-directive';
|
||||||
import { ToDatePipe } from './to-date.pipe';
|
import { ToDatePipe } from './to-date.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -25,7 +26,7 @@ import { ToDatePipe } from './to-date.pipe';
|
|||||||
styleUrls: ['./access-control-array-form.component.scss'],
|
styleUrls: ['./access-control-array-form.component.scss'],
|
||||||
exportAs: 'accessControlArrayForm',
|
exportAs: 'accessControlArrayForm',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, NgIf, NgFor, NgbDatepickerModule, TranslateModule, ToDatePipe],
|
imports: [FormsModule, NgIf, NgFor, NgbDatepickerModule, TranslateModule, ToDatePipe, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class AccessControlArrayFormComponent implements OnInit {
|
export class AccessControlArrayFormComponent implements OnInit {
|
||||||
@Input() dropdownOptions: AccessesConditionOption[] = [];
|
@Input() dropdownOptions: AccessesConditionOption[] = [];
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
name="itemMode" id="itemReplace" value="replace"
|
name="itemMode" id="itemReplace" value="replace"
|
||||||
[disabled]="!state.item.toggleStatus"
|
[dsDisabled]="!state.item.toggleStatus"
|
||||||
[(ngModel)]="state.item.accessMode">
|
[(ngModel)]="state.item.accessMode">
|
||||||
<label class="form-check-label" for="itemReplace">
|
<label class="form-check-label" for="itemReplace">
|
||||||
{{'access-control-replace-all' | translate}}
|
{{'access-control-replace-all' | translate}}
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
name="itemMode" id="itemAdd" value="add"
|
name="itemMode" id="itemAdd" value="add"
|
||||||
[disabled]="!state.item.toggleStatus"
|
[dsDisabled]="!state.item.toggleStatus"
|
||||||
[(ngModel)]="state.item.accessMode">
|
[(ngModel)]="state.item.accessMode">
|
||||||
<label class="form-check-label" for="itemAdd">
|
<label class="form-check-label" for="itemAdd">
|
||||||
{{'access-control-add-to-existing' | translate}}
|
{{'access-control-add-to-existing' | translate}}
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
name="changesLimit" id="processAll" value="all"
|
name="changesLimit" id="processAll" value="all"
|
||||||
[disabled]="!state.bitstream.toggleStatus"
|
[dsDisabled]="!state.bitstream.toggleStatus"
|
||||||
[(ngModel)]="state.bitstream.changesLimit">
|
[(ngModel)]="state.bitstream.changesLimit">
|
||||||
<label class="form-check-label" for="processAll">
|
<label class="form-check-label" for="processAll">
|
||||||
{{'access-control-process-all-bitstreams' | translate}}
|
{{'access-control-process-all-bitstreams' | translate}}
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input mt-2" type="radio"
|
<input class="form-check-input mt-2" type="radio"
|
||||||
name="changesLimit" id="processSelected" value="selected"
|
name="changesLimit" id="processSelected" value="selected"
|
||||||
[disabled]="!state.bitstream.toggleStatus"
|
[dsDisabled]="!state.bitstream.toggleStatus"
|
||||||
[(ngModel)]="state.bitstream.changesLimit">
|
[(ngModel)]="state.bitstream.changesLimit">
|
||||||
<label class="form-check-label" for="processSelected">
|
<label class="form-check-label" for="processSelected">
|
||||||
{{ state.bitstream.selectedBitstreams.length }}
|
{{ state.bitstream.selectedBitstreams.length }}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<button
|
<button
|
||||||
*ngIf="itemRD"
|
*ngIf="itemRD"
|
||||||
[attr.aria-label]="'access-control-bitstreams-select' | translate"
|
[attr.aria-label]="'access-control-bitstreams-select' | translate"
|
||||||
[disabled]="!state.bitstream.toggleStatus || state.bitstream.changesLimit !== 'selected'"
|
[dsDisabled]="!state.bitstream.toggleStatus || state.bitstream.changesLimit !== 'selected'"
|
||||||
(click)="openSelectBitstreamsModal(itemRD.payload)"
|
(click)="openSelectBitstreamsModal(itemRD.payload)"
|
||||||
class="btn btn-outline-dark border-0" type="button">
|
class="btn btn-outline-dark border-0" type="button">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
name="bitstreamMode" id="bitstreamReplace" value="replace"
|
name="bitstreamMode" id="bitstreamReplace" value="replace"
|
||||||
[disabled]="!state.bitstream.toggleStatus"
|
[dsDisabled]="!state.bitstream.toggleStatus"
|
||||||
[(ngModel)]="state.bitstream.accessMode">
|
[(ngModel)]="state.bitstream.accessMode">
|
||||||
<label class="form-check-label" for="bitstreamReplace">
|
<label class="form-check-label" for="bitstreamReplace">
|
||||||
{{'access-control-replace-all' | translate}}
|
{{'access-control-replace-all' | translate}}
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="radio"
|
<input class="form-check-input" type="radio"
|
||||||
name="bitstreamMode" id="bitstreamAdd" value="add"
|
name="bitstreamMode" id="bitstreamAdd" value="add"
|
||||||
[disabled]="!state.bitstream.toggleStatus"
|
[dsDisabled]="!state.bitstream.toggleStatus"
|
||||||
[(ngModel)]="state.bitstream.accessMode">
|
[(ngModel)]="state.bitstream.accessMode">
|
||||||
<label class="form-check-label" for="bitstreamAdd">
|
<label class="form-check-label" for="bitstreamAdd">
|
||||||
{{'access-control-add-to-existing' | translate}}
|
{{'access-control-add-to-existing' | translate}}
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
{{ 'access-control-cancel' | translate }}
|
{{ 'access-control-cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[disabled]="!state.item.toggleStatus && !state.bitstream.toggleStatus"
|
[dsDisabled]="!state.item.toggleStatus && !state.bitstream.toggleStatus"
|
||||||
(click)="submit()" type="submit">
|
(click)="submit()" type="submit">
|
||||||
{{ 'access-control-execute' | translate }}
|
{{ 'access-control-execute' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -31,6 +31,7 @@ import { Item } from '../../core/shared/item.model';
|
|||||||
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||||
import { AlertComponent } from '../alert/alert.component';
|
import { AlertComponent } from '../alert/alert.component';
|
||||||
import { AlertType } from '../alert/alert-type';
|
import { AlertType } from '../alert/alert-type';
|
||||||
|
import { DisabledDirective } from '../disabled-directive';
|
||||||
import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../object-list/selectable-list/selectable-list.service';
|
||||||
import { AccessControlArrayFormComponent } from './access-control-array-form/access-control-array-form.component';
|
import { AccessControlArrayFormComponent } from './access-control-array-form/access-control-array-form.component';
|
||||||
import { createAccessControlInitialFormState } from './access-control-form-container-intial-state';
|
import { createAccessControlInitialFormState } from './access-control-form-container-intial-state';
|
||||||
@@ -46,7 +47,7 @@ import {
|
|||||||
styleUrls: ['./access-control-form-container.component.scss'],
|
styleUrls: ['./access-control-form-container.component.scss'],
|
||||||
exportAs: 'dsAccessControlForm',
|
exportAs: 'dsAccessControlForm',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgIf, AlertComponent, UiSwitchModule, FormsModule, AccessControlArrayFormComponent, AsyncPipe, TranslateModule],
|
imports: [NgIf, AlertComponent, UiSwitchModule, FormsModule, AccessControlArrayFormComponent, AsyncPipe, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class AccessControlFormContainerComponent<T extends DSpaceObject> implements OnDestroy {
|
export class AccessControlFormContainerComponent<T extends DSpaceObject> implements OnDestroy {
|
||||||
|
|
||||||
|
@@ -1,89 +1,97 @@
|
|||||||
import { Component, DebugElement } from '@angular/core';
|
import {
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
Component,
|
||||||
|
DebugElement,
|
||||||
|
} from '@angular/core';
|
||||||
|
import {
|
||||||
|
ComponentFixture,
|
||||||
|
TestBed,
|
||||||
|
} from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { DisabledDirective } from './disabled-directive';
|
import { DisabledDirective } from './disabled-directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
<button [dsDisabled]="isDisabled">Test Button</button>
|
<button [dsDisabled]="isDisabled">Test Button</button>
|
||||||
`
|
`,
|
||||||
})
|
})
|
||||||
class TestComponent {
|
class TestComponent {
|
||||||
isDisabled = false;
|
isDisabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('DisabledDirective', () => {
|
describe('DisabledDirective', () => {
|
||||||
let component: TestComponent;
|
let component: TestComponent;
|
||||||
let fixture: ComponentFixture<TestComponent>;
|
let fixture: ComponentFixture<TestComponent>;
|
||||||
let button: DebugElement;
|
let button: DebugElement;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [TestComponent, DisabledDirective]
|
imports: [DisabledDirective],
|
||||||
});
|
declarations: [TestComponent],
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
button = fixture.debugElement.query(By.css('button'));
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
});
|
||||||
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
button = fixture.debugElement.query(By.css('button'));
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
it('should bind aria-disabled to false initially', () => {
|
it('should bind aria-disabled to false initially', () => {
|
||||||
expect(button.nativeElement.getAttribute('aria-disabled')).toBe('false');
|
expect(button.nativeElement.getAttribute('aria-disabled')).toBe('false');
|
||||||
expect(button.nativeElement.classList.contains('disabled')).toBeFalse();
|
expect(button.nativeElement.classList.contains('disabled')).toBeFalse();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should bind aria-disabled to true and add disabled class when isDisabled is true', () => {
|
it('should bind aria-disabled to true and add disabled class when isDisabled is true', () => {
|
||||||
component.isDisabled = true;
|
component.isDisabled = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(button.nativeElement.getAttribute('aria-disabled')).toBe('true');
|
expect(button.nativeElement.getAttribute('aria-disabled')).toBe('true');
|
||||||
expect(button.nativeElement.classList.contains('disabled')).toBeTrue();
|
expect(button.nativeElement.classList.contains('disabled')).toBeTrue();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should prevent click events when disabled', () => {
|
it('should prevent click events when disabled', () => {
|
||||||
component.isDisabled = true;
|
component.isDisabled = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
let clickHandled = false;
|
let clickHandled = false;
|
||||||
button.nativeElement.addEventListener('click', () => clickHandled = true);
|
button.nativeElement.addEventListener('click', () => clickHandled = true);
|
||||||
|
|
||||||
button.nativeElement.click();
|
button.nativeElement.click();
|
||||||
|
|
||||||
expect(clickHandled).toBeFalse();
|
expect(clickHandled).toBeFalse();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should prevent Enter or Space keydown events when disabled', () => {
|
it('should prevent Enter or Space keydown events when disabled', () => {
|
||||||
component.isDisabled = true;
|
component.isDisabled = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
let keydownHandled = false;
|
let keydownHandled = false;
|
||||||
button.nativeElement.addEventListener('keydown', () => keydownHandled = true);
|
button.nativeElement.addEventListener('keydown', () => keydownHandled = true);
|
||||||
|
|
||||||
const enterEvent = new KeyboardEvent('keydown', { key: 'Enter' });
|
const enterEvent = new KeyboardEvent('keydown', { key: 'Enter' });
|
||||||
const spaceEvent = new KeyboardEvent('keydown', { key: 'Space' });
|
const spaceEvent = new KeyboardEvent('keydown', { key: 'Space' });
|
||||||
|
|
||||||
button.nativeElement.dispatchEvent(enterEvent);
|
button.nativeElement.dispatchEvent(enterEvent);
|
||||||
button.nativeElement.dispatchEvent(spaceEvent);
|
button.nativeElement.dispatchEvent(spaceEvent);
|
||||||
|
|
||||||
expect(keydownHandled).toBeFalse();
|
expect(keydownHandled).toBeFalse();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow click and keydown events when not disabled', () => {
|
it('should allow click and keydown events when not disabled', () => {
|
||||||
let clickHandled = false;
|
let clickHandled = false;
|
||||||
let keydownHandled = false;
|
let keydownHandled = false;
|
||||||
|
|
||||||
button.nativeElement.addEventListener('click', () => clickHandled = true);
|
button.nativeElement.addEventListener('click', () => clickHandled = true);
|
||||||
button.nativeElement.addEventListener('keydown', () => keydownHandled = true);
|
button.nativeElement.addEventListener('keydown', () => keydownHandled = true);
|
||||||
|
|
||||||
button.nativeElement.click();
|
button.nativeElement.click();
|
||||||
|
|
||||||
const enterEvent = new KeyboardEvent('keydown', { key: 'Enter' });
|
const enterEvent = new KeyboardEvent('keydown', { key: 'Enter' });
|
||||||
const spaceEvent = new KeyboardEvent('keydown', { key: 'Space' });
|
const spaceEvent = new KeyboardEvent('keydown', { key: 'Space' });
|
||||||
|
|
||||||
button.nativeElement.dispatchEvent(enterEvent);
|
button.nativeElement.dispatchEvent(enterEvent);
|
||||||
button.nativeElement.dispatchEvent(spaceEvent);
|
button.nativeElement.dispatchEvent(spaceEvent);
|
||||||
|
|
||||||
expect(clickHandled).toBeTrue();
|
expect(clickHandled).toBeTrue();
|
||||||
expect(keydownHandled).toBeTrue();
|
expect(keydownHandled).toBeTrue();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -1,31 +1,37 @@
|
|||||||
import { Directive, Input, HostBinding, HostListener } from '@angular/core';
|
import {
|
||||||
|
Directive,
|
||||||
|
HostBinding,
|
||||||
|
HostListener,
|
||||||
|
Input,
|
||||||
|
} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[dsDisabled]'
|
selector: '[dsDisabled]',
|
||||||
|
standalone: true,
|
||||||
})
|
})
|
||||||
export class DisabledDirective {
|
export class DisabledDirective {
|
||||||
|
|
||||||
@Input() set dsDisabled(value: boolean) {
|
@Input() set dsDisabled(value: boolean) {
|
||||||
this.isDisabled = !!value;
|
this.isDisabled = !!value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostBinding('attr.aria-disabled') isDisabled = false;
|
@HostBinding('attr.aria-disabled') isDisabled = false;
|
||||||
@HostBinding('class.disabled') get disabledClass() { return this.isDisabled; }
|
@HostBinding('class.disabled') get disabledClass() { return this.isDisabled; }
|
||||||
|
|
||||||
@HostListener('click', ['$event'])
|
@HostListener('click', ['$event'])
|
||||||
handleClick(event: Event) {
|
handleClick(event: Event) {
|
||||||
if (this.isDisabled) {
|
if (this.isDisabled) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('keydown', ['$event'])
|
@HostListener('keydown', ['$event'])
|
||||||
handleKeydown(event: KeyboardEvent) {
|
handleKeydown(event: KeyboardEvent) {
|
||||||
if (this.isDisabled && (event.key === 'Enter' || event.key === 'Space')) {
|
if (this.isDisabled && (event.key === 'Enter' || event.key === 'Space')) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,6 +8,8 @@ import {
|
|||||||
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../disabled-directive';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component which represent a DSpace dropdown selector.
|
* Component which represent a DSpace dropdown selector.
|
||||||
*/
|
*/
|
||||||
@@ -16,7 +18,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
templateUrl: './ds-select.component.html',
|
templateUrl: './ds-select.component.html',
|
||||||
styleUrls: ['./ds-select.component.scss'],
|
styleUrls: ['./ds-select.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgbDropdownModule, NgIf, TranslateModule],
|
imports: [NgbDropdownModule, NgIf, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class DsSelectComponent {
|
export class DsSelectComponent {
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="dso-button-menu mb-1" ngbDropdown container="body" placement="bottom-right">
|
<div class="dso-button-menu mb-1" ngbDropdown container="body" placement="bottom-right">
|
||||||
<div class="d-flex flex-row flex-nowrap"
|
<div class="d-flex flex-row flex-nowrap"
|
||||||
[ngbTooltip]="itemModel.text | translate" container="body">
|
[ngbTooltip]="itemModel.text | translate" container="body">
|
||||||
<button [attr.aria-label]="itemModel.text | translate" [title]="itemModel.text | translate" class="btn btn-dark btn-sm" ngbDropdownToggle [disabled]="section.model?.disabled">
|
<button [attr.aria-label]="itemModel.text | translate" [title]="itemModel.text | translate" class="btn btn-dark btn-sm" ngbDropdownToggle [dsDisabled]="section.model?.disabled">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul ngbDropdownMenu class="dso-edit-menu-dropdown">
|
<ul ngbDropdownMenu class="dso-edit-menu-dropdown">
|
||||||
|
@@ -21,6 +21,7 @@ import { MenuID } from 'src/app/shared/menu/menu-id.model';
|
|||||||
import { MenuSection } from 'src/app/shared/menu/menu-section.model';
|
import { MenuSection } from 'src/app/shared/menu/menu-section.model';
|
||||||
import { MenuSectionComponent } from 'src/app/shared/menu/menu-section/menu-section.component';
|
import { MenuSectionComponent } from 'src/app/shared/menu/menu-section/menu-section.component';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../disabled-directive';
|
||||||
import { hasValue } from '../../../empty.util';
|
import { hasValue } from '../../../empty.util';
|
||||||
import { MenuService } from '../../../menu/menu.service';
|
import { MenuService } from '../../../menu/menu.service';
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@ import { MenuService } from '../../../menu/menu.service';
|
|||||||
templateUrl: './dso-edit-menu-expandable-section.component.html',
|
templateUrl: './dso-edit-menu-expandable-section.component.html',
|
||||||
styleUrls: ['./dso-edit-menu-expandable-section.component.scss'],
|
styleUrls: ['./dso-edit-menu-expandable-section.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe],
|
imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent {
|
export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent {
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
</a>
|
</a>
|
||||||
<button *ngIf="section.model.disabled" class="btn btn-dark btn-sm" [disabled]="true">
|
<button *ngIf="section.model.disabled" class="btn btn-dark btn-sm" [dsDisabled]="true">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<div *ngIf="canActivate" class="dso-button-menu mb-1"
|
<div *ngIf="canActivate" class="dso-button-menu mb-1"
|
||||||
[ngbTooltip]="itemModel.text | translate">
|
[ngbTooltip]="itemModel.text | translate">
|
||||||
<button class="btn btn-dark btn-sm" [disabled]="section.model.disabled"
|
<button class="btn btn-dark btn-sm" [dsDisabled]="section.model.disabled"
|
||||||
(click)="activate($event)">
|
(click)="activate($event)">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
|
@@ -10,6 +10,7 @@ import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { MenuSectionComponent } from 'src/app/shared/menu/menu-section/menu-section.component';
|
import { MenuSectionComponent } from 'src/app/shared/menu/menu-section/menu-section.component';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../disabled-directive';
|
||||||
import { isNotEmpty } from '../../../empty.util';
|
import { isNotEmpty } from '../../../empty.util';
|
||||||
import { MenuService } from '../../../menu/menu.service';
|
import { MenuService } from '../../../menu/menu.service';
|
||||||
import { MenuID } from '../../../menu/menu-id.model';
|
import { MenuID } from '../../../menu/menu-id.model';
|
||||||
@@ -23,7 +24,7 @@ import { MenuSection } from '../../../menu/menu-section.model';
|
|||||||
templateUrl: './dso-edit-menu-section.component.html',
|
templateUrl: './dso-edit-menu-section.component.html',
|
||||||
styleUrls: ['./dso-edit-menu-section.component.scss'],
|
styleUrls: ['./dso-edit-menu-section.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [NgIf, NgbTooltipModule, RouterLink, TranslateModule],
|
imports: [NgIf, NgbTooltipModule, RouterLink, TranslateModule, DisabledDirective],
|
||||||
})
|
})
|
||||||
export class DsoEditMenuSectionComponent extends MenuSectionComponent implements OnInit {
|
export class DsoEditMenuSectionComponent extends MenuSectionComponent implements OnInit {
|
||||||
|
|
||||||
|
@@ -99,6 +99,7 @@ import { SubmissionObject } from '../../../../core/submission/models/submission-
|
|||||||
import { SubmissionObjectDataService } from '../../../../core/submission/submission-object-data.service';
|
import { SubmissionObjectDataService } from '../../../../core/submission/submission-object-data.service';
|
||||||
import { paginatedRelationsToItems } from '../../../../item-page/simple/item-types/shared/item-relationships-utils';
|
import { paginatedRelationsToItems } from '../../../../item-page/simple/item-types/shared/item-relationships-utils';
|
||||||
import { SubmissionService } from '../../../../submission/submission.service';
|
import { SubmissionService } from '../../../../submission/submission.service';
|
||||||
|
import { DisabledDirective } from '../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -140,6 +141,7 @@ import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/d
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgTemplateOutlet,
|
NgTemplateOutlet,
|
||||||
ExistingRelationListElementComponent,
|
ExistingRelationListElementComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -26,6 +26,8 @@ import {
|
|||||||
DynamicFormValidationService,
|
DynamicFormValidationService,
|
||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-dynamic-date-picker-inline',
|
selector: 'ds-dynamic-date-picker-inline',
|
||||||
templateUrl: './dynamic-date-picker-inline.component.html',
|
templateUrl: './dynamic-date-picker-inline.component.html',
|
||||||
@@ -34,6 +36,7 @@ import {
|
|||||||
NgbDatepickerModule,
|
NgbDatepickerModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -24,6 +24,7 @@ import {
|
|||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import { hasValue } from '../../../../../empty.util';
|
import { hasValue } from '../../../../../empty.util';
|
||||||
import { NumberPickerComponent } from '../../../../number-picker/number-picker.component';
|
import { NumberPickerComponent } from '../../../../number-picker/number-picker.component';
|
||||||
import { DynamicDsDatePickerModel } from './date-picker.model';
|
import { DynamicDsDatePickerModel } from './date-picker.model';
|
||||||
@@ -41,6 +42,7 @@ export const DS_DATE_PICKER_SEPARATOR = '-';
|
|||||||
NgIf,
|
NgIf,
|
||||||
NumberPickerComponent,
|
NumberPickerComponent,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -12,6 +12,7 @@ import {
|
|||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import { DynamicDisabledModel } from './dynamic-disabled.model';
|
import { DynamicDisabledModel } from './dynamic-disabled.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,6 +23,7 @@ import { DynamicDisabledModel } from './dynamic-disabled.model';
|
|||||||
templateUrl: './dynamic-disabled.component.html',
|
templateUrl: './dynamic-disabled.component.html',
|
||||||
imports: [
|
imports: [
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -33,6 +33,7 @@ import { of as observableOf } from 'rxjs';
|
|||||||
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
||||||
import { VocabularyOptions } from '../../../../../../core/submission/vocabularies/models/vocabulary-options.model';
|
import { VocabularyOptions } from '../../../../../../core/submission/vocabularies/models/vocabulary-options.model';
|
||||||
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
mockDynamicFormLayoutService,
|
mockDynamicFormLayoutService,
|
||||||
mockDynamicFormValidationService,
|
mockDynamicFormValidationService,
|
||||||
@@ -48,7 +49,6 @@ import {
|
|||||||
DynamicLookupModelConfig,
|
DynamicLookupModelConfig,
|
||||||
} from './dynamic-lookup.model';
|
} from './dynamic-lookup.model';
|
||||||
import { DynamicLookupNameModel } from './dynamic-lookup-name.model';
|
import { DynamicLookupNameModel } from './dynamic-lookup-name.model';
|
||||||
import {DisabledDirective} from '../../../../../disabled-directive';
|
|
||||||
|
|
||||||
let LOOKUP_TEST_MODEL_CONFIG: DynamicLookupModelConfig = {
|
let LOOKUP_TEST_MODEL_CONFIG: DynamicLookupModelConfig = {
|
||||||
vocabularyOptions: {
|
vocabularyOptions: {
|
||||||
|
@@ -46,6 +46,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share
|
|||||||
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
||||||
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
||||||
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isEmpty,
|
isEmpty,
|
||||||
@@ -76,6 +77,7 @@ import { DynamicLookupNameModel } from './dynamic-lookup-name.model';
|
|||||||
NgForOf,
|
NgForOf,
|
||||||
NgTemplateOutlet,
|
NgTemplateOutlet,
|
||||||
ObjNgFor,
|
ObjNgFor,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -58,6 +58,7 @@ import { Vocabulary } from '../../../../../../core/submission/vocabularies/model
|
|||||||
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
||||||
import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
||||||
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isEmpty,
|
isEmpty,
|
||||||
@@ -89,6 +90,7 @@ import { DynamicOneboxModel } from './dynamic-onebox.model';
|
|||||||
ObjNgFor,
|
ObjNgFor,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -46,6 +46,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share
|
|||||||
import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
||||||
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
||||||
import { shrinkInOut } from '../../../../../animations/shrink';
|
import { shrinkInOut } from '../../../../../animations/shrink';
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isEmpty,
|
isEmpty,
|
||||||
@@ -81,6 +82,7 @@ import { DynamicRelationGroupModel } from './dynamic-relation-group.model';
|
|||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
ChipsComponent,
|
ChipsComponent,
|
||||||
forwardRef(() => FormComponent),
|
forwardRef(() => FormComponent),
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -43,6 +43,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share
|
|||||||
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
||||||
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
||||||
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service';
|
||||||
|
import { DisabledDirective } from '../../../../../disabled-directive';
|
||||||
import { isEmpty } from '../../../../../empty.util';
|
import { isEmpty } from '../../../../../empty.util';
|
||||||
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
|
||||||
import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component';
|
import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component';
|
||||||
@@ -62,6 +63,7 @@ import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.mo
|
|||||||
InfiniteScrollModule,
|
InfiniteScrollModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" id="modal-title">{{ ('submission.sections.describe.relationship-lookup.title.' + relationshipOptions.relationshipType) | translate }}</h4>
|
<h4 class="modal-title" id="modal-title">{{ ('submission.sections.describe.relationship-lookup.title.' + relationshipOptions.relationshipType) | translate }}</h4>
|
||||||
<button type="button" [disabled]="isPending" class="close" aria-label="Close button" aria-describedby="modal-title"
|
<button type="button" [dsDisabled]="isPending" class="close" aria-label="Close button" aria-describedby="modal-title"
|
||||||
(click)="close()">
|
(click)="close()">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -73,18 +73,18 @@
|
|||||||
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
||||||
<div class="d-flex float-right space-children-mr">
|
<div class="d-flex float-right space-children-mr">
|
||||||
<div class="close-button">
|
<div class="close-button">
|
||||||
<button type="button" [disabled]="isPending" class="btn btn-outline-secondary" (click)="close()">
|
<button type="button" [dsDisabled]="isPending" class="btn btn-outline-secondary" (click)="close()">
|
||||||
{{ ('submission.sections.describe.relationship-lookup.close' | translate) }}</button>
|
{{ ('submission.sections.describe.relationship-lookup.close' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="isEditRelationship">
|
<ng-container *ngIf="isEditRelationship">
|
||||||
<button class="btn btn-danger discard"
|
<button class="btn btn-danger discard"
|
||||||
[disabled]="(toAdd.length === 0 && toRemove.length === 0) || isPending"
|
[dsDisabled]="(toAdd.length === 0 && toRemove.length === 0) || isPending"
|
||||||
(click)="discardEv()">
|
(click)="discardEv()">
|
||||||
<i class="fas fa-times"></i>
|
<i class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary submit"
|
<button class="btn btn-primary submit"
|
||||||
[disabled]="(toAdd.length === 0 && toRemove.length === 0) || isPending"
|
[dsDisabled]="(toAdd.length === 0 && toRemove.length === 0) || isPending"
|
||||||
(click)="submitEv()">
|
(click)="submitEv()">
|
||||||
<span *ngIf="isPending" class="spinner-border spinner-border-sm mr-1" role="status"
|
<span *ngIf="isPending" class="spinner-border spinner-border-sm mr-1" role="status"
|
||||||
aria-hidden="true"></span>
|
aria-hidden="true"></span>
|
||||||
|
@@ -33,6 +33,7 @@ import { Item } from '../../../../../core/shared/item.model';
|
|||||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||||
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model';
|
||||||
import { XSRFService } from '../../../../../core/xsrf/xsrf.service';
|
import { XSRFService } from '../../../../../core/xsrf/xsrf.service';
|
||||||
|
import { DisabledDirective } from '../../../../disabled-directive';
|
||||||
import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
|
||||||
import { SelectableListService } from '../../../../object-list/selectable-list/selectable-list.service';
|
import { SelectableListService } from '../../../../object-list/selectable-list/selectable-list.service';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
|
||||||
@@ -44,7 +45,6 @@ import {
|
|||||||
AddRelationshipAction,
|
AddRelationshipAction,
|
||||||
RemoveRelationshipAction,
|
RemoveRelationshipAction,
|
||||||
} from './relationship.actions';
|
} from './relationship.actions';
|
||||||
import {DisabledDirective} from '../../../../disabled-directive';
|
|
||||||
|
|
||||||
describe('DsDynamicLookupRelationModalComponent', () => {
|
describe('DsDynamicLookupRelationModalComponent', () => {
|
||||||
let component: DsDynamicLookupRelationModalComponent;
|
let component: DsDynamicLookupRelationModalComponent;
|
||||||
|
@@ -50,6 +50,7 @@ import {
|
|||||||
} from '../../../../../core/shared/operators';
|
} from '../../../../../core/shared/operators';
|
||||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../my-dspace-page/my-dspace-configuration.service';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../../my-dspace-page/my-dspace-configuration.service';
|
||||||
|
import { DisabledDirective } from '../../../../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -91,6 +92,7 @@ import { DsDynamicLookupRelationSelectionTabComponent } from './selection-tab/dy
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
DsDynamicLookupRelationSelectionTabComponent,
|
DsDynamicLookupRelationSelectionTabComponent,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -38,6 +38,7 @@ import {
|
|||||||
} from '../../../../../../../core/shared/operators';
|
} from '../../../../../../../core/shared/operators';
|
||||||
import { SubmissionImportExternalCollectionComponent } from '../../../../../../../submission/import-external/import-external-collection/submission-import-external-collection.component';
|
import { SubmissionImportExternalCollectionComponent } from '../../../../../../../submission/import-external/import-external-collection/submission-import-external-collection.component';
|
||||||
import { CollectionListEntry } from '../../../../../../collection-dropdown/collection-dropdown.component';
|
import { CollectionListEntry } from '../../../../../../collection-dropdown/collection-dropdown.component';
|
||||||
|
import { DisabledDirective } from '../../../../../../disabled-directive';
|
||||||
import { NotificationsService } from '../../../../../../notifications/notifications.service';
|
import { NotificationsService } from '../../../../../../notifications/notifications.service';
|
||||||
import { CollectionElementLinkType } from '../../../../../../object-collection/collection-element-link.type';
|
import { CollectionElementLinkType } from '../../../../../../object-collection/collection-element-link.type';
|
||||||
import { ItemSearchResult } from '../../../../../../object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../../../../object-collection/shared/item-search-result.model';
|
||||||
@@ -69,6 +70,7 @@ export enum ImportType {
|
|||||||
ThemedSearchResultsComponent,
|
ThemedSearchResultsComponent,
|
||||||
NgIf,
|
NgIf,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
title="{{'form.discard' | translate}}"
|
title="{{'form.discard' | translate}}"
|
||||||
attr.aria-label="{{'form.discard' | translate}}"
|
attr.aria-label="{{'form.discard' | translate}}"
|
||||||
(click)="removeItem($event, context, index)"
|
(click)="removeItem($event, context, index)"
|
||||||
[disabled]="group.context.groups.length === 1 || isItemReadOnly(context, index)">
|
[dsDisabled]="group.context.groups.length === 1 || isItemReadOnly(context, index)">
|
||||||
<span>{{'form.discard' | translate}}</span>
|
<span>{{'form.discard' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ng-content select="[between]"></ng-content>
|
<ng-content select="[between]"></ng-content>
|
||||||
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
|
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
|
||||||
[disabled]="(isValid() | async) !== true">
|
[dsDisabled]="(isValid() | async) !== true">
|
||||||
<i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}}
|
<i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}}
|
||||||
</button>
|
</button>
|
||||||
<ng-content select="[after]"></ng-content>
|
<ng-content select="[after]"></ng-content>
|
||||||
|
@@ -39,6 +39,7 @@ import {
|
|||||||
map,
|
map,
|
||||||
} from 'rxjs/operators';
|
} from 'rxjs/operators';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../disabled-directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -69,6 +70,7 @@ import { FormService } from './form.service';
|
|||||||
DynamicFormsCoreModule,
|
DynamicFormsCoreModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -19,6 +19,7 @@ import {
|
|||||||
TranslateService,
|
TranslateService,
|
||||||
} from '@ngx-translate/core';
|
} from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { DisabledDirective } from '../../disabled-directive';
|
||||||
import { isEmpty } from '../../empty.util';
|
import { isEmpty } from '../../empty.util';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -32,6 +33,7 @@ import { isEmpty } from '../../empty.util';
|
|||||||
NgClass,
|
NgClass,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
|
DisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<button *ngIf="showAdd && this.vocabularyOptions.closed" class="btn btn-outline-primary" type="button" (click)="add()">
|
<button *ngIf="showAdd && this.vocabularyOptions.closed" class="btn btn-outline-primary" type="button" (click)="add()">
|
||||||
{{'vocabulary-treeview.search.form.add' | translate}}
|
{{'vocabulary-treeview.search.form.add' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-primary" type="button" (click)="add()" [disabled]="this.vocabularyOptions.closed">
|
<button class="btn btn-outline-primary" type="button" (click)="add()" [dsDisabled]="this.vocabularyOptions.closed">
|
||||||
{{'vocabulary-treeview.search.form.add' | translate}}
|
{{'vocabulary-treeview.search.form.add' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user