Commit 7d14e196f98a4d1e1389c5a6a7e54f8d53501be4

Authored by Elena.Budnik
1 parent dbbe0ccd

type definition for Stat Module and Upload cases

Showing 1 changed file with 9 additions and 7 deletions   Show diff stats
js/app/views/VisuUI.js
... ... @@ -106,18 +106,19 @@ Ext.define('amdaUI.VisuUI', {
106 106  
107 107 Ext.Array.each(me.object.get('parameters'), function(obj) {
108 108 index = 'param'+i.toString();
109   - if (obj.type == 0) {
110   - fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name,
111   - convert: function(value, record) {
112   - return parseFloat(value);
113   - }
114   - });
  109 + if (obj.type == 2) {
  110 + fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': string' });
  111 +
115 112 }
116 113 else if (obj.type == 1){
117 114 fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': date' });
118 115 }
119 116 else {
120   - fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': string' });
  117 + fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name,
  118 + convert: function(value, record) {
  119 + return parseFloat(value);
  120 + }
  121 + });
121 122 }
122 123 i++;
123 124 });
... ... @@ -335,6 +336,7 @@ Ext.define('amdaUI.VisuUI', {
335 336 queryMode: 'local',
336 337 displayField: 'text',
337 338 valueField: 'id',
  339 + // tpl:'<tpl for="."><div ext:qtip="{qtip}" class="x-combo-list-item">{Name}</div></tpl>',
338 340 listeners : {
339 341 scope : this,
340 342 change : function(combo, newValue, oldValue) {
... ...