diff --git a/ihm/app/controller/Drop/FileDrop.js b/ihm/app/controller/Drop/FileDrop.js index 711daec..c4de5f8 100644 --- a/ihm/app/controller/Drop/FileDrop.js +++ b/ihm/app/controller/Drop/FileDrop.js @@ -70,6 +70,8 @@ Ext.define('treps.controller.Drop.FileDrop', { return false; } + treps.model.Session.set('in_filenameBase',file.name); + var reader = new FileReader(); reader.onload = function (event) { me.application.fireEvent('receivesource','data', event.target.result); diff --git a/ihm/app/controller/Steps/SourceSelectionStep.js b/ihm/app/controller/Steps/SourceSelectionStep.js index 005ec50..8158aee 100644 --- a/ihm/app/controller/Steps/SourceSelectionStep.js +++ b/ihm/app/controller/Steps/SourceSelectionStep.js @@ -193,7 +193,7 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { //reinit source selection var session = treps.model.Session; - session.set('in_filenameBase',null); + //session.set('in_filenameBase',null); //on SAMP notification or drag & drop selection if ((type != null) && (data != null)) @@ -252,6 +252,9 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { break; case 'webfile_panel': var url = crtPanel.child("textfield").getRawValue(); + var filenameBase = url.substring( + action.result.fileName.lastIndexOf("_",11)+1, + action.result.fileName.lastIndexOf('.')); me.callRequest('url',url,afterrequest); break; case 'manualdata_panel': diff --git a/ihm/app/controller/Steps/StepsManager.js b/ihm/app/controller/Steps/StepsManager.js index 3842eae..4ce2856 100644 --- a/ihm/app/controller/Steps/StepsManager.js +++ b/ihm/app/controller/Steps/StepsManager.js @@ -209,7 +209,7 @@ Ext.define('treps.controller.Steps.StepsManager', { session.set('step2_vecs',null); session.set('step2_srcFrame',null); session.set('step2_dstFrame',null); - + session.set('in_filenameBase',null); if ((firstStep.getId() != session.get('stepId')) && (session.get('id') != '')) { -- libgit2 0.21.2