Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 6b0aa806

Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)

dropped API object from ShowGraphApp JS class

Zobrazit rozdíly:

sources/src/main/webapp/js/components/saveDiagramModalWindow.js
9 9
		super.render();
10 10

  
11 11
		this._form = DOM.h('form', {
12
			action: app.API.saveDiagram,
12
			action: Constants.API.saveDiagram,
13 13
			method: 'post',
14 14
			onSubmit: this._saveDiagram.bind(this),
15 15
		}, [
sources/src/main/webapp/js/showGraphApp.js
20 20
	this.NAME = document.title;
21 21
	/** @prop {string} HOME_URL Application home URL. */
22 22
	this.HOME_URL = null;
23
	/** @prop {object} API Application programming interface paths. */
24
	this.API = {
25
		loadGraphData: 'api/load-graph-data',
26
		getDiagram: 'api/get-diagram',
27
		saveDiagram: 'api/save-diagram',
28
		removeDiagram: 'api/remove-diagram',
29
	};
30 23

  
31 24
	/** @prop {float} headerHeight Current height of the application header. */
32 25
	this.headerHeight = getHeaderHeight();
......
317 310
		let loadGraphDataPromise;
318 311

  
319 312
		if (diagramId === '') {
320
			loadGraphDataPromise = AJAX.getJSON(this.API.loadGraphData);
313
			loadGraphDataPromise = AJAX.getJSON(Constants.API.loadGraphData);
321 314

  
322 315
		} else {
323
			const diagramData = await AJAX.getJSON(this.API.getDiagram + '?id=' + diagramId);
316
			const diagramData = await AJAX.getJSON(Constants.API.getDiagram + '?id=' + diagramId);
324 317

  
325 318
			this.diagram = new Diagram(diagramData);
326 319

  

Také k dispozici: Unified diff