From 7d14e196f98a4d1e1389c5a6a7e54f8d53501be4 Mon Sep 17 00:00:00 2001 From: Elena.Budnik <ebudnik@irap.omp.eu> Date: Thu, 8 Feb 2018 12:18:17 +0100 Subject: [PATCH] type definition for Stat Module and Upload cases --- js/app/views/VisuUI.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/js/app/views/VisuUI.js b/js/app/views/VisuUI.js index 49fdb81..73d5247 100644 --- a/js/app/views/VisuUI.js +++ b/js/app/views/VisuUI.js @@ -106,18 +106,19 @@ Ext.define('amdaUI.VisuUI', { Ext.Array.each(me.object.get('parameters'), function(obj) { index = 'param'+i.toString(); - if (obj.type == 0) { - fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name, - convert: function(value, record) { - return parseFloat(value); - } - }); + if (obj.type == 2) { + fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': string' }); + } else if (obj.type == 1){ fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': date' }); } else { - fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name + ': string' }); + fields[i] = Ext.create('Ext.data.Field', { name : index, id: index, text : obj.name, + convert: function(value, record) { + return parseFloat(value); + } + }); } i++; }); @@ -335,6 +336,7 @@ Ext.define('amdaUI.VisuUI', { queryMode: 'local', displayField: 'text', valueField: 'id', + // tpl:'<tpl for="."><div ext:qtip="{qtip}" class="x-combo-list-item">{Name}</div></tpl>', listeners : { scope : this, change : function(combo, newValue, oldValue) { -- libgit2 0.21.2