Skip to content
Snippets Groups Projects
Commit c2c83b7f authored by vkovtun's avatar vkovtun
Browse files

SSDM-9505 Fixing not responsive Zenodo when exporting. Reverting incorrect...

SSDM-9505 Fixing not responsive Zenodo when exporting. Reverting incorrect fixes of Zenodo API. Small fixes.
parent e79e792f
No related branches found
No related tags found
No related merge requests found
......@@ -13,4 +13,5 @@
sourceTest/lucene/
.idea/
*.iml
*.eml
\ No newline at end of file
*.eml
SERVER_STARTED
\ No newline at end of file
......@@ -20,9 +20,15 @@ function ZenodoExportController(parentController) {
this.zenodoApiTokenKey = parentController.zenodoApiTokenKey;
this.init = function(views) {
this.exportModel = new ZenodoExportModel();
this.exportView = new ZenodoExportView(this, this.exportModel);
this.exportView.repaint(views);
this.getSettingValue(this.zenodoApiTokenKey, (function (accessToken) {
if (accessToken && accessToken !== '') {
this.exportModel = new ZenodoExportModel(accessToken);
this.exportView = new ZenodoExportView(this, this.exportModel);
this.exportView.repaint(views);
} else {
Util.showError('Personal Zenodo API Token missing, please set it in your user profile.');
}
}).bind(this));
};
this.exportSelected = function() {
......@@ -45,7 +51,7 @@ function ZenodoExportController(parentController) {
} else {
Util.blockUI();
this.getUserInformation((function(userInformation) {
mainController.serverFacade.exportZenodo(toExport, true, false, userInformation, title,
mainController.serverFacade.exportZenodo(toExport, true, false, userInformation, title, this.exportModel.accessToken,
function(operationExecutionPermId) {
_this.waitForOpExecutionResponse(operationExecutionPermId, function(error, result) {
Util.unblockUI();
......
......@@ -14,5 +14,6 @@
* limitations under the License.
*/
function ZenodoExportModel() {
function ZenodoExportModel(accessToken) {
this.accessToken = accessToken;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment