From 86bd963998704561654248f3e66cb5927b0d5795 Mon Sep 17 00:00:00 2001 From: Laurent BEIGBEDER Date: Wed, 11 Sep 2019 17:37:17 +0200 Subject: [PATCH] redmine#6610: mise en session du nom de fichier d'input --- ihm/app/controller/Steps/SourceSelectionStep.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ihm/app/controller/Steps/SourceSelectionStep.js b/ihm/app/controller/Steps/SourceSelectionStep.js index 41bff2e..e7705b6 100644 --- a/ihm/app/controller/Steps/SourceSelectionStep.js +++ b/ihm/app/controller/Steps/SourceSelectionStep.js @@ -191,6 +191,10 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { var editController = treps.app.getController('Data.Edit.EditDataGrid'); + //reinit source selection + var session = treps.model.Session; + session.set('in_filenameBase',null); + //on SAMP notification or drag & drop selection if ((type != null) && (data != null)) { @@ -207,6 +211,10 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { waitMsg: 'Uploading your file...', timeout: 120000, success: function(form, action) { + var filenameBase = action.result.fileName.substring(0, + action.result.fileName.lastIndexOf('.')); + console.log('localfile_panel filename: '+filenameBase); + treps.model.Session.set('in_filenameBase',filenameBase); me.callRequest('local',action.result.fileName,afterrequest); }, failure: function(form, action) @@ -257,7 +265,8 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { TREPSAction.startNewOperation({'type' : type, 'data' : location}, function(result, event) { treps.LoadMask.hide(); - + // console.log('callRequestlocation: '+location); + if (!result) { treps.Messages.showError("Internal error during startNewOperation request"); -- libgit2 0.21.2