+
-
+
diff --git a/src/app/project/list/list.component.ts b/src/app/project/list/list.component.ts
index 578bd1db8e..5f1686a0f4 100644
--- a/src/app/project/list/list.component.ts
+++ b/src/app/project/list/list.component.ts
@@ -1,4 +1,4 @@
-import { Component, Inject, OnInit } from '@angular/core';
+import { Component, HostListener, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { Title } from '@angular/platform-browser';
@@ -11,7 +11,6 @@ import {
List,
ListNodeInfo,
ListsResponse,
- ProjectResponse,
ReadProject,
StringLiteral
} from '@dasch-swiss/dsp-js';
@@ -71,6 +70,9 @@ export class ListComponent implements OnInit {
}
};
+ // disable content on small devices
+ disableContent = false;
+
constructor(
@Inject(DspApiConnectionToken) private _dspApiConnection: KnoraApiConnection,
private _cache: CacheService,
@@ -93,15 +95,22 @@ export class ListComponent implements OnInit {
}
// set the page title
- if (this.listIri) {
- this._titleService.setTitle('Project ' + this.projectCode + ' | List');
- } else {
- this._titleService.setTitle('Project ' + this.projectCode + ' | Lists');
+ this._setPageTitle();
+
+ }
+
+ @HostListener('window:resize', ['$event']) onWindwoResize(e: Event) {
+ this.disableContent = (window.innerWidth <= 768);
+ // reset the page title
+ if (!this.disableContent) {
+ this._setPageTitle();
}
}
ngOnInit() {
+ this.disableContent = (window.innerWidth <= 768);
+
this.loading = true;
// get information about the logged-in user
@@ -274,4 +283,12 @@ export class ListComponent implements OnInit {
});
}
+ private _setPageTitle() {
+ if (this.listIri) {
+ this._titleService.setTitle('Project ' + this.projectCode + ' | List');
+ } else {
+ this._titleService.setTitle('Project ' + this.projectCode + ' | Lists');
+ }
+ }
+
}
diff --git a/src/app/project/ontology/ontology.component.html b/src/app/project/ontology/ontology.component.html
index a10cb245ca..554ba0316f 100644
--- a/src/app/project/ontology/ontology.component.html
+++ b/src/app/project/ontology/ontology.component.html
@@ -1,4 +1,4 @@
-
+
-
+
-
+
diff --git a/src/app/project/ontology/ontology.component.ts b/src/app/project/ontology/ontology.component.ts
index 603a1e837b..48f227b3b2 100644
--- a/src/app/project/ontology/ontology.component.ts
+++ b/src/app/project/ontology/ontology.component.ts
@@ -1,4 +1,4 @@
-import { Component, Inject, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
+import { Component, HostListener, Inject, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { Title } from '@angular/platform-browser';
@@ -115,6 +115,9 @@ export class OntologyComponent implements OnInit {
defaultClasses: DefaultClass[] = DefaultResourceClasses.data;
defaultProperties: PropertyCategory[] = DefaultProperties.data;
+ // disable content on small devices
+ disableContent = false;
+
constructor(
@Inject(DspApiConnectionToken) private _dspApiConnection: KnoraApiConnection,
private _cache: CacheService,
@@ -144,15 +147,21 @@ export class OntologyComponent implements OnInit {
}
// set the page title
- if (this.ontologyIri) {
- this._titleService.setTitle('Project ' + this.projectCode + ' | Data model');
- } else {
- // set the page title in case of more than one existing project ontologies
- this._titleService.setTitle('Project ' + this.projectCode + ' | Data models');
+ this._setPageTitle();
+
+ }
+
+ @HostListener('window:resize', ['$event']) onWindwoResize(e: Event) {
+ this.disableContent = (window.innerWidth <= 768);
+ // reset the page title
+ if (!this.disableContent) {
+ this._setPageTitle();
}
}
ngOnInit() {
+
+ this.disableContent = (window.innerWidth <= 768);
this.loading = true;
// get information about the logged-in user
@@ -586,4 +595,13 @@ export class OntologyComponent implements OnInit {
);
}
+ private _setPageTitle() {
+ if (this.ontologyIri) {
+ this._titleService.setTitle('Project ' + this.projectCode + ' | Data model');
+ } else {
+ // set the page title in case of more than one existing project ontologies
+ this._titleService.setTitle('Project ' + this.projectCode + ' | Data models');
+ }
+ }
+
}
diff --git a/src/app/workspace/resource/representation/av-timeline/av-timeline.component.ts b/src/app/workspace/resource/representation/av-timeline/av-timeline.component.ts
index 1e0a2af219..1a54f48aa2 100644
--- a/src/app/workspace/resource/representation/av-timeline/av-timeline.component.ts
+++ b/src/app/workspace/resource/representation/av-timeline/av-timeline.component.ts
@@ -76,7 +76,7 @@ export class AvTimelineComponent implements OnChanges {
this._onMouseup(e);
}
- @HostListener('window:resize', ['$event']) onWindwoResiz(e: Event) {
+ @HostListener('window:resize', ['$event']) onWindowResize(e: Event) {
this._onWindowResize(e);
}