Skip to content

Commit f65d6c5

Browse files
author
Jens Vannerum
committed
117544: rename directive to be clear it should currently only be used for buttons
1 parent 685e6d8 commit f65d6c5

86 files changed

Lines changed: 170 additions & 170 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/access-control/bulk-access/bulk-access.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>{{ 'admin.access-control.bulk-access.title' | translate }}</h1>
1010
<button class="btn btn-outline-primary mr-3" (click)="reset()">
1111
{{ 'access-control-cancel' | translate }}
1212
</button>
13-
<button class="btn btn-primary" [dsDisabled]="!canExport()" (click)="submit()">
13+
<button class="btn btn-primary" [dsBtnDisabled]="!canExport()" (click)="submit()">
1414
{{ 'access-control-execute' | translate }}
1515
</button>
1616
</div>

src/app/access-control/epeople-registry/epeople-registry.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { RequestService } from '../../core/data/request.service';
2727
import { PaginationService } from '../../core/pagination/pagination.service';
2828
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
2929
import { FindListOptions } from '../../core/data/find-list-options.model';
30-
import {DisabledDirective} from '../../shared/disabled-directive';
30+
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
3131

3232
describe('EPeopleRegistryComponent', () => {
3333
let component: EPeopleRegistryComponent;
@@ -132,7 +132,7 @@ describe('EPeopleRegistryComponent', () => {
132132
}
133133
}),
134134
],
135-
declarations: [EPeopleRegistryComponent, DisabledDirective],
135+
declarations: [EPeopleRegistryComponent, BtnDisabledDirective],
136136
providers: [
137137
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
138138
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1 class="border-bottom pb-2">{{messagePrefix + '.edit' | translate}}</h1>
2525
</button>
2626
</div>
2727
<div *ngIf="displayResetPassword" between class="btn-group">
28-
<button class="btn btn-primary" [dsDisabled]="!(canReset$ | async)" type="button" (click)="resetPassword()">
28+
<button class="btn btn-primary" [dsBtnDisabled]="!(canReset$ | async)" type="button" (click)="resetPassword()">
2929
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
3030
</button>
3131
</div>

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model
3535
import { ActivatedRoute, Router } from '@angular/router';
3636
import { RouterStub } from '../../../shared/testing/router.stub';
3737
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
38-
import {DisabledDirective} from '../../../shared/disabled-directive';
38+
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
3939

4040
describe('EPersonFormComponent', () => {
4141
let component: EPersonFormComponent;
@@ -203,7 +203,7 @@ describe('EPersonFormComponent', () => {
203203
}
204204
}),
205205
],
206-
declarations: [EPersonFormComponent, DisabledDirective],
206+
declarations: [EPersonFormComponent, BtnDisabledDirective],
207207
providers: [
208208
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
209209
{ provide: GroupDataService, useValue: groupsDataService },

src/app/access-control/group-registry/group-form/members-list/members-list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3>{{messagePrefix + '.headMembers' | translate}}</h3>
3434
<td class="align-middle">
3535
<div class="btn-group edit-field">
3636
<button (click)="deleteMemberFromGroup(eperson)"
37-
[dsDisabled]="actionConfig.remove.disabled"
37+
[dsBtnDisabled]="actionConfig.remove.disabled"
3838
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
3939
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(eperson) } }}">
4040
<i [ngClass]="actionConfig.remove.icon"></i>
@@ -114,7 +114,7 @@ <h3 id="search" class="border-bottom pb-2">
114114
<td class="align-middle">
115115
<div class="btn-group edit-field">
116116
<button (click)="addMemberToGroup(eperson)"
117-
[dsDisabled]="actionConfig.add.disabled"
117+
[dsBtnDisabled]="actionConfig.add.disabled"
118118
[ngClass]="['btn btn-sm', actionConfig.add.css]"
119119
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
120120
<i [ngClass]="actionConfig.add.icon"></i>

