Commit edc5ad2c authored by Konstantin Schulz's avatar Konstantin Schulz

disabled automatic assumptions about the citation system, everything now has to be picked manually

parent 4a1aa097
Pipeline #1363 canceled with stages
......@@ -23,7 +23,6 @@
"INSTRUCTIONS": "Anweisungen",
"INSTRUCTIONS_FILL_THE_GAP": "Ordne die Wörter aus dem Pool den richtigen Lücken zu!",
"INVALID_TEXT_RANGE": "Ungültige Textauswahl",
"NO_TEXT_RANGE_CHOSEN": "Bitte wähle einen Textausschnitt.",
"PART_OF_SPEECH_CONJUNCTION": "Konjunktion",
"PDF": "PDF",
"PHENOMENON_DEPENDENCY": "Dependenz",
......
......@@ -23,7 +23,6 @@
"INSTRUCTIONS": "Instructions",
"INSTRUCTIONS_FILL_THE_GAP": "Assign the words from the pool to the correct gaps!",
"INVALID_TEXT_RANGE": "Invalid text range",
"NO_TEXT_RANGE_CHOSEN": "Please choose a text range.",
"PART_OF_SPEECH_CONJUNCTION": "Conjunction",
"PDF": "PDF",
"PHENOMENON_DEPENDENCY": "Dependency",
......
......@@ -23,7 +23,6 @@ import {Citation} from "../../models/citation";
export class CorpusDetailPage {
// TODO: rebuild the system so it works for any corpus of arbitrary citation depth
public showMultiPartText: boolean = false;
public noTextRangeChosenString: string;
public CitationLevel = CitationLevel;
public invalidTextRangeString: string;
public areReffEditable: boolean = true;
......@@ -40,9 +39,6 @@ export class CorpusDetailPage {
if (Object.keys(this.corpusProvider.currentCorpus.citations).length === 0) {
this.addReferences(this.corpusProvider.currentCorpus.citation_level_1);
}
this.translateService.get("NO_TEXT_RANGE_CHOSEN").subscribe((value) => {
this.noTextRangeChosenString = value;
});
this.translateService.get("INVALID_TEXT_RANGE").subscribe((value) => {
this.invalidTextRangeString = value;
});
......@@ -106,9 +102,18 @@ export class CorpusDetailPage {
}
showText() {
if (!this.corpusProvider.currentTextRange.start[0]) {
if (this.corpusProvider.currentCorpus.citation_level_2 === CitationLevel[CitationLevel.default]) {
this.corpusProvider.currentTextRange.start.splice(1, 2);
this.corpusProvider.currentTextRange.end.splice(1, 2);
}
else if (this.corpusProvider.currentCorpus.citation_level_3 === CitationLevel[CitationLevel.default]) {
this.corpusProvider.currentTextRange.start.splice(2, 1);
this.corpusProvider.currentTextRange.end.splice(2, 1);
}
let wholeTextRange: number[] = this.corpusProvider.currentTextRange.start.concat(this.corpusProvider.currentTextRange.end);
if (wholeTextRange.some(value => !value)) {
let toast = this.toastCtrl.create({
message: this.noTextRangeChosenString,
message: this.invalidTextRangeString,
duration: 3000,
position: 'top'
});
......@@ -182,12 +187,6 @@ export class CorpusDetailPage {
}
private adjustCurrentTextRange() {
this.corpusProvider.previousCorpus = this.corpusProvider.currentCorpus;
for (let i in this.corpusProvider.currentTextRange.start) {
if (this.corpusProvider.currentTextRange.start[+i] && !this.corpusProvider.currentTextRange.end[+i]) {
this.corpusProvider.currentTextRange.end[+i] = this.corpusProvider.currentTextRange.start[+i];
}
}
let newUrnStart: string = this.corpusProvider.currentTextRange.start.join(".");
let newUrnEnd: string = this.corpusProvider.currentTextRange.end.join(".");
this.corpusProvider.currentLastUrnPart = newUrnStart + "-" + newUrnEnd;
......
......@@ -25,8 +25,7 @@ export class HomePage {
}
test() {
let persons = [1,2,3];
let a = persons.join(".");
let a = [1].concat([2]);
let d = 0;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment