Commit 4dadc8ac7b6aba1b23ebe3fdc5371ebf5a08fb08
1 parent
6aa5af40
Exists in
master
and in
92 other branches
rm 8444 +
Showing
3 changed files
with
12 additions
and
6 deletions
Show diff stats
generic_data/Functions/functions.xml
... | ... | @@ -97,15 +97,16 @@ |
97 | 97 | </function> |
98 | 98 | |
99 | 99 | <!--<function name="fairfield70(,tilt_angle_60)" args="2" kind="physics">--> |
100 | - <function name="fairfield70(,)" args="2" kind="physics"> | |
101 | - <!-- <prompt>xyz_sm (Re), dipole tilt angle (deg)</prompt> --> | |
100 | + <function name="fairfield70(,tilt_angle_60)" args="2" kind="physics"> | |
101 | + <prompt_param>xyz_sm (Re), dipole tilt angle (deg)</prompt_param> | |
102 | + <default_args>,tilt_angle_60</default_args> | |
102 | 103 | <info_brief>Distance (Re) from s/c location to Fairfield1970 model neutral sheet position.<br/> |
103 | 104 | dZ = fairfield70(xyz_sm, tilt_angle),<br/> xyz_sm is the s/c SM coordinates (Re) and tilt angle is in degrees.<br/> Valid for y_sm < 15 Re.</info_brief> |
104 | - <new_kernel>fairfield70</new_kernel> | |
105 | + <new_kernel>fairfield70</new_kernel> | |
105 | 106 | </function> |
106 | 107 | |
107 | 108 | <!--<function name="fairfield80(,tilt_angle_60)" args="2" kind="physics">--> |
108 | - <function name="fairfield80(,)" args="2" kind="physics"> | |
109 | + <function name="fairfield80(,tilt_angle_60)" args="2" kind="physics"> | |
109 | 110 | <!-- <prompt>xyz_sm (Re), dipole tilt angle (deg)</prompt> --> |
110 | 111 | |
111 | 112 | <info_brief>Distance (Re) from s/c location to Fairfield1980 model neutral sheet position.<br/> | ... | ... |
js/app/models/Function.js
... | ... | @@ -18,7 +18,8 @@ Ext.define('amdaModel.Function', { |
18 | 18 | {name: 'args', mapping: '@args', type: 'int', defaultValue: 1}, |
19 | 19 | {name: 'argv', mapping: '@argv', type: 'string'}, |
20 | 20 | {name: 'prompt', type: 'string', defaultValue: ''}, |
21 | - {name: 'default_args', type: 'string', defaultValue: ''}, | |
21 | + {name: 'prompt_param', type: 'string', defaultValue: ''}, | |
22 | + {name: 'default_args', type: 'string', defaultValue: ''}, | |
22 | 23 | {name: 'info_brief', type: 'string', defaultValue: ''} |
23 | 24 | ], |
24 | 25 | ... | ... |
js/app/views/CalculatorUI.js
... | ... | @@ -176,10 +176,13 @@ Ext.define('amdaUI.CalculatorUI', { |
176 | 176 | var afterParamsText = text + ")"; |
177 | 177 | //TODO: more than one args and prompt |
178 | 178 | this.processFormula(sel, currentBtn, params, afterParamsText); |
179 | - | |
180 | 179 | } |
181 | 180 | }, this); |
182 | 181 | } else { |
182 | + if ( currentBtn.initialConfig.prompt_param != "" ) { | |
183 | + console.log(currentBtn.initialConfig); | |
184 | + Ext.Msg.alert('Input Parameters', currentBtn.initialConfig.prompt_param); | |
185 | + } | |
183 | 186 | this.processFormula(sel, currentBtn, params, ")"); |
184 | 187 | }// endif prompt |
185 | 188 | }, |
... | ... | @@ -473,6 +476,7 @@ Ext.define('amdaUI.CalculatorUI', { |
473 | 476 | args: f.get('args'), |
474 | 477 | defaultArgs: f.get('default_args'), |
475 | 478 | prompt: f.get('prompt'), |
479 | + prompt_param: f.get('prompt_param'), | |
476 | 480 | tooltip: f.get('info_brief'), |
477 | 481 | scope: this, |
478 | 482 | handler: function (b, e) { | ... | ... |