Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
refactor(modals): Move set hardReadonly from ts to html
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Apr 24, 2017
1 parent 6dc98b9 commit 528a221
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4 class="modal-title">{{title | translate}}</h4>
</div>
<div class="modal-body">
<content-types-grid #contentTypes (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectContentType($event)"></content-types-grid>
<content-types-grid #contentTypes (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectContentType($event)" [hardReadonly]="hardReadonly"></content-types-grid>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="close()" translate>Close</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class ContentTypesListModalComponent implements OnInit {
}

ngOnInit() {
this.contentTypes.hardReadonly = this.hardReadonly;
this.modal.onHidden.subscribe(() => this.close());
this.modal.onShown.subscribe(() => this.focus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<h4 class="modal-title">{{title | translate}}</h4>
</div>
<div class="modal-body">
<fontawesomes-grid #fontawesomes (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectFontawesome($event)"></fontawesomes-grid>
<fontawesomes-grid #fontawesomes (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectFontawesome($event)"
[hardReadonly]="hardReadonly"></fontawesomes-grid>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="close()" translate>Close</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class FontawesomesListModalComponent implements OnInit {
}

ngOnInit() {
this.fontawesomes.hardReadonly = this.hardReadonly;
this.modal.onHidden.subscribe(() => this.close());
this.modal.onShown.subscribe(() => this.focus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4 class="modal-title">{{title | translate}}</h4>
</div>
<div class="modal-body">
<groups-grid #groups (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectGroup($event)"></groups-grid>
<groups-grid #groups (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectGroup($event)" [hardReadonly]="hardReadonly"></groups-grid>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="close()" translate>Close</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class GroupsListModalComponent implements OnInit {
}

ngOnInit() {
this.groups.hardReadonly = this.hardReadonly;
this.modal.onHidden.subscribe(() => this.close());
this.modal.onShown.subscribe(() => this.focus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4 class="modal-title">{{title | translate}}</h4>
</div>
<div class="modal-body">
<permissions-grid #permissions (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectPermission($event)"></permissions-grid>
<permissions-grid #permissions (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectPermission($event)" [hardReadonly]="hardReadonly"></permissions-grid>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="close()" translate>Close</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class PermissionsListModalComponent implements OnInit {
}

ngOnInit() {
this.permissions.hardReadonly = this.hardReadonly;
this.modal.onHidden.subscribe(() => this.close());
this.modal.onShown.subscribe(() => this.focus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4 class="modal-title">{{title | translate}}</h4>
</div>
<div class="modal-body">
<users-grid #users (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectUser($event)"></users-grid>
<users-grid #users (onEnter)="select()" [onEnterEnabled]="true" (onSelectItems)="selectUser($event)" [hardReadonly]="hardReadonly"></users-grid>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="close()" translate>Close</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class UsersListModalComponent implements OnInit {
}

ngOnInit() {
this.users.hardReadonly = this.hardReadonly;
this.modal.onHidden.subscribe(() => this.close());
this.modal.onShown.subscribe(() => this.focus());
}
Expand Down

0 comments on commit 528a221

Please # to comment.