Commit 023c59f0 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

renamed and improved the corpus detail page, now known as text range page

parent 8f798955
{
"name": "mcClient",
"version": "0.2.5",
"version": "0.2.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -6949,9 +6949,9 @@
}
},
"typescript": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz",
"integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=",
"dev": true
},
"uglify-es": {
......
{
"name": "mcClient",
"version": "0.2.5",
"version": "0.2.6",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
......@@ -42,7 +42,7 @@
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.0",
"typescript": "^2.9.2"
"typescript": "^2.6.2"
},
"description": "An Ionic project",
"cordova": {
......
......@@ -10,7 +10,7 @@ import {HomePageModule} from "../pages/home/home.module";
import {TranslateLoader, TranslateModule} from "@ngx-translate/core";
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {AuthorDetailPageModule} from "../pages/author-detail/author-detail.module";
import {CorpusDetailPageModule} from "../pages/corpus-detail/corpus-detail.module";
import {TextRangePageModule} from "../pages/text-range/text-range.module";
import {ShowTextPageModule} from "../pages/show-text/show-text.module";
import {ExerciseProvider} from '../providers/exercise/exercise';
import {PreviewPageModule} from "../pages/preview/preview.module";
......@@ -52,7 +52,7 @@ class CustomErrorHandler extends IonicErrorHandler {
}),
AuthorDetailPageModule,
AuthorPageModule,
CorpusDetailPageModule,
TextRangePageModule,
FeedbackPageModule,
PreviewPageModule,
ShowTextPageModule,
......
......@@ -4,9 +4,8 @@ import {CorpusProvider} from "../../providers/corpus/corpus";
import {CorpusMC} from "../../models/corpusMC";
import {TranslateService} from "@ngx-translate/core";
import {HttpClient} from "@angular/common/http";
import {CorpusDetailPage} from "../corpus-detail/corpus-detail";
import {TextRangePage} from "../text-range/text-range";
import {FeedbackPage} from "../feedback/feedback";
import {VocabularyCheckPage} from "../vocabulary-check/vocabulary-check";
/**
* Generated class for the AuthorDetailPage page.
......@@ -33,6 +32,6 @@ export class AuthorDetailPage {
showPossibleReferences(corpus: CorpusMC) {
this.corpusProvider.currentCorpus = corpus;
this.navCtrl.push(CorpusDetailPage).then();
this.navCtrl.push(TextRangePage).then();
}
}
import {NgModule} from '@angular/core';
import {IonicPageModule} from 'ionic-angular';
import {CorpusDetailPage} from './corpus-detail';
import {TextRangePage} from './text-range';
import {TranslateModule} from "@ngx-translate/core";
@NgModule({
declarations: [
CorpusDetailPage,
TextRangePage,
],
imports: [
IonicPageModule.forChild(CorpusDetailPage),
IonicPageModule.forChild(TextRangePage),
TranslateModule.forChild()
],
})
export class CorpusDetailPageModule {
export class TextRangePageModule {
}
......@@ -21,9 +21,9 @@ import {HelperProvider} from "../../providers/helper/helper";
@IonicPage()
@Component({
selector: 'page-corpus-detail',
templateUrl: 'corpus-detail.html',
templateUrl: 'text-range.html',
})
export class CorpusDetailPage {
export class TextRangePage {
// TODO: rebuild the system so it works for any corpus of arbitrary citation depth
public showMultiPartText: boolean = false;
public CitationLevel = CitationLevel;
......@@ -242,7 +242,7 @@ export class CorpusDetailPage {
async showFurtherReferences(event: BaseInput<string>) {
let value: string = event.value;
if (!value) {
return;
this.currentlyAvailableCitations = Object.keys(this.corpusProvider.currentCorpus.citations);
}
let dotCount: number = (value.match(/\./g) || []).length;
if (dotCount > 0 && value.endsWith(".")) {
......
Supports Markdown
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