src/app/access-control/group-registry/groups-registry.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h2 id="search" class="border-bottom pb-2">{{messagePrefix + 'search.head' | tra
6969
<i class="fas fa-edit fa-fw"></i>
7070
</button>
7171
<button *ngSwitchCase="false"
72-
[dsDisabled]="true"
72+
[dsBtnDisabled]="true"
7373
class="btn btn-outline-primary btn-sm btn-edit"
7474
placement="left"
7575
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"

src/app/access-control/group-registry/groups-registry.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { FeatureID } from '../../core/data/feature-authorization/feature-id';
3434
import { NoContent } from '../../core/shared/NoContent.model';
3535
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
3636
import { DSONameServiceMock, UNDEFINED_NAME } from '../../shared/mocks/dso-name.service.mock';
37-
import {DisabledDirective} from '../../shared/disabled-directive';
37+
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
3838

3939
describe('GroupsRegistryComponent', () => {
4040
let component: GroupsRegistryComponent;
@@ -172,7 +172,7 @@ describe('GroupsRegistryComponent', () => {
172172
}
173173
}),
174174
],
175-
declarations: [GroupsRegistryComponent, DisabledDirective],
175+
declarations: [GroupsRegistryComponent, BtnDisabledDirective],
176176
providers: [GroupsRegistryComponent,
177177
{ provide: DSONameService, useValue: new DSONameServiceMock() },
178178
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },

src/app/collection-page/delete-collection-page/delete-collection-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ <h1 id="header" class="border-bottom pb-2">{{ 'collection.delete.head' | transla
66
<p class="pb-2">{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
77
<div class="form-group row">
88
<div class="col text-right space-children-mr">
9-
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
9+
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsBtnDisabled]="(processing$ | async)">
1010
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
1111
</button>
12-
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
12+
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsBtnDisabled]="(processing$ | async)">
1313
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
1414
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
1515
</button>

src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ <h3>{{ 'collection.source.controls.head' | translate }}</h3>
1919
</div>
2020

2121
<button *ngIf="!(testConfigRunning$ |async)" class="btn btn-secondary"
22-
[dsDisabled]="!(isEnabled)"
22+
[dsBtnDisabled]="!(isEnabled)"
2323
(click)="testConfiguration(contentSource)">
2424
<span>{{'collection.source.controls.test.submit' | translate}}</span>
2525
</button>
2626
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
27-
[dsDisabled]="true">
27+
[dsBtnDisabled]="true">
2828
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
2929
<span>{{'collection.source.controls.test.running' | translate}}</span>
3030
</button>
3131
<button *ngIf="!(importRunning$ |async)" class="btn btn-primary"
32-
[dsDisabled]="!(isEnabled)"
32+
[dsBtnDisabled]="!(isEnabled)"
3333
(click)="importNow()">
3434
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
3535
</button>
3636
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
37-
[dsDisabled]="true">
37+
[dsBtnDisabled]="true">
3838
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
3939
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
4040
</button>
4141
<button *ngIf="!(reImportRunning$ |async)" class="btn btn-primary"
42-
[dsDisabled]="!(isEnabled)"
42+
[dsBtnDisabled]="!(isEnabled)"
4343
(click)="resetAndReimport()">
4444
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.submit' | translate}}</span>
4545
</button>
4646
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
47-
[dsDisabled]="true">
47+
[dsBtnDisabled]="true">
4848
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
4949
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.running' | translate}}</span>
5050
</button>

src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { TestScheduler } from 'rxjs/testing';
2222
import { By } from '@angular/platform-browser';
2323
import { VarDirective } from '../../../../shared/utils/var.directive';
2424
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
25-
import {DisabledDirective} from '../../../../shared/disabled-directive';
25+
import {BtnDisabledDirective} from '../../../../shared/btn-disabled.directive';
2626

2727
describe('CollectionSourceControlsComponent', () => {
2828
let comp: CollectionSourceControlsComponent;
@@ -101,7 +101,7 @@ describe('CollectionSourceControlsComponent', () => {
101101

102102
TestBed.configureTestingModule({
103103
imports: [TranslateModule.forRoot(), RouterTestingModule],
104-
declarations: [CollectionSourceControlsComponent, VarDirective, DisabledDirective],
104+
declarations: [CollectionSourceControlsComponent, VarDirective, BtnDisabledDirective],
105105
providers: [
106106
{provide: ScriptDataService, useValue: scriptDataService},
107107
{provide: ProcessDataService, useValue: processDataService},

0 commit comments

Comments
 (0)