mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
117544: rename directive to be clear it should currently only be used for buttons
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<button class="btn btn-outline-primary mr-3" (click)="reset()">
|
<button class="btn btn-outline-primary mr-3" (click)="reset()">
|
||||||
{{ 'access-control-cancel' | translate }}
|
{{ 'access-control-cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="!canExport()" (click)="submit()">
|
<button class="btn btn-primary" [dsBtnDisabled]="!canExport()" (click)="submit()">
|
||||||
{{ 'access-control-execute' | translate }}
|
{{ 'access-control-execute' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -14,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -28,7 +28,7 @@ import { BulkAccessSettingsComponent } from './settings/bulk-access-settings.com
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BulkAccessSettingsComponent,
|
BulkAccessSettingsComponent,
|
||||||
BulkAccessBrowseComponent,
|
BulkAccessBrowseComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -42,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -152,7 +152,7 @@ describe('EPeopleRegistryComponent', () => {
|
|||||||
paginationService = new PaginationServiceStub();
|
paginationService = new PaginationServiceStub();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, RouterTestingModule.withRoutes([]),
|
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, RouterTestingModule.withRoutes([]),
|
||||||
TranslateModule.forRoot(), EPeopleRegistryComponent, DisabledDirective],
|
TranslateModule.forRoot(), EPeopleRegistryComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||||
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
||||||
|
@@ -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" [dsDisabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
|
<button class="btn btn-primary" [dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -228,7 +228,7 @@ describe('EPersonFormComponent', () => {
|
|||||||
route = new ActivatedRouteStub();
|
route = new ActivatedRouteStub();
|
||||||
router = new RouterStub();
|
router = new RouterStub();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, DisabledDirective, BrowserModule,
|
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BtnDisabledDirective, BrowserModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
|
@@ -66,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -93,7 +93,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
|
|||||||
PaginationComponent,
|
PaginationComponent,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
HasNoValuePipe,
|
HasNoValuePipe,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="actionConfig.remove.disabled"
|
[dsBtnDisabled]="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)"
|
||||||
[dsDisabled]="actionConfig.add.disabled"
|
[dsBtnDisabled]="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)"
|
||||||
[dsDisabled]="actionConfig.add.disabled"
|
[dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../../../shared/btn-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';
|
||||||
@@ -114,7 +114,7 @@ export interface EPersonListActionConfig {
|
|||||||
RouterLink,
|
RouterLink,
|
||||||
NgClass,
|
NgClass,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -69,7 +69,7 @@
|
|||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button *ngSwitchCase="false"
|
<button *ngSwitchCase="false"
|
||||||
[dsDisabled]="true"
|
[dsBtnDisabled]="true"
|
||||||
class="btn btn-outline-primary btn-sm btn-edit"
|
class="btn btn-outline-primary btn-sm btn-edit"
|
||||||
placement="left"
|
placement="left"
|
||||||
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"
|
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"
|
||||||
|
@@ -50,7 +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 { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
DSONameServiceMock,
|
DSONameServiceMock,
|
||||||
UNDEFINED_NAME,
|
UNDEFINED_NAME,
|
||||||
@@ -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,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [GroupsRegistryComponent,
|
providers: [GroupsRegistryComponent,
|
||||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||||
|
@@ -62,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -85,7 +85,7 @@ import { followLink } from '../../shared/utils/follow-link-config.model';
|
|||||||
NgSwitchCase,
|
NgSwitchCase,
|
||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -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" [dsDisabled]="deleteQueryPredicateDisabled()" (click)="deleteQueryPredicate(i)">–</button>
|
<button class="btn btn-light" [dsBtnDisabled]="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()" [dsDisabled]="!canNavigatePrevious()">{{'admin.reports.commons.previous-page' | translate}}</button>
|
<button id="prev" class="btn btn-light" (click)="prevPage()" [dsBtnDisabled]="!canNavigatePrevious()">{{'admin.reports.commons.previous-page' | translate}}</button>
|
||||||
<button id="next" class="btn btn-light" (click)="nextPage()" [dsDisabled]="!canNavigateNext()">{{'admin.reports.commons.next-page' | translate}}</button>
|
<button id="next" class="btn btn-light" (click)="nextPage()" [dsBtnDisabled]="!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>
|
||||||
-->
|
-->
|
||||||
|
@@ -43,7 +43,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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -65,7 +65,7 @@ import { QueryPredicate } from './query-predicate.model';
|
|||||||
NgIf,
|
NgIf,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
FiltersComponent,
|
FiltersComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
<p class="pb-2">{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
<p class="pb-2">{{ 'collection.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)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
|
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
|
||||||
<span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
|
<span *ngIf="(processing$ | async) !== true"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -16,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(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"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(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"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(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"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="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,7 +22,7 @@ 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 { BtnDisabledDirective } from '../../../../shared/btn-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';
|
||||||
@@ -105,7 +105,7 @@ describe('CollectionSourceControlsComponent', () => {
|
|||||||
requestService = jasmine.createSpyObj('requestService', ['removeByHrefSubstring', 'setStaleByHrefSubstring']);
|
requestService = jasmine.createSpyObj('requestService', ['removeByHrefSubstring', 'setStaleByHrefSubstring']);
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceControlsComponent, VarDirective, DisabledDirective],
|
imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceControlsComponent, VarDirective, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ScriptDataService, useValue: scriptDataService },
|
{ provide: ScriptDataService, useValue: scriptDataService },
|
||||||
{ provide: ProcessDataService, useValue: processDataService },
|
{ provide: ProcessDataService, useValue: processDataService },
|
||||||
|
@@ -40,7 +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 { BtnDisabledDirective } from '../../../../shared/btn-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';
|
||||||
@@ -57,7 +57,7 @@ import { VarDirective } from '../../../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsBtnDisabled]="(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,7 +56,7 @@ import {
|
|||||||
getFirstCompletedRemoteData,
|
getFirstCompletedRemoteData,
|
||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { DisabledDirective } from '../../../shared/disabled-directive';
|
import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -82,7 +82,7 @@ import { CollectionSourceControlsComponent } from './collection-source-controls/
|
|||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
FormComponent,
|
FormComponent,
|
||||||
CollectionSourceControlsComponent,
|
CollectionSourceControlsComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsBtnDisabled]="(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)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -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 }}"
|
||||||
[dsDisabled]="isVirtual || mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE || (saving$ | async)" (click)="edit.emit()">
|
[dsBtnDisabled]="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 }}"
|
||||||
[dsDisabled]="isVirtual || (saving$ | async)" (click)="confirm.emit(true)">
|
[dsBtnDisabled]="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 }}"
|
||||||
[dsDisabled]="isVirtual || (mdValue.change && mdValue.change !== DsoEditMetadataChangeTypeEnum.ADD) || mdValue.editing || (saving$ | async)" (click)="remove.emit()">
|
[dsBtnDisabled]="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 }}"
|
||||||
[dsDisabled]="isVirtual || (!mdValue.change && mdValue.reordered) || (!mdValue.change && !mdValue.editing) || (saving$ | async)" (click)="undo.emit()">
|
[dsBtnDisabled]="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}" [dsDisabled]="disabled"
|
cdkDragHandle [cdkDragHandleDisabled]="disabled" [ngClass]="{'disabled': disabled}" [dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -189,7 +189,7 @@ describe('DsoEditMetadataValueComponent', () => {
|
|||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
DsoEditMetadataValueComponent,
|
DsoEditMetadataValueComponent,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RelationshipDataService, useValue: relationshipService },
|
{ provide: RelationshipDataService, useValue: relationshipService },
|
||||||
|
@@ -67,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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 {
|
||||||
@@ -95,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, DisabledDirective],
|
imports: [VarDirective, CdkDrag, NgClass, NgIf, FormsModule, DebounceDirective, RouterLink, ThemedTypeBadgeComponent, NgbTooltipModule, CdkDragHandle, AsyncPipe, TranslateModule, DsDynamicScrollableDropdownComponent, DsDynamicOneboxComponent, AuthorityConfidenceStateDirective, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying a single editable row for a metadata value
|
* Component displaying a single editable row for a metadata value
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
<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" [dsDisabled]="form.newValue || (saving$ | async)"
|
<button class="mr-auto btn btn-success" id="dso-add-btn" [dsBtnDisabled]="form.newValue || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.add-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.add-button' | translate"
|
||||||
[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" [dsDisabled]="(saving$ | async)"
|
<button class="btn btn-warning ml-1" id="dso-reinstate-btn" *ngIf="isReinstatable" [dsBtnDisabled]="(saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
[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" [dsDisabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary ml-1" id="dso-save-btn" [dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
[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>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<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"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[dsDisabled]="!hasChanges || (saving$ | async)"
|
[dsBtnDisabled]="!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>
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</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" [dsDisabled]="(saving$ | async)"
|
<button class="btn btn-warning" *ngIf="isReinstatable" [dsBtnDisabled]="(saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
[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" [dsDisabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary" [dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
(click)="submit()">
|
(click)="submit()">
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[dsDisabled]="!hasChanges || (saving$ | async)"
|
[dsBtnDisabled]="!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,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -95,7 +95,7 @@ describe('DsoEditMetadataComponent', () => {
|
|||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
DsoEditMetadataComponent,
|
DsoEditMetadataComponent,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: APP_DATA_SERVICES_MAP, useValue: mockDataServiceMap },
|
{ provide: APP_DATA_SERVICES_MAP, useValue: mockDataServiceMap },
|
||||||
|
@@ -47,7 +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 { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -67,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, DisabledDirective],
|
imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="isInValid"
|
[dsBtnDisabled]="isInValid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="submit()">{{'forgot-password.form.submit' | translate}}</button>
|
(click)="submit()">{{'forgot-password.form.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -29,7 +29,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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe';
|
|||||||
ProfilePageSecurityFormComponent,
|
ProfilePageSecurityFormComponent,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<div class="d-flex mt-4">
|
<div class="d-flex mt-4">
|
||||||
<button id="button-cancel" type="button" (click)="cancel()" class="btn btn-outline-secondary mr-auto">{{ 'info.end-user-agreement.buttons.cancel' | translate }}</button>
|
<button id="button-cancel" type="button" (click)="cancel()" class="btn btn-outline-secondary mr-auto">{{ 'info.end-user-agreement.buttons.cancel' | translate }}</button>
|
||||||
<button id="button-save" type="submit" class="btn btn-primary" [dsDisabled]="!accepted">{{ 'info.end-user-agreement.buttons.save' | translate }}</button>
|
<button id="button-save" type="submit" class="btn btn-primary" [dsBtnDisabled]="!accepted">{{ 'info.end-user-agreement.buttons.save' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -16,7 +16,7 @@ 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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -58,7 +58,7 @@ describe('EndUserAgreementComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), EndUserAgreementComponent, DisabledDirective],
|
imports: [TranslateModule.forRoot(), EndUserAgreementComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: EndUserAgreementService, useValue: endUserAgreementService },
|
{ provide: EndUserAgreementService, useValue: endUserAgreementService },
|
||||||
{ provide: NotificationsService, useValue: notificationsService },
|
{ provide: NotificationsService, useValue: notificationsService },
|
||||||
|
@@ -23,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -33,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, DisabledDirective],
|
imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* 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 [dsDisabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
<button [dsBtnDisabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -18,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -46,7 +46,7 @@ describe('FeedbackFormComponent', () => {
|
|||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), FeedbackFormComponent, DisabledDirective],
|
imports: [TranslateModule.forRoot(), FeedbackFormComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
||||||
|
@@ -30,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
|
|
||||||
@@ -39,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, DisabledDirective],
|
imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying the contents of the Feedback Statement
|
* Component displaying the contents of the Feedback Statement
|
||||||
|
@@ -79,7 +79,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="requestCopyForm.invalid"
|
[dsBtnDisabled]="requestCopyForm.invalid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="onSubmit()">{{'bitstream-request-a-copy.submit' | translate}}</button>
|
(click)="onSubmit()">{{'bitstream-request-a-copy.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -55,7 +55,7 @@ import {
|
|||||||
getFirstCompletedRemoteData,
|
getFirstCompletedRemoteData,
|
||||||
getFirstSucceededRemoteDataPayload,
|
getFirstSucceededRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { DisabledDirective } from '../../../shared/disabled-directive';
|
import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -72,7 +72,7 @@ import { getItemPageRoute } from '../../item-page-routing-paths';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
[dsBtnDisabled]="(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" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
[dsBtnDisabled]="(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,7 +50,7 @@ import {
|
|||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../core/shared/operators';
|
} from '../../../core/shared/operators';
|
||||||
import { DisabledDirective } from '../../../shared/disabled-directive';
|
import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -80,7 +80,7 @@ import { ItemEditBitstreamDragHandleComponent } from './item-edit-bitstream-drag
|
|||||||
ItemEditBitstreamDragHandleComponent,
|
ItemEditBitstreamDragHandleComponent,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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 [dsDisabled]="!canRemove()" (click)="remove()"
|
<button [dsBtnDisabled]="!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 [dsDisabled]="!canUndo()" (click)="undo()"
|
<button [dsBtnDisabled]="!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,7 +29,7 @@ import {
|
|||||||
getFirstSucceededRemoteData,
|
getFirstSucceededRemoteData,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
import { BtnDisabledDirective } from '../../../../shared/btn-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';
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ import { BrowserOnlyPipe } from '../../../../shared/utils/browser-only.pipe';
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -86,10 +86,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<div class="space-children-mr">
|
<div class="space-children-mr">
|
||||||
<button [dsDisabled]="isDeleting$ | async" (click)="performAction()"
|
<button [dsBtnDisabled]="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 [dsDisabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
<button [dsBtnDisabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
||||||
class="btn btn-outline-secondary cancel">
|
class="btn btn-outline-secondary cancel">
|
||||||
{{cancelMessage| translate}}
|
{{cancelMessage| translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -56,7 +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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -110,7 +110,7 @@ class RelationshipDTO {
|
|||||||
VarDirective,
|
VarDirective,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
<button [routerLink]="[(itemPageRoute$ | async), 'edit']" class="btn btn-outline-secondary">
|
<button [routerLink]="[(itemPageRoute$ | async), 'edit']" class="btn btn-outline-secondary">
|
||||||
<i class="fas fa-arrow-left"></i> {{'item.edit.move.cancel' | translate}}
|
<i class="fas fa-arrow-left"></i> {{'item.edit.move.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="!canMove" (click)="moveToCollection()">
|
<button class="btn btn-primary" [dsBtnDisabled]="!canMove" (click)="moveToCollection()">
|
||||||
<span *ngIf="!processing">
|
<span *ngIf="!processing">
|
||||||
<i class="fas fa-save"></i> {{'item.edit.move.save-button' | translate}}
|
<i class="fas fa-save"></i> {{'item.edit.move.save-button' | translate}}
|
||||||
</span>
|
</span>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<i class="fas fa-circle-notch fa-spin"></i> {{'item.edit.move.processing' | translate}}
|
<i class="fas fa-circle-notch fa-spin"></i> {{'item.edit.move.processing' | translate}}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" [dsDisabled]="!canSubmit" (click)="discard()">
|
<button class="btn btn-danger" [dsBtnDisabled]="!canSubmit" (click)="discard()">
|
||||||
<i class="fas fa-times"></i> {{"item.edit.move.discard-button" | translate}}
|
<i class="fas fa-times"></i> {{"item.edit.move.discard-button" | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -37,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -57,7 +57,7 @@ import {
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
AuthorizedCollectionSelectorComponent,
|
AuthorizedCollectionSelectorComponent,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-9 float-left action-button">
|
<div class="col-9 float-left action-button">
|
||||||
<span *ngIf="operation.authorized">
|
<span *ngIf="operation.authorized">
|
||||||
<button class="btn btn-outline-primary" [dsDisabled]="operation.disabled" [routerLink]="operation.operationUrl" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
<button class="btn btn-outline-primary" [dsBtnDisabled]="operation.disabled" [routerLink]="operation.operationUrl" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
||||||
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!operation.authorized" [ngbTooltip]="'item.edit.tabs.status.buttons.unauthorized' | translate">
|
<span *ngIf="!operation.authorized" [ngbTooltip]="'item.edit.tabs.status.buttons.unauthorized' | translate">
|
||||||
<button class="btn btn-outline-primary" [dsDisabled]="true" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
<button class="btn btn-outline-primary" [dsBtnDisabled]="true" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
||||||
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
@@ -6,7 +6,7 @@ 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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import { ItemOperationComponent } from './item-operation.component';
|
import { ItemOperationComponent } from './item-operation.component';
|
||||||
import { ItemOperation } from './itemOperation.model';
|
import { ItemOperation } from './itemOperation.model';
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ describe('ItemOperationComponent', () => {
|
|||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemOperationComponent, DisabledDirective],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemOperationComponent, BtnDisabledDirective],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -7,7 +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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import { ItemOperation } from './itemOperation.model';
|
import { ItemOperation } from './itemOperation.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -18,7 +18,7 @@ import { ItemOperation } from './itemOperation.model';
|
|||||||
RouterLink,
|
RouterLink,
|
||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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" [dsDisabled]="(hasChanges | async)" (click)="openLookup()">
|
<button class="ml-2 btn btn-success" [dsBtnDisabled]="(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,7 +65,7 @@ import {
|
|||||||
getFirstSucceededRemoteDataPayload,
|
getFirstSucceededRemoteDataPayload,
|
||||||
getRemoteDataPayload,
|
getRemoteDataPayload,
|
||||||
} from '../../../../core/shared/operators';
|
} from '../../../../core/shared/operators';
|
||||||
import { DisabledDirective } from '../../../../shared/disabled-directive';
|
import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -101,7 +101,7 @@ import { EditRelationshipComponent } from '../edit-relationship/edit-relationshi
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgClass,
|
NgClass,
|
||||||
ThemedLoadingComponent,
|
ThemedLoadingComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -9,12 +9,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div class="btn-group relationship-action-buttons">
|
<div class="btn-group relationship-action-buttons">
|
||||||
<button [dsDisabled]="!canRemove()" (click)="openVirtualMetadataModal(virtualMetadataModal)"
|
<button [dsBtnDisabled]="!canRemove()" (click)="openVirtualMetadataModal(virtualMetadataModal)"
|
||||||
class="btn btn-outline-danger btn-sm"
|
class="btn btn-outline-danger btn-sm"
|
||||||
title="{{'item.edit.metadata.edit.buttons.remove' | translate}}">
|
title="{{'item.edit.metadata.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 [dsDisabled]="!canUndo()" (click)="undo()"
|
<button [dsBtnDisabled]="!canUndo()" (click)="undo()"
|
||||||
class="btn btn-outline-warning btn-sm"
|
class="btn btn-outline-warning btn-sm"
|
||||||
title="{{'item.edit.metadata.edit.buttons.undo' | translate}}">
|
title="{{'item.edit.metadata.edit.buttons.undo' | translate}}">
|
||||||
<i class="fas fa-undo-alt fa-fw"></i>
|
<i class="fas fa-undo-alt fa-fw"></i>
|
||||||
|
@@ -37,7 +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 { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -55,7 +55,7 @@ import { VirtualMetadataComponent } from '../../virtual-metadata/virtual-metadat
|
|||||||
NgIf,
|
NgIf,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
VirtualMetadataComponent,
|
VirtualMetadataComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(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"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || (isSaving$ | async) === true"
|
[dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -68,7 +68,7 @@ import { EditRelationshipListWrapperComponent } from './edit-relationship-list-w
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
EditRelationshipListWrapperComponent,
|
EditRelationshipListWrapperComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<div class="buttons" *ngIf="medias?.length > 1">
|
<div class="buttons" *ngIf="medias?.length > 1">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary previous"
|
class="btn btn-primary previous"
|
||||||
[dsDisabled]="currentIndex === 0"
|
[dsBtnDisabled]="currentIndex === 0"
|
||||||
(click)="prevMedia()"
|
(click)="prevMedia()"
|
||||||
>
|
>
|
||||||
{{ "media-viewer.previous" | translate }}
|
{{ "media-viewer.previous" | translate }}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary next"
|
class="btn btn-primary next"
|
||||||
[dsDisabled]="currentIndex === medias.length - 1"
|
[dsBtnDisabled]="currentIndex === medias.length - 1"
|
||||||
(click)="nextMedia()"
|
(click)="nextMedia()"
|
||||||
>
|
>
|
||||||
{{ "media-viewer.next" | translate }}
|
{{ "media-viewer.next" | translate }}
|
||||||
|
@@ -12,7 +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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import { CaptionInfo } from './caption-info';
|
import { CaptionInfo } from './caption-info';
|
||||||
import { languageHelper } from './language-helper';
|
import { languageHelper } from './language-helper';
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ import { languageHelper } from './language-helper';
|
|||||||
NgbDropdownModule,
|
NgbDropdownModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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()"
|
||||||
[dsDisabled]="(unlinkProcessing | async)">
|
[dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -46,7 +46,7 @@ import { NotificationsService } from '../../../shared/notifications/notification
|
|||||||
NgIf,
|
NgIf,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
AlertComponent,
|
AlertComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="isAnyBeingEdited() || hasDraftVersion"
|
[dsBtnDisabled]="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'"
|
||||||
[dsDisabled]="isAnyBeingEdited()"
|
[dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import {
|
import {
|
||||||
getItemEditVersionhistoryRoute,
|
getItemEditVersionhistoryRoute,
|
||||||
@@ -68,7 +68,7 @@ import { ItemVersionsSummaryModalComponent } from '../item-versions-summary-moda
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgClass,
|
NgClass,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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',
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
<ng-template #notThisBeingEdited>
|
<ng-template #notThisBeingEdited>
|
||||||
<!--EDIT-->
|
<!--EDIT-->
|
||||||
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
||||||
[dsDisabled]="isAnyBeingEdited()"
|
[dsBtnDisabled]="isAnyBeingEdited()"
|
||||||
(click)="enableVersionEditing(versionDTO.version)"
|
(click)="enableVersionEditing(versionDTO.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,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -159,7 +159,7 @@ describe('ItemVersionsComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterModule.forRoot([]), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemVersionsComponent, VarDirective, DisabledDirective],
|
imports: [TranslateModule.forRoot(), RouterModule.forRoot([]), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemVersionsComponent, VarDirective, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: PaginationService, useValue: new PaginationServiceStub() },
|
{ provide: PaginationService, useValue: new PaginationServiceStub() },
|
||||||
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
||||||
|
@@ -48,7 +48,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 { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
hasValueOperator,
|
hasValueOperator,
|
||||||
@@ -86,7 +86,7 @@ interface VersionDTO {
|
|||||||
NgIf,
|
NgIf,
|
||||||
PaginationComponent,
|
PaginationComponent,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -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" [dsDisabled]="(initialized$ | async) !== true"
|
[attr.aria-label]="'mydspace.new-submission-external' | translate" [dsBtnDisabled]="(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" [dsDisabled]="(initialized$ | async) !== true"
|
type="button" [dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -46,7 +46,7 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BrowserOnlyPipe,
|
BrowserOnlyPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="(initialized$ | async) !== true" (click)="openDialog(singleEntity)" role="button">
|
[dsBtnDisabled]="(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" [dsDisabled]="(initialized$ | async) !== true"
|
type="button" [dsBtnDisabled]="(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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -48,7 +48,7 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
BrowserOnlyPipe,
|
BrowserOnlyPipe,
|
||||||
NgIf,
|
NgIf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="eventElement.isRunning"
|
[dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../../shared/btn-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';
|
||||||
@@ -87,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, DisabledDirective],
|
imports: [AlertComponent, NgIf, ThemedLoadingComponent, PaginationComponent, NgFor, RouterLink, NgbTooltipModule, AsyncPipe, TranslateModule, EPersonDataComponent, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
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" [dsDisabled]="projectTitle === ''" (click)="projectTitle = ''">{{(labelPrefix + label + '.clear'|translate)}}</button>
|
<button type="button" class="btn btn-outline-secondary" [dsBtnDisabled]="projectTitle === ''" (click)="projectTitle = ''">{{(labelPrefix + label + '.clear'|translate)}}</button>
|
||||||
<button type="button" class="btn btn-primary" [dsDisabled]="projectTitle === ''" (click)="search(projectTitle)">{{(labelPrefix + label + '.search'|translate)}}</button>
|
<button type="button" class="btn btn-primary" [dsBtnDisabled]="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" [dsDisabled]="selectedImportType === importType.None" (click)="bound()">{{ (labelPrefix + label + '.bound' | translate) }}</button>
|
<button type="button" class="btn btn-primary" [dsBtnDisabled]="selectedImportType === importType.None" (click)="bound()">{{ (labelPrefix + label + '.bound' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -30,7 +30,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 { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasValue,
|
hasValue,
|
||||||
isNotEmpty,
|
isNotEmpty,
|
||||||
@@ -106,7 +106,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, DisabledDirective],
|
imports: [RouterLink, NgIf, FormsModule, ThemedLoadingComponent, ThemedSearchResultsComponent, AlertComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* 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()" [dsDisabled]="!hasEvidence" class="btn btn-info ml-2">
|
<button *ngIf="!isBulk" (click)="toggleSeeEvidences()" [dsBtnDisabled]="!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,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -32,7 +32,7 @@ import { SuggestionApproveAndImport } from '../suggestion-list-element/suggestio
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgIf,
|
NgIf,
|
||||||
NgbDropdownModule,
|
NgbDropdownModule,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -64,10 +64,10 @@
|
|||||||
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>
|
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button class="btn btn-primary mr-2" [dsDisabled]="processBulkDeleteService.isProcessing$() |async"
|
<button class="btn btn-primary mr-2" [dsBtnDisabled]="processBulkDeleteService.isProcessing$() |async"
|
||||||
(click)="closeModal()">{{'process.detail.delete.cancel' | translate}}</button>
|
(click)="closeModal()">{{'process.detail.delete.cancel' | translate}}</button>
|
||||||
<button id="delete-confirm" class="btn btn-danger"
|
<button id="delete-confirm" class="btn btn-danger"
|
||||||
[dsDisabled]="processBulkDeleteService.isProcessing$() |async"
|
[dsBtnDisabled]="processBulkDeleteService.isProcessing$() |async"
|
||||||
(click)="deleteSelected()">{{ 'process.overview.delete' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}
|
(click)="deleteSelected()">{{ 'process.overview.delete' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -16,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -32,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, DisabledDirective],
|
imports: [NgIf, RouterLink, PaginationComponent, NgFor, VarDirective, AsyncPipe, DatePipe, TranslateModule, NgTemplateOutlet, ProcessOverviewTableComponent, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component displaying a list of all processes in a paginated table
|
* Component displaying a list of all processes in a paginated table
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
<input type="checkbox" [checked]="checked" (change)="toggleCheckbox()"/>
|
<input type="checkbox" [checked]="checked" (change)="toggleCheckbox()"/>
|
||||||
{{ 'dso-selector.claim.item.not-mine-label' | translate }}
|
{{ 'dso-selector.claim.item.not-mine-label' | translate }}
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary ml-5 mr-2" (click)="createFromScratch()" [dsDisabled]="!checked">
|
<button type="submit" class="btn btn-primary ml-5 mr-2" (click)="createFromScratch()" [dsBtnDisabled]="!checked">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
{{ 'dso-selector.claim.item.create-from-scratch' | translate }}
|
{{ 'dso-selector.claim.item.create-from-scratch' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -25,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -43,7 +43,7 @@ import { ProfileClaimService } from '../profile-claim/profile-claim.service';
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<p>{{'researcher.profile.not.associated' | translate}}</p>
|
<p>{{'researcher.profile.not.associated' | translate}}</p>
|
||||||
</div>
|
</div>
|
||||||
<button *ngIf="!researcherProfile" class="btn btn-primary mr-2"
|
<button *ngIf="!researcherProfile" class="btn btn-primary mr-2"
|
||||||
[dsDisabled]="(isProcessingCreate() | async)"
|
[dsBtnDisabled]="(isProcessingCreate() | async)"
|
||||||
(click)="createProfile()">
|
(click)="createProfile()">
|
||||||
<span *ngIf="(isProcessingCreate() | async)">
|
<span *ngIf="(isProcessingCreate() | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<ng-container *ngIf="researcherProfile">
|
<ng-container *ngIf="researcherProfile">
|
||||||
<button class="btn btn-primary mr-2" [dsDisabled]="!researcherProfile" (click)="viewProfile(researcherProfile)">
|
<button class="btn btn-primary mr-2" [dsBtnDisabled]="!researcherProfile" (click)="viewProfile(researcherProfile)">
|
||||||
<i class="fas fa-info-circle"></i> {{'researcher.profile.view' | translate}}
|
<i class="fas fa-info-circle"></i> {{'researcher.profile.view' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" [dsDisabled]="!researcherProfile" (click)="deleteProfile(researcherProfile)">
|
<button class="btn btn-danger" [dsBtnDisabled]="!researcherProfile" (click)="deleteProfile(researcherProfile)">
|
||||||
<span *ngIf="(isProcessingDelete() | async)">
|
<span *ngIf="(isProcessingDelete() | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||||
</span>
|
</span>
|
||||||
|
@@ -37,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
@@ -54,7 +54,7 @@ import { ProfileClaimItemModalComponent } from '../profile-claim-item-modal/prof
|
|||||||
TranslateModule,
|
TranslateModule,
|
||||||
UiSwitchModule,
|
UiSwitchModule,
|
||||||
VarDirective,
|
VarDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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" [dsDisabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
|
<button class="btn btn-primary" [dsBtnDisabled]="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" [dsDisabled]="form.invalid" (click)="executeRecaptcha()">
|
<button class="btn btn-primary" [dsBtnDisabled]="form.invalid" (click)="executeRecaptcha()">
|
||||||
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -55,7 +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 { BtnDisabledDirective } from '../shared/btn-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';
|
||||||
@@ -67,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, DisabledDirective],
|
imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component responsible to render an email registration form.
|
* Component responsible to render an email registration form.
|
||||||
|
@@ -81,7 +81,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="isInValidPassword || userInfoForm.invalid"
|
[dsBtnDisabled]="isInValidPassword || userInfoForm.invalid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="submitEperson()">{{'register-page.create-profile.submit' | translate}}</button>
|
(click)="submitEperson()">{{'register-page.create-profile.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -43,7 +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 { BtnDisabledDirective } from '../../shared/btn-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';
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
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()"
|
||||||
[dsDisabled]="!subject || subject.length === 0"
|
[dsBtnDisabled]="!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,7 +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 { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
|
||||||
import { RequestCopyEmail } from './request-copy-email.model';
|
import { RequestCopyEmail } from './request-copy-email.model';
|
||||||
|
|
||||||
|
|
||||||
@@ -21,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, DisabledDirective],
|
imports: [FormsModule, NgClass, NgIf, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
@@ -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"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="ngForm.disabled || form.accessControls.length === 1"
|
[dsBtnDisabled]="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"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../btn-disabled.directive';
|
||||||
import { ToDatePipe } from './to-date.pipe';
|
import { ToDatePipe } from './to-date.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -26,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, DisabledDirective],
|
imports: [FormsModule, NgIf, NgFor, NgbDatepickerModule, TranslateModule, ToDatePipe, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
export class AccessControlArrayFormComponent implements OnInit {
|
export class AccessControlArrayFormComponent implements OnInit {
|
||||||
@Input() dropdownOptions: AccessesConditionOption[] = [];
|
@Input() dropdownOptions: AccessesConditionOption[] = [];
|
||||||
|
@@ -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"
|
||||||
[dsDisabled]="!state.bitstream.toggleStatus || state.bitstream.changesLimit !== 'selected'"
|
[dsBtnDisabled]="!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>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
{{ 'access-control-cancel' | translate }}
|
{{ 'access-control-cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[dsDisabled]="!state.item.toggleStatus && !state.bitstream.toggleStatus"
|
[dsBtnDisabled]="!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,7 +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 { BtnDisabledDirective } from '../btn-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';
|
||||||
@@ -47,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, DisabledDirective],
|
imports: [NgIf, AlertComponent, UiSwitchModule, FormsModule, AccessControlArrayFormComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
export class AccessControlFormContainerComponent<T extends DSpaceObject> implements OnDestroy {
|
export class AccessControlFormContainerComponent<T extends DSpaceObject> implements OnDestroy {
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[dsDisabled]',
|
selector: '[dsBtnDisabled]',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
*
|
*
|
||||||
* This directive should always be used instead of the HTML disabled attribute as it is more accessible.
|
* This directive should always be used instead of the HTML disabled attribute as it is more accessible.
|
||||||
*/
|
*/
|
||||||
export class DisabledDirective {
|
export class BtnDisabledDirective {
|
||||||
|
|
||||||
@Input() set dsDisabled(value: boolean) {
|
@Input() set dsDisabled(value: boolean) {
|
||||||
this.isDisabled = !!value;
|
this.isDisabled = !!value;
|
@@ -8,11 +8,11 @@ import {
|
|||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { DisabledDirective } from './disabled-directive';
|
import { BtnDisabledDirective } from './btn-disabled.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
<button [dsDisabled]="isDisabled">Test Button</button>
|
<button [dsBtnDisabled]="isDisabled">Test Button</button>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
class TestComponent {
|
class TestComponent {
|
||||||
@@ -26,7 +26,7 @@ describe('DisabledDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [DisabledDirective],
|
imports: [BtnDisabledDirective],
|
||||||
declarations: [TestComponent],
|
declarations: [TestComponent],
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
class="btn btn-outline-primary selection"
|
class="btn btn-outline-primary selection"
|
||||||
(blur)="close.emit($event)"
|
(blur)="close.emit($event)"
|
||||||
(click)="close.emit($event)"
|
(click)="close.emit($event)"
|
||||||
[dsDisabled]="disabled"
|
[dsBtnDisabled]="disabled"
|
||||||
ngbDropdownToggle>
|
ngbDropdownToggle>
|
||||||
<ng-content select=".selection"></ng-content>
|
<ng-content select=".selection"></ng-content>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -8,7 +8,7 @@ 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';
|
import { BtnDisabledDirective } from '../btn-disabled.directive';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component which represent a DSpace dropdown selector.
|
* Component which represent a DSpace dropdown selector.
|
||||||
@@ -18,7 +18,7 @@ import { DisabledDirective } from '../disabled-directive';
|
|||||||
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, DisabledDirective],
|
imports: [NgbDropdownModule, NgIf, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
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 [dsDisabled]="section.model?.disabled">
|
<button [attr.aria-label]="itemModel.text | translate" [title]="itemModel.text | translate" class="btn btn-dark btn-sm" ngbDropdownToggle [dsBtnDisabled]="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">
|
||||||
|
@@ -22,7 +22,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 { BtnDisabledDirective } from '../../../btn-disabled.directive';
|
||||||
import { hasValue } from '../../../empty.util';
|
import { hasValue } from '../../../empty.util';
|
||||||
import { MenuService } from '../../../menu/menu.service';
|
import { MenuService } from '../../../menu/menu.service';
|
||||||
|
|
||||||
@@ -34,7 +34,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, DisabledDirective],
|
imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent implements OnInit {
|
export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent implements OnInit {
|
||||||
|
|
||||||
|
@@ -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" [dsDisabled]="true">
|
<button *ngIf="section.model.disabled" class="btn btn-dark btn-sm" [dsBtnDisabled]="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" [dsDisabled]="section.model.disabled"
|
<button class="btn btn-dark btn-sm" [dsBtnDisabled]="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,7 +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 { BtnDisabledDirective } from '../../../btn-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';
|
||||||
@@ -24,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, DisabledDirective],
|
imports: [NgIf, NgbTooltipModule, RouterLink, TranslateModule, BtnDisabledDirective],
|
||||||
})
|
})
|
||||||
export class DsoEditMenuSectionComponent extends MenuSectionComponent implements OnInit {
|
export class DsoEditMenuSectionComponent extends MenuSectionComponent implements OnInit {
|
||||||
|
|
||||||
|
@@ -101,7 +101,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 { BtnDisabledDirective } from '../../../btn-disabled.directive';
|
||||||
import {
|
import {
|
||||||
hasNoValue,
|
hasNoValue,
|
||||||
hasValue,
|
hasValue,
|
||||||
@@ -143,7 +143,7 @@ import { DsDynamicLookupRelationModalComponent } from './relation-lookup-modal/d
|
|||||||
NgbTooltipModule,
|
NgbTooltipModule,
|
||||||
NgTemplateOutlet,
|
NgTemplateOutlet,
|
||||||
ExistingRelationListElementComponent,
|
ExistingRelationListElementComponent,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
],
|
],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
[attr.aria-labelledby]="'label_' + model.id"
|
[attr.aria-labelledby]="'label_' + model.id"
|
||||||
[class.disabled]="model.disabled"
|
[class.disabled]="model.disabled"
|
||||||
[dsDisabled]="model.disabled"
|
[dsBtnDisabled]="model.disabled"
|
||||||
(click)="datepicker.toggle()">
|
(click)="datepicker.toggle()">
|
||||||
|
|
||||||
<i *ngIf="model.toggleIcon" class="{{model.toggleIcon}}" aria-hidden="true"></i>
|
<i *ngIf="model.toggleIcon" class="{{model.toggleIcon}}" aria-hidden="true"></i>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user