Commit 9b729ba57dc1a5cac261e4fb373f4b133dcecdba

Authored by Hacene SI HADJ MOHAND
1 parent bc4ec521

adding warning messages on sauvaud plot

Showing 1 changed file with 7 additions and 1 deletions   Show diff stats
js/app/views/PlotComponents/PlotParamForm.js
... ... @@ -64,6 +64,11 @@ Ext.define('amdaPlotComp.PlotParamForm', {
64 64 this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotOrbitSerieForm({ id: formId }));
65 65 break;
66 66 case 'sauvaud':
  67 + if(this.object.get('type') !=2){
  68 + myDesktopApp.warningMsg('Sauvaud Plot requires <b>2D Parameter</b> ');
  69 + }else if(this.object.get('dim1-index') != '*' || this.object.get('dim2-index') != '*' ){
  70 + myDesktopApp.warningMsg('Sauvaud Plot requires the selection of <b>All Arguments</b> in both directions');
  71 + }
67 72 this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotSauvaudForm({ id: formId }));
68 73 break;
69 74 case 'spectro':
... ... @@ -117,7 +122,8 @@ Ext.define(&#39;amdaPlotComp.PlotParamForm&#39;, {
117 122  
118 123 onChangeParamArgs: function (uiScope, args_key, newValue, oldValue, isTemplateArg) {
119 124 if ((uiScope.isFirstMsg) && (uiScope.object.get('type') == 2) && (uiScope.object.get('dim1-sum-type') == 0) && (uiScope.object.get('dim2-sum-type') == 0) &&
120   - (uiScope.object.get('dim1-index') == '*') && (uiScope.object.get('dim2-index') == '*')) {
  125 + (uiScope.object.get('dim1-index') == '*') && (uiScope.object.get('dim2-index') == '*') && (uiScope.object.get('param-drawing-type') != 'sauvaud')) {
  126 + console.log(uiScope.object);
121 127 uiScope.isFirstMsg = false;
122 128 myDesktopApp.warningMsg('If argument <i>All</i> is set for both dimensions output will be the total sum <b>(not spectra!)</b>');
123 129 }
... ...