Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1ae1e090

Přidáno uživatelem Pavel Fidranský před téměř 6 roky(ů)

name of a diagram is displayed in Header

Zobrazit rozdíly:

sources/src/main/webapp/css/components/header.css
12 12
}
13 13

  
14 14
.header-title {
15
	width: 60%;
15 16
	color: #0b548a;
16 17
	margin: 0;
17 18
	line-height: 60px;
19
	white-space: nowrap;
20
	overflow: hidden;
21
	text-overflow: ellipsis;
22
}
23

  
24
.header .diagram-name:not(:empty)::before {
25
	content: " - ";
18 26
}
19 27

  
20 28
.header .user-menu {
sources/src/main/webapp/js/components/header.js
1 1
class Header {
2 2
	constructor() {
3
		document.addEventListener(DiagramUpdatedEvent.name, e => {
4
			this._diagramNameLabel.innerText = e.detail.name;
5
		});
6

  
3 7
		document.addEventListener(LoggedInEvent.name, e => {
4 8
			this._loggedInUserLabel.innerText = e.detail.username;
5 9
		});
......
10 14
	}
11 15

  
12 16
	render() {
17
		this._diagramNameLabel = DOM.h('span', {
18
			class: 'diagram-name',
19
		});
13 20
		this._loggedInUserLabel = DOM.h('span', {
14 21
			class: 'username',
15 22
		});
......
28 35
			DOM.h('h2', {
29 36
				class: 'header-title',
30 37
				innerText: 'Interactive Multimodal Graph Explorer',
31
			}),
38
			}, [
39
				this._diagramNameLabel,
40
			]),
32 41
			DOM.h('div', {
33 42
				class: 'user-menu loggedInOnly',
34 43
			}, [
sources/src/main/webapp/js/components/sidebarNodeList.js
83 83
		// content
84 84
		const containerContent = DOM.h('div', {
85 85
			class: 'node-container-content',
86
			hidden: 'hidden',
87 86
		}, [
88 87
			this._buttonGroupElement,
89 88
			this._sortOptionsElement,
sources/src/main/webapp/js/showGraphApp.js
151 151
		} else {
152 152
			const diagramData = await AJAX.getJSON(Constants.API.getDiagram + '?id=' + diagramId);
153 153

  
154
			this.diagram = new Diagram(diagramData);
155

  
156
			document.title = this.name + ' - ' + this.diagram.name;
154
			document.dispatchEvent(new DiagramUpdatedEvent(diagramData));
157 155

  
158 156
			loadGraphDataPromise = Promise.resolve(JSON.parse(diagramData.graph_json));
159 157
		}

Také k dispozici: Unified diff