From edd2e65045d0757f0054f22a8931d542efc77a3b Mon Sep 17 00:00:00 2001
From: Hacene SI HADJ MOHAND <hacene.si-hadj-mohand@akka.eu>
Date: Wed, 21 Aug 2019 11:57:32 +0200
Subject: [PATCH] correcting 7100

---
 js/app/views/CatalogUI.js | 86 +++++++++++++++++++++++++++++++++++++++++++-------------------------------------------
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/js/app/views/CatalogUI.js b/js/app/views/CatalogUI.js
index ed31863..3d9ec32 100644
--- a/js/app/views/CatalogUI.js
+++ b/js/app/views/CatalogUI.js
@@ -366,7 +366,7 @@ Ext.define('amdaUI.CatalogUI', {
           filter: { type: 'numeric'}
 				}
 			];
-
+     var pramColumnWidth =120*(1-0.7*(1-1/result.parameters.length));
       Ext.Array.each(result.parameters, function(obj, index) {
 				var field = {
 					name: obj.id
@@ -384,43 +384,43 @@ Ext.define('amdaUI.CatalogUI', {
             });
             column = Ext.apply({}, column, {
               xtype: 'gridcolumn',
-              width : 50. *  parseInt(obj.size),
+              width : pramColumnWidth *  parseInt(obj.size),
               editor: 'textfield',
               filter: { type: 'numeric'}
             });
             break;
-					case 1: //dateTime
-						field = Ext.apply({}, field, {
-							type : 'date',
-							dateFormat: 'Y-m-d\\TH:i:s',
-							convert: function(value,rec) {
-								if (!Ext.isDate(value)){
-									var valueString = new String(value);
-									return new Date(valueString.replace(/\-/g,'\/').replace(/[T|Z]/g,' '));
-								}
-								return value;
-							}
-
-						});
-						column = Ext.apply({}, column, {
-							xtype: 'datecolumn',
-							width : 120,
-							editor : {
-								xtype:'datefield',
-								allowBlank:false,
-								hideTrigger: true,
-								format : 'Y-m-d\\TH:i:s'
-							},
-              filter: { type: 'date',  dateFormat: 'Y-m-d' }
-						});
-						break;
+            case 1: //dateTime
+                    field = Ext.apply({}, field, {
+                            type : 'date',
+                            dateFormat: 'Y-m-d\\TH:i:s',
+                            convert: function(value,rec) {
+                                    if (!Ext.isDate(value)){
+                                            var valueString = new String(value);
+                                            return new Date(valueString.replace(/\-/g,'\/').replace(/[T|Z]/g,' '));
+                                    }
+                                    return value;
+                            }
+
+                    });
+                    column = Ext.apply({}, column, {
+                            xtype: 'datecolumn',
+                            width : 120,
+                            editor : {
+                                    xtype:'datefield',
+                                    allowBlank:false,
+                                    hideTrigger: true,
+                                    format : 'Y-m-d\\TH:i:s'
+                            },
+                    filter: { type: 'date',  dateFormat: 'Y-m-d' }
+                    });
+                    break;
           case 2: //string
             field = Ext.apply({}, field, {
               type: 'string'
             });
             column = Ext.apply({}, column, {
               xtype: 'gridcolumn',
-              width : 50. *  parseInt(obj.size),
+              width : pramColumnWidth *  parseInt(obj.size),
               editor: 'textfield',
               filter: { type: 'string'}
           });
@@ -431,25 +431,25 @@ Ext.define('amdaUI.CatalogUI', {
             });
             column = Ext.apply({}, column, {
               xtype: 'gridcolumn',
-              width : 50. *  parseInt(obj.size),
+              width : pramColumnWidth *  parseInt(obj.size),
               editor: 'textfield',
               filter: { type: 'numeric'}
             });
             break;
-					default:
-						field = Ext.apply({}, field, {
-							type: 'string'
-						});
-						column = Ext.apply({}, column, {
-							xtype: 'gridcolumn',
-							width : 50. *  parseInt(obj.size),
-							editor: 'textfield',
-              filter: { type: 'string'}
-						});
-				}
-				fieldsConfig.push(field);
-				columnsConfig.push(column);
-			});
+        default:
+                field = Ext.apply({}, field, {
+                        type: 'string'
+                });
+                column = Ext.apply({}, column, {
+                        xtype: 'gridcolumn',
+                        width : pramColumnWidth *  parseInt(obj.size),
+                        editor: 'textfield',
+filter: { type: 'string'}
+                });
+}
+fieldsConfig.push(field);
+columnsConfig.push(column);
+});
 
 			var store = Ext.create('Ext.data.Store', {
 				fields: fieldsConfig,
--
libgit2 0.21.2