Blame view

js/app/models/PlotObjects/PlotObjectConfig.js 1.5 KB
437c4dbc   Benjamin Renard   First implementat...
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * Project      : AMDA-NG
 * Name         : PlotObjectConfig.js
 * @class   amdaPlotObj.PlotObjectConfig
 * @extends Ext.data.Model
 * @brief   Plot Request object configuration 
 * @author  Benjamin Renard
 * @version $Id: PlotObjectConfig.js benjamin $
 ******************************************************************************
 *    FT Id     :   Date   : Name - Description
 ******************************************************************************
 *	:           :21/07/2015: BRE  - file creation
 */
0fc6f7a1   Menouard AZIB   Add type combobox...
14
15


437c4dbc   Benjamin Renard   First implementat...
16
17
Ext.define('amdaPlotObj.PlotObjectConfig', {
	singleton: true,
0fc6f7a1   Menouard AZIB   Add type combobox...
18

0fc6f7a1   Menouard AZIB   Add type combobox...
19
	getValueByKey: function (dataList, key) {
dbb7bcbe   Benjamin Renard   Add curves defint...
20
21
		var value = '';
		Ext.each(dataList, function (data) {
0fc6f7a1   Menouard AZIB   Add type combobox...
22
			if (data.key == key) {
dbb7bcbe   Benjamin Renard   Add curves defint...
23
24
25
26
27
28
				value = data.value;
				return;
			}
		});
		return value;
	},
0fc6f7a1   Menouard AZIB   Add type combobox...
29

0fc6f7a1   Menouard AZIB   Add type combobox...
30

4dbd97ec   Menouard AZIB   Goal is reached b...
31
32
33
	fieldComboBox: {
		key: 'key',
		value: 'value'
0fc6f7a1   Menouard AZIB   Add type combobox...
34
35
36
	},

	bgSubstraction: {
4dbd97ec   Menouard AZIB   Goal is reached b...
37
38
39
		tableName: "channels-param-info",
		tableChannels: "channels",
		tableRelatedDim: 'relatedDim',
0fc6f7a1   Menouard AZIB   Add type combobox...
40
		name: 'Background Substraction',
4dbd97ec   Menouard AZIB   Goal is reached b...
41
42
43
44
45
46
47
48
49
50
51
52
53
		type: {
			label: "Type ",
			key: "background_sub_type",
			values: {
				bychannel: "By Channel",
				fixedvalue: "Fixed Value"
			}
		},
		value: {
			textinputlabel: "Fixed value ",
			key: "background_sub_value",
			textinputkey: "background_sub_by_value",
			dimlabel: 'Dim ',
c3e75a07   Menouard AZIB   IHM is finished a...
54
			dimkey: 'background_sub_dim',
86615884   Menouard AZIB   Quand on passe d'...
55
			dimNullValue: "-1"
4dbd97ec   Menouard AZIB   Goal is reached b...
56
		}
0fc6f7a1   Menouard AZIB   Add type combobox...
57
	},
0fc6f7a1   Menouard AZIB   Add type combobox...
58
59
	getParamConfig: function (paramId, onParamConfigLoaded) {
		AmdaAction.getParamPlotInit({ "paramId": paramId }, function (result, e) {
ced82260   Benjamin Renard   Get initial plot ...
60
61
62
			onParamConfigLoaded(result.success, result.data);
		});
	}
28660257   Benjamin Renard   Reduce default ma...
63
});