Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/firefly/js/ui/CatalogSearchMethodType.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,18 @@ function renderTargetPanel(groupKey, searchType) {
const visible = searchType === SpatialMethod.Cone.value || searchType === SpatialMethod.Box.value || searchType === SpatialMethod.Elliptical.value;
return (
visible && <div className='intarget'>
<TargetPanel wrapperStyle={{width:'200px'}} labelWidth={90} groupKey={groupKey}/>
<ListBoxInputField
fieldKey='targettry'
options={[{label: 'Try NED then Simbad', value: 'NED'},
<TargetPanel labelWidth={100} groupKey={groupKey}>
<ListBoxInputField
fieldKey='targettry'
options={[{label: 'Try NED then Simbad', value: 'NED'},
{label: 'Try Simbad then NED', value: 'simbad'}
]}
multiple={false}
label=''
labelWidth={3}
/>
multiple={false}
label=''
labelWidth={3}
wrapperStyle={{display: 'inline-block'}}
/>
</TargetPanel>
</div>
);

Expand Down
25 changes: 14 additions & 11 deletions src/firefly/js/ui/TargetPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ class TargetPanelView extends Component {
}

render() {
const {showHelp, feedback, valid, message, onChange, value, labelWidth}= this.props;
const {showHelp, feedback, valid, message, onChange, value, labelWidth, children}= this.props;
var positionField = (<InputFieldView
valid={valid}
visible= {true}
message={message}
onChange={onChange}
label='Name or Position:'
value={value}
tooltip='Enter a target'
labelWidth={labelWidth}
/>);
positionField = children ? (<div style={{display: 'flex'}}>{positionField} {children}</div>) : positionField;

return (
<div>
<InputFieldView
valid={valid}
visible= {true}
message={message}
onChange={onChange}
label='Name or Position:'
value={value}
tooltip='Enter a target'
labelWidth={labelWidth}
/>
{positionField}
<TargetFeedback showHelp={showHelp} feedback={feedback}/>
</div>
);
Expand Down
36 changes: 6 additions & 30 deletions src/firefly/js/ui/VoSearchPanel.css
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
div.vopanel {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 750px;
background: white;
/*
border-left: 20px solid #c8c8c8;
border-right: 20px solid #c8c8c8;
*/
}
div.section {
margin-top: 10px;
padding-left: 15%;
}

div.intarget {
height: 75px;
display: flex;
justify-content: flex-start;
align-items: flex-start;
width: 70%;
margin: auto;
}

div.size {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 30%;
height: 60px;
}

div.voarea {
margin-top: 10px;
padding-left: 15%;
.vopanel__wrapper {
width: 750px;
padding: 20px 0;
box-sizing: border-box;
}

47 changes: 25 additions & 22 deletions src/firefly/js/ui/VoSearchPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ export class VoSearchPanel extends React.Component {
render() {
const fields = this.state;
return (
<div className={'vopanel'}>
<div className={'section'}>
{targetPanelArea()}
</div>
<div className={'size'}>
{ sizeArea()}
</div>
<div className={'voarea'}>
{ voSearchArea() }
<div style={{padding:'20px 0 20px 0'}}>
<a target='_blank' href='http://nvo.stsci.edu/vor10/index.aspx'>Find Astronomical Data
Resources </a>
<div className='vopanel__wrapper'>
<div className='vopanel'>
<div>
{targetPanelArea()}
</div>
<div style={{height: 60}}>
{ sizeArea()}
</div>
<div style={{marginTop: 20}}>
{ voSearchArea() }
<div style={{padding:'20px 0 20px 0'}}>
<a target='_blank' href='http://nvo.stsci.edu/vor10/index.aspx'>Find Astronomical Data
Resources </a>
</div>
</div>
</div>
</div>
Expand All @@ -55,22 +57,23 @@ export class VoSearchPanel extends React.Component {

function targetPanelArea() {
return (
<div className={'intarget'}>
<TargetPanel groupKey={gkey} labelWidth={120}/>
<ListBoxInputField
fieldKey='targettry'
initialState={{
<div >
<TargetPanel groupKey={gkey} labelWidth={100}>
<ListBoxInputField
fieldKey='targettry'
initialState={{
fieldKey:'targettry',
label : '',
labelWidth: 0
}}
label={''}
options={[
label={''}
options={[
{label: 'Try NED then Simbad', value: 'NED'},
{label: 'Try Simbad then NED', value: 'simbad'}
]}
multiple={false}
/>
multiple={false}
/>
</TargetPanel>
</div>
);
}
Expand Down Expand Up @@ -99,7 +102,7 @@ var voSearchArea = () => {
value: '',
tooltip:'Enter the VO cone search URL directly (or use the link below to open external NVO search and find the VO cone search URL)',
label:'Cone Search URL:',
labelWidth : 90,
labelWidth : 100,
nullAllowed:false,
/*validator: {urlValidator}*/
}}
Expand Down