diff --git a/frontend-js/src/main/js/gui/export/AbstractExportPanel.js b/frontend-js/src/main/js/gui/export/AbstractExportPanel.js index 53314ef96d12001d85840d17d55075e3b5ff46ec..d4d6662772235ca423e3a498d341fa82c52bd2c9 100644 --- a/frontend-js/src/main/js/gui/export/AbstractExportPanel.js +++ b/frontend-js/src/main/js/gui/export/AbstractExportPanel.js @@ -644,4 +644,27 @@ AbstractExportPanel.prototype.getBioEntityAllColumns = function () { }]; }; + +/** + * + * @param {BioEntity} bioEntity + * @param {ExportColumn} column + * @returns {Promise<string>} + * @protected + */ +AbstractExportPanel.prototype._createResponseCell = function (bioEntity, column) { + var valuePromise; + if (Functions.isString(column.method)) { + valuePromise = Promise.resolve(bioEntity[column.method]()); + } else { + valuePromise = Promise.resolve(column.method(bioEntity, this.getProject())); + } + return valuePromise.then(function (value) { + if (Functions.isString(value)) { + value = value.replace(/[\n\r]/g, ' '); + } + return value; + }); +}; + module.exports = AbstractExportPanel; diff --git a/frontend-js/src/main/js/gui/export/ElementExportPanel.js b/frontend-js/src/main/js/gui/export/ElementExportPanel.js index cf1ef8e8694ddba6d5643f182613ca3344941ada..8c96fec2a2c4b8a705dd93ebd16ac680c601ec81 100644 --- a/frontend-js/src/main/js/gui/export/ElementExportPanel.js +++ b/frontend-js/src/main/js/gui/export/ElementExportPanel.js @@ -125,27 +125,6 @@ ElementExportPanel.prototype.createResponseString = function () { }); }; -/** - * - * @param {BioEntity} alias - * @param column - * @returns {Promise<string>} - * @private - */ -ElementExportPanel.prototype._createResponseCell = function (alias, column) { - var valuePromise; - if (Functions.isString(column.method)) { - valuePromise = Promise.resolve(alias[column.method]()); - } else { - valuePromise = Promise.resolve(column.method(alias, this.getProject())); - } - return valuePromise.then(function (value) { - if (Functions.isString(value)) { - value = value.replace(/[\n\r]/g, ' '); - } - return value; - }); -}; /** * * @param {Alias} alias diff --git a/frontend-js/src/main/js/gui/export/NetworkExportPanel.js b/frontend-js/src/main/js/gui/export/NetworkExportPanel.js index 77a11e11a1f7956b69fcf177a900580be928a2ee..a64762b7f7c59748487da3ac4badbf671a9bc96a 100644 --- a/frontend-js/src/main/js/gui/export/NetworkExportPanel.js +++ b/frontend-js/src/main/js/gui/export/NetworkExportPanel.js @@ -249,27 +249,4 @@ NetworkExportPanel.prototype.createResponseRow = function (reaction, columns, mi }); }; -/** - * - * @param {Reaction} reaction - * @param {ExportColumn} column - * @returns {Promise<string>} - * @private - */ -NetworkExportPanel.prototype._createResponseCell = function (reaction, column) { - var valuePromise; - if (Functions.isString(column.method)) { - valuePromise = Promise.resolve(reaction[column.method]()); - } else { - valuePromise = Promise.resolve(column.method(reaction, this.getProject())); - } - - return valuePromise.then(function (value) { - if (Functions.isString(value)) { - value = value.replace(/[\n\r]/g, ' '); - } - return value; - }); -}; - module.exports = NetworkExportPanel;