Commit 54be8b2e79ff2d75e49c91e0abe9322c9265280c
1 parent
ffa3484e
Exists in
master
and in
112 other branches
Add boolean argument support for a templated parameter
Showing
1 changed file
with
21 additions
and
0 deletions
Show diff stats
js/app/views/ParamArgumentsUI.js
... | ... | @@ -285,6 +285,27 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
285 | 285 | |
286 | 286 | me.add(itemsCombo); |
287 | 287 | break; |
288 | + case 'bool' : | |
289 | + var argumentField = Ext.create('Ext.form.Checkbox', { | |
290 | + argId: 'template_' + key, | |
291 | + fieldLabel: argument.name, | |
292 | + value: (parseInt(argument.default) == 1), | |
293 | + listeners: { | |
294 | + change: function(field, newValue, oldValue, eOpts) { | |
295 | + var template_args = me.paramRequestObject.get('template_args'); | |
296 | + if (!template_args) | |
297 | + template_args = {}; | |
298 | + template_args[key] = newValue; | |
299 | + me.paramRequestObject.set('template_args', template_args); | |
300 | + if (me.onChange != null) | |
301 | + me.onChange(uiScope, key, newValue, oldValue, true); | |
302 | + }, | |
303 | + scope: me | |
304 | + } | |
305 | + }); | |
306 | + | |
307 | + me.add(argumentField); | |
308 | + break; | |
288 | 309 | default: |
289 | 310 | console.log('Template argument type not yet implemented: '+argument.type); |
290 | 311 | } |
... | ... |