From 1867df36553ba9ad9273103795e2085011b50cca Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Wed, 6 Jul 2016 16:23:27 +0200 Subject: [PATCH] Propagate documentId into SaveHandler. --- examples/jats-editor/JATSEditor.js | 1 + examples/science-writer/ScienceWriter.js | 1 + packages/common/AbstractWriter.js | 1 + packages/common/SaveHandler.js | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/jats-editor/JATSEditor.js b/examples/jats-editor/JATSEditor.js index 4527776f3..6f7924ab3 100644 --- a/examples/jats-editor/JATSEditor.js +++ b/examples/jats-editor/JATSEditor.js @@ -87,6 +87,7 @@ JATSEditor.Prototype = function() { // Display reader for mobile and writer on desktop el.append( $$(Publisher, { + documentId: this.props.documentId, documentSession: this.state.documentSession, configurator: configurator }).ref('publisher') diff --git a/examples/science-writer/ScienceWriter.js b/examples/science-writer/ScienceWriter.js index 3407a2b9a..efa43e936 100644 --- a/examples/science-writer/ScienceWriter.js +++ b/examples/science-writer/ScienceWriter.js @@ -92,6 +92,7 @@ ScienceWriter.Prototype = function() { // Display reader for mobile and writer on desktop el.append( $$(Author, { + documentId: this.props.documentId, documentSession: this.state.documentSession, configurator: configurator }).ref('publisher') diff --git a/packages/common/AbstractWriter.js b/packages/common/AbstractWriter.js index 50bfb7c01..7d02b2012 100644 --- a/packages/common/AbstractWriter.js +++ b/packages/common/AbstractWriter.js @@ -59,6 +59,7 @@ AbstractWriter.Prototype = function() { this._getSaveHandler = function() { return new SaveHandler({ + documentId: this.props.documentId, xmlStore: this.context.xmlStore, exporter: this.exporter }); diff --git a/packages/common/SaveHandler.js b/packages/common/SaveHandler.js index dd3b3341c..ecf83ffd1 100644 --- a/packages/common/SaveHandler.js +++ b/packages/common/SaveHandler.js @@ -11,7 +11,7 @@ SaveHandler.Prototype = function() { var exporter = this.context.exporter; var xml = exporter.exportDocument(doc); // console.log('### SAVING XML', xml); - this.context.xmlStore.writeXML('elife-00007', xml, cb); + this.context.xmlStore.writeXML(this.context.documentId, xml, cb); }; };