Properties dialog components polish and styling

This commit is contained in:
BoykoAlex
2017-08-30 17:16:08 -04:00
parent 8b32463336
commit f303076aa9
3 changed files with 5 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
</button>
</div>
<div class="modal-body">
<properties-group *ngIf="propertiesGroupModel" [propertiesGroupModel]="propertiesGroupModel" (form)="propertiesFormGroup=$event"></properties-group>
<properties-group *ngIf="propertiesGroupModel" [propertiesGroupModel]="propertiesGroupModel" [form]="propertiesFormGroup"></properties-group>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" (click)="handleCancel()">Close</button>

View File

@@ -17,7 +17,9 @@ export class PropertiesDialogComponent {
propertiesFormGroup : FormGroup;
constructor(private bsModalRef: BsModalRef) {}
constructor(private bsModalRef: BsModalRef) {
this.propertiesFormGroup = new FormGroup({});
}
handleOk() {
this.propertiesGroupModel.applyChanges();

View File

@@ -12,13 +12,10 @@ export class PropertiesGroupComponent implements OnInit {
@Input()
propertiesGroupModel : Properties.PropertiesGroupModel;
@Input()
form : FormGroup;
@Output('form')
private formEventEmitter = new EventEmitter<FormGroup>();
ngOnInit() {
this.form = new FormGroup({});
if (this.propertiesGroupModel.isLoading) {
let subscription = this.propertiesGroupModel.loadedSubject.subscribe(loaded => {
if (loaded) {
@@ -29,7 +26,6 @@ export class PropertiesGroupComponent implements OnInit {
} else {
this.createGroupControls();
}
this.formEventEmitter.emit(this.form);
}
createGroupControls() {