Commit 31f4fcbaab944c1d79526fc288871da866f2af77
1 parent
10a10180
Exists in
master
6610: ajout de la mémorisation du nom via le drag and drop
Showing
3 changed files
with
7 additions
and
2 deletions
Show diff stats
ihm/app/controller/Drop/FileDrop.js
... | ... | @@ -70,6 +70,8 @@ Ext.define('treps.controller.Drop.FileDrop', { |
70 | 70 | return false; |
71 | 71 | } |
72 | 72 | |
73 | + treps.model.Session.set('in_filenameBase',file.name); | |
74 | + | |
73 | 75 | var reader = new FileReader(); |
74 | 76 | reader.onload = function (event) { |
75 | 77 | me.application.fireEvent('receivesource','data', event.target.result); | ... | ... |
ihm/app/controller/Steps/SourceSelectionStep.js
... | ... | @@ -193,7 +193,7 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { |
193 | 193 | |
194 | 194 | //reinit source selection |
195 | 195 | var session = treps.model.Session; |
196 | - session.set('in_filenameBase',null); | |
196 | + //session.set('in_filenameBase',null); | |
197 | 197 | |
198 | 198 | //on SAMP notification or drag & drop selection |
199 | 199 | if ((type != null) && (data != null)) |
... | ... | @@ -252,6 +252,9 @@ Ext.define('treps.controller.Steps.SourceSelectionStep', { |
252 | 252 | break; |
253 | 253 | case 'webfile_panel': |
254 | 254 | var url = crtPanel.child("textfield").getRawValue(); |
255 | + var filenameBase = url.substring( | |
256 | + action.result.fileName.lastIndexOf("_",11)+1, | |
257 | + action.result.fileName.lastIndexOf('.')); | |
255 | 258 | me.callRequest('url',url,afterrequest); |
256 | 259 | break; |
257 | 260 | case 'manualdata_panel': | ... | ... |
ihm/app/controller/Steps/StepsManager.js
... | ... | @@ -209,7 +209,7 @@ Ext.define('treps.controller.Steps.StepsManager', { |
209 | 209 | session.set('step2_vecs',null); |
210 | 210 | session.set('step2_srcFrame',null); |
211 | 211 | session.set('step2_dstFrame',null); |
212 | - | |
212 | + session.set('in_filenameBase',null); | |
213 | 213 | |
214 | 214 | if ((firstStep.getId() != session.get('stepId')) && (session.get('id') != '')) |
215 | 215 | { | ... | ... |