Skip to content

Commit 6804c96

Browse files
authored
Merge pull request #314 from Caltech-IPAC/DM-9500-FITSDownLoagBugs
DM-9550:
2 parents cdf40eb + 1dd3371 commit 6804c96

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

src/firefly/js/ui/FitsDownloadDialog.jsx

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* propType: define all the property variable for the component
66
* this.plot, this.plotSate are the class global variables
77
*
8+
* Work History
9+
*
10+
* [Feb-22-2017 LZ]
11+
* DM-9500
12+
* DM-8963
813
*/
914
import React from 'react';
1015
import {dispatchShowDialog} from '../core/ComponentCntlr.js';
@@ -37,7 +42,7 @@ function getDialogBuilder() {
3742
return () => {
3843
if (!popup) {
3944
const popup = (
40-
<PopupPanel title={'Fits Download Dialog'}>
45+
<PopupPanel title={'FITS Download Dialog'}>
4146
<FitsDownloadDialog groupKey={'FITS_DOWNLOAD_FORM'}/>
4247
</PopupPanel>
4348
);
@@ -85,7 +90,8 @@ function getInitialPlotState() {
8590
colors[i] = 'Blue';
8691
break;
8792
default:
88-
} break;
93+
break;
94+
}
8995

9096
}
9197

@@ -175,6 +181,13 @@ function renderOperationOption(hasOperation) {
175181

176182
function renderThreeBand(hasThreeColorBand, colors) {
177183

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+
178191
var rightColumn={display: 'inline-block', paddingLeft:18};
179192
var leftColumn;
180193

@@ -194,7 +207,7 @@ function renderThreeBand(hasThreeColorBand, colors) {
194207

195208
var optionArray=[];
196209
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]};
198211
}
199212

200213
return (
@@ -231,9 +244,9 @@ function FitsDownloadDialogForm() {
231244
var renderThreeBandButtons = renderThreeBand(hasThreeColorBand, colors);//true, ['Green','Red', 'Blue']);
232245

233246

234-
var leftColumn = { display: 'inline-block', paddingLeft:75, verticalAlign:'middle', paddingBottom:30};
247+
var leftColumn = { display: 'inline-block', paddingLeft:63, verticalAlign:'middle', paddingBottom:30};
235248

236-
var rightColumn = {display: 'inline-block', paddingLeft:18};
249+
var rightColumn = {display: 'inline-block', paddingLeft:14};
237250

238251
var dialogStyle = { minWidth : 300, minHeight: 100 , padding:'15px 5px 5px 5px'};
239252
return (
@@ -245,7 +258,7 @@ function FitsDownloadDialogForm() {
245258
<RadioGroupInputField
246259
initialState={{
247260
tooltip: 'Please select an option',
248-
value : 'fits'
261+
value : 'FITS'
249262
//move the label as a InputFieldLabel
250263
}}
251264
options={ [
@@ -255,7 +268,9 @@ function FitsDownloadDialogForm() {
255268
]}
256269
alignment={'vertical'}
257270
fieldKey='fileType'
271+
258272
/>
273+
259274
</div>
260275

261276

@@ -326,6 +341,7 @@ function resultsSuccess(request, plot) {
326341
}
327342
if (key === 'threeBandColor') {
328343
bandSelect = value;
344+
329345
}
330346
if (key === 'operationOption') {
331347
whichOp = value;
@@ -334,7 +350,7 @@ function resultsSuccess(request, plot) {
334350

335351
var band = Band.NO_BAND;
336352
if (bandSelect) {
337-
band = Band[bandSelect];
353+
band = Band[bandSelect.toUpperCase()];
338354
}
339355

340356

0 commit comments

Comments
 (0)