Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62023016
crossref-editor-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
Fri, May 10, 10:46
Size
1 KB
Mime Type
text/x-java
Expires
Sun, May 12, 10:46 (2 d)
Engine
blob
Format
Raw Data
Handle
17591908
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
crossref-editor-component.component.ts
View Options
import {Component, OnChanges} from '@angular/core';
import {CrossrefEditorDataServiceService, TextGenesis, TextVersion} from './crossref-editor-data-service.service';
import {ActivatedRoute} from '@angular/router';
import {TlnQueryService} from '../tln-edition/tln-query.service';
@Component({
selector: 'app-crossref-editor-component',
templateUrl: './crossref-editor-component.component.html',
styleUrls: ['./crossref-editor-component.component.scss']
})
export class CrossrefEditorComponentComponent implements OnChanges {
textGenesis: TextGenesis;
addNewTextGenesis = false; // whether a new Textgenesis will be generated
editExistingTextGenesis = false; // whether an existing Textgenesis should be edited
constructor(private dataService: CrossrefEditorDataServiceService,
private activatedRoute: ActivatedRoute) {
}
ngOnChanges() {
}
initNewTextgenesis() {
this.addNewTextGenesis = true;
this.textGenesis = new TextGenesis('TextGenesis', this.activatedRoute.snapshot.queryParamMap.get('manuscript'));
this.textGenesis.checkOut(true);
// also adding new text version
let version = new TextVersion('TextVersion', this.textGenesis.iri);
this.textGenesis.addTextVersion(version, 0);
// emit to service
this.dataService.updateAll(this.textGenesis);
}
}
Event Timeline
Log In to Comment