Commit ad149612096d8aabcef4a3c64c702b9633bcef3a

Authored by Benjamin Renard
1 parent f8d37259

Add tool tip

generic_data/Functions/functions_args_list.xml
... ... @@ -2,8 +2,9 @@
2 2 <argslist xml:id="argslist">
3 3 <arglist id="frames">
4 4 <values>
5   - <value key="GSM" value="GSM" info="Info GSM"/>
6   - <value key="GSE" value="GSE" info="Info GSE"/>
  5 + <value key="GSM" value="GSM" info="Geocentric Solar Magnetospheric"/>
  6 + <value key="GSE" value="GSE" info="Geocentric Solar Ecliptic"/>
  7 +
7 8 </values>
8 9 </arglist>
9 10 </argslist>
... ...
js/app/views/CalculatorUI.js
... ... @@ -94,11 +94,11 @@ Ext.define(&#39;amdaUI.PromptArgsWin&#39;, {
94 94  
95 95 var listData = [];
96 96 valuesStore.each(function (item) {
97   - listData.push({'key': item.get('key'), 'value': item.get('value')});
  97 + listData.push({'key': item.get('key'), 'value': item.get('value'), 'info': item.get('info')});
98 98 });
99 99  
100 100 var comboStore = Ext.create('Ext.data.Store', {
101   - fields: ['key', 'value'],
  101 + fields: ['key', 'value', 'info'],
102 102 data : listData
103 103 });
104 104  
... ... @@ -110,7 +110,12 @@ Ext.define(&#39;amdaUI.PromptArgsWin&#39;, {
110 110 queryMode: 'local',
111 111 displayField: 'value',
112 112 valueField: 'key',
113   - editable: false
  113 + editable: false,
  114 + listConfig: {
  115 + getInnerTpl: function() {
  116 + return '<div data-qtip="{info}">{value} </div>';
  117 + }
  118 + }
114 119 });
115 120  
116 121 if (defaultVal != "") {
... ...