/** * 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 */ Ext.define('amdaPlotObj.PlotObjectConfig', { singleton: true, getValueByKey: function (dataList, key) { var value = ''; Ext.each(dataList, function (data) { if (data.key == key) { value = data.value; return; } }); return value; }, fieldComboBox: { key: 'key', value: 'value' }, bgSubstraction: { tableName: "channels-param-info", tableChannels: "channels", tableRelatedDim: 'relatedDim', name: 'Background Substraction', 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 ', dimkey: 'background_sub_dim', dimNullValue: "-1" } }, getParamConfig: function (paramId, onParamConfigLoaded) { AmdaAction.getParamPlotInit({ "paramId": paramId }, function (result, e) { onParamConfigLoaded(result.success, result.data); }); } });