Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82052549
textgenese-selector-dialogue-component.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Sep 9, 08:17
Size
1 KB
Mime Type
text/x-java
Expires
Wed, Sep 11, 08:17 (2 d)
Engine
blob
Format
Raw Data
Handle
20646992
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
textgenese-selector-dialogue-component.component.ts
View Options
import {Component, forwardRef, Inject, OnChanges} from '@angular/core';
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {NG_VALUE_ACCESSOR} from '@angular/forms';
import {ActivatedRoute, ParamMap} from '@angular/router';
import {Subscription} from 'rxjs';
import {TlnQueryService} from '../../../tln-edition/services';
@Component({
selector: 'app-textgenese-selector-dialogue-component',
templateUrl: './textgenese-selector-dialogue-component.component.html',
styleUrls: ['./textgenese-selector-dialogue-component.component.scss'],
providers: [TlnQueryService,
{
provide: NG_VALUE_ACCESSOR, multi: true,
useExisting: forwardRef(() => TextgeneseSelectorDialogueComponentComponent),
}
]
})
export class TextgeneseSelectorDialogueComponentComponent implements OnChanges {
selectedTextGenesis: string;
queryParamSubscription: Subscription;
maxWidth: number;
constructor(private queryService: TlnQueryService, private dialogRef: MatDialogRef<TextgeneseSelectorDialogueComponentComponent>,
@Inject(MAT_DIALOG_DATA) public selectedManuscript: string, public activatedRoute: ActivatedRoute) {
this.maxWidth = window.innerWidth/1.5;
this.selectedTextGenesis = 'http://rdfh.ch/projects/0068#_Mp_XIV_TextGenesis0'; // TODO: Read Output
}
ngOnChanges() {
this.queryParamSubscription = this.activatedRoute.queryParamMap.subscribe((queryParams: ParamMap) => {
this.selectedManuscript = queryParams.get('manuscript');
// this.selectedTextGenesis = queryParams.get('geneticOrder'); // Todo: ReadOUt
});
}
apply() {
this.dialogRef.close({event: this.selectedTextGenesis});
}
}
Event Timeline
Log In to Comment