5
5
* propType: define all the property variable for the component
6
6
* this.plot, this.plotSate are the class global variables
7
7
*
8
+ * Work History
9
+ *
10
+ * [Feb-22-2017 LZ]
11
+ * DM-9500
12
+ * DM-8963
8
13
*/
9
14
import React from 'react' ;
10
15
import { dispatchShowDialog } from '../core/ComponentCntlr.js' ;
@@ -37,7 +42,7 @@ function getDialogBuilder() {
37
42
return ( ) => {
38
43
if ( ! popup ) {
39
44
const popup = (
40
- < PopupPanel title = { 'Fits Download Dialog' } >
45
+ < PopupPanel title = { 'FITS Download Dialog' } >
41
46
< FitsDownloadDialog groupKey = { 'FITS_DOWNLOAD_FORM' } />
42
47
</ PopupPanel >
43
48
) ;
@@ -85,7 +90,8 @@ function getInitialPlotState() {
85
90
colors [ i ] = 'Blue' ;
86
91
break ;
87
92
default :
88
- } break ;
93
+ break ;
94
+ }
89
95
90
96
}
91
97
@@ -175,6 +181,13 @@ function renderOperationOption(hasOperation) {
175
181
176
182
function renderThreeBand ( hasThreeColorBand , colors ) {
177
183
184
+ const fieldKey = FieldGroupUtils . getGroupFields ( 'FITS_DOWNLOAD_FORM' ) ;
185
+
186
+ if ( fieldKey && ( fieldKey . fileType . value === 'png' || fieldKey . fileType . value === 'reg' ) ) {
187
+ return < br /> ;
188
+ }
189
+
190
+
178
191
var rightColumn = { display : 'inline-block' , paddingLeft :18 } ;
179
192
var leftColumn ;
180
193
@@ -194,7 +207,7 @@ function renderThreeBand(hasThreeColorBand, colors) {
194
207
195
208
var optionArray = [ ] ;
196
209
for ( var i = 0 ; i < colors . length ; i ++ ) {
197
- optionArray [ i ] = { label : colors [ i ] , value : colors [ i ] + 'Radio' } ;
210
+ optionArray [ i ] = { label : colors [ i ] , value : colors [ i ] } ;
198
211
}
199
212
200
213
return (
@@ -231,9 +244,9 @@ function FitsDownloadDialogForm() {
231
244
var renderThreeBandButtons = renderThreeBand ( hasThreeColorBand , colors ) ; //true, ['Green','Red', 'Blue']);
232
245
233
246
234
- var leftColumn = { display : 'inline-block' , paddingLeft :75 , verticalAlign :'middle' , paddingBottom :30 } ;
247
+ var leftColumn = { display : 'inline-block' , paddingLeft :63 , verticalAlign :'middle' , paddingBottom :30 } ;
235
248
236
- var rightColumn = { display : 'inline-block' , paddingLeft :18 } ;
249
+ var rightColumn = { display : 'inline-block' , paddingLeft :14 } ;
237
250
238
251
var dialogStyle = { minWidth : 300 , minHeight : 100 , padding :'15px 5px 5px 5px' } ;
239
252
return (
@@ -245,7 +258,7 @@ function FitsDownloadDialogForm() {
245
258
< RadioGroupInputField
246
259
initialState = { {
247
260
tooltip : 'Please select an option' ,
248
- value : 'fits '
261
+ value : 'FITS '
249
262
//move the label as a InputFieldLabel
250
263
} }
251
264
options = { [
@@ -255,7 +268,9 @@ function FitsDownloadDialogForm() {
255
268
] }
256
269
alignment = { 'vertical' }
257
270
fieldKey = 'fileType'
271
+
258
272
/>
273
+
259
274
</ div >
260
275
261
276
@@ -326,6 +341,7 @@ function resultsSuccess(request, plot) {
326
341
}
327
342
if ( key === 'threeBandColor' ) {
328
343
bandSelect = value ;
344
+
329
345
}
330
346
if ( key === 'operationOption' ) {
331
347
whichOp = value ;
@@ -334,7 +350,7 @@ function resultsSuccess(request, plot) {
334
350
335
351
var band = Band . NO_BAND ;
336
352
if ( bandSelect ) {
337
- band = Band [ bandSelect ] ;
353
+ band = Band [ bandSelect . toUpperCase ( ) ] ;
338
354
}
339
355
340
356
0 commit comments