Commit 86bd963998704561654248f3e66cb5927b0d5795

Authored by Laurent BEIGBEDER
1 parent 00605721
Exists in master

redmine#6610: mise en session du nom de fichier d'input

Showing 1 changed file with 10 additions and 1 deletions   Show diff stats
ihm/app/controller/Steps/SourceSelectionStep.js
... ... @@ -191,6 +191,10 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', {
191 191  
192 192 var editController = treps.app.getController('Data.Edit.EditDataGrid');
193 193  
  194 + //reinit source selection
  195 + var session = treps.model.Session;
  196 + session.set('in_filenameBase',null);
  197 +
194 198 //on SAMP notification or drag & drop selection
195 199 if ((type != null) && (data != null))
196 200 {
... ... @@ -207,6 +211,10 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', {
207 211 waitMsg: 'Uploading your file...',
208 212 timeout: 120000,
209 213 success: function(form, action) {
  214 + var filenameBase = action.result.fileName.substring(0,
  215 + action.result.fileName.lastIndexOf('.'));
  216 + console.log('localfile_panel filename: '+filenameBase);
  217 + treps.model.Session.set('in_filenameBase',filenameBase);
210 218 me.callRequest('local',action.result.fileName,afterrequest);
211 219 },
212 220 failure: function(form, action)
... ... @@ -257,7 +265,8 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', {
257 265 TREPSAction.startNewOperation({'type' : type, 'data' : location}, function(result, event)
258 266 {
259 267 treps.LoadMask.hide();
260   -
  268 + // console.log('callRequestlocation: '+location);
  269 +
261 270 if (!result)
262 271 {
263 272 treps.Messages.showError("Internal error during startNewOperation request");
... ...