Commit 12547118c3292691a4ff992b4b20ba61eaa13c48

Authored by Elena.Budnik
1 parent 9a9c6ebf

auto fill of min/max for variable table from args

Showing 1 changed file with 9 additions and 3 deletions   Show diff stats
js/app/views/ParamArgumentsUI.js
... ... @@ -291,9 +291,15 @@ Ext.define('amdaUI.ParamArgumentsUI', {
291 291 listeners: {
292 292 expand: function(fieldset, eOpts) {
293 293 if (relatedTable.variable) {
294   - //TODO define min/max auto
295   - var minValue = 10;
296   - var maxValue = 1000;
  294 + if (Ext.Object.isEmpty(relatedTable.minmax)) {
  295 + myDesktopApp.warningMsg('Min/Max '+title+' values are undefined<br/>Arbitrary values are taken');
  296 + var minValue = 10;
  297 + var maxValue = 10000;
  298 + }
  299 + else {
  300 + var minValue = relatedTable.minmax.min;
  301 + var maxValue = relatedTable.minmax.max;
  302 + }
297 303 }
298 304 else {
299 305 var minValue = parseInt(relatedTable.channels[0].min);
... ...