Commit 5f341ae73adfc199f26c6be3ac390a199049e5d7
1 parent
f981cd96
Exists in
master
and in
92 other branches
ok pour download
Showing
2 changed files
with
32 additions
and
3 deletions
Show diff stats
js/app/models/InteractiveNode.js
... | ... | @@ -478,6 +478,7 @@ Ext.define('amdaModel.InteractiveNode', { |
478 | 478 | paramName = "#"+node.get('text'); |
479 | 479 | break; |
480 | 480 | case 'amdaModel.DerivedParamComponentNode' : |
481 | + | |
481 | 482 | paramId = node.get('text'); |
482 | 483 | var parentId = paramId.substr(0, paramId.length - 3); |
483 | 484 | paramName= "ws_" + parentId; |
... | ... | @@ -489,6 +490,18 @@ Ext.define('amdaModel.InteractiveNode', { |
489 | 490 | components['index1'] = component_index[1]; |
490 | 491 | } |
491 | 492 | break; |
493 | + case 'amdaModel.MyDataParamComponentNode' : | |
494 | + paramId = node.get('text'); | |
495 | + var parentId = paramId.substr(0, paramId.length - 3); | |
496 | + paramName= "wsd_" + parentId; | |
497 | + var regExp = /\(([\d]+)\)/; | |
498 | + var component_index = regExp.exec(paramId); | |
499 | + if (component_index) | |
500 | + { | |
501 | + components = []; | |
502 | + components['index1'] = component_index[1]; | |
503 | + } | |
504 | + break; | |
492 | 505 | case 'amdaModel.DerivedParamNode' : |
493 | 506 | paramName = "ws_"+node.get('text'); |
494 | 507 | break; | ... | ... |
js/app/views/DownloadUI.js
... | ... | @@ -128,8 +128,9 @@ Ext.define('amdaUI.DownloadUI', { |
128 | 128 | Ext.Array.each(arrayParams, function (item) { |
129 | 129 | if (Ext.isObject(item)) { |
130 | 130 | // handel case of derived parameters |
131 | - var patt = new RegExp("ws_"); | |
132 | - if (typeof paramId !== 'undefined' && ! patt.test(item.paramid)) | |
131 | + var patt_ws = new RegExp("ws_"); | |
132 | + var patt_wsd = new RegExp("wsd_"); | |
133 | + if (typeof paramId !== 'undefined' && ! patt_ws.test(item.paramid) && ! patt_wsd.test(item.paramid)) | |
133 | 134 | { |
134 | 135 | // for Parameter Name in Download Module |
135 | 136 | var paramObj = amdaModel.RequestParamObject.getEmptyObj(); |
... | ... | @@ -459,7 +460,6 @@ Ext.define('amdaUI.DownloadUI', { |
459 | 460 | } |
460 | 461 | break; |
461 | 462 | case 'alias' : |
462 | - // console.log(data.records[0].data); | |
463 | 463 | idToSent = "#" + data.records[0].get('text'); |
464 | 464 | break; |
465 | 465 | case 'derivedParam' : |
... | ... | @@ -482,7 +482,23 @@ Ext.define('amdaUI.DownloadUI', { |
482 | 482 | } |
483 | 483 | break; |
484 | 484 | case 'myDataParam' : |
485 | + if (data.records[0].modelName == 'amdaModel.MyDataParamComponentNode') | |
486 | + { | |
487 | + paramId = data.records[0].get('text'); | |
488 | + var parentId = paramId.substr(0, paramId.length - 3); | |
489 | + idToSent = "wsd_" + parentId; | |
490 | + var regExp = /\(([\d]+)\)/; | |
491 | + var component_index = regExp.exec(paramId); | |
492 | + if (component_index) | |
493 | + { | |
494 | + components = []; | |
495 | + components['index1'] = component_index[1]; | |
496 | + } | |
497 | + break; | |
498 | + } | |
499 | + else{ | |
485 | 500 | idToSent = "wsd_" + data.records[0].get('text'); |
501 | + } | |
486 | 502 | break; |
487 | 503 | default : |
488 | 504 | return false; | ... | ... |