Skip to content

Commit

Permalink
removed GFF3 Tabix canvas and hide index options
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Feb 26, 2019
1 parent 2c554b3 commit 5accb2d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
22 changes: 17 additions & 5 deletions src/gwt/org/bbop/apollo/gwt/client/TrackPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.gwtbootstrap3.client.ui.constants.Toggle;
import org.gwtbootstrap3.extras.bootbox.client.Bootbox;
import org.gwtbootstrap3.extras.bootbox.client.callback.ConfirmCallback;
import org.gwtbootstrap3.extras.bootbox.client.callback.SimpleCallback;
import org.gwtbootstrap3.extras.toggleswitch.client.ui.ToggleSwitch;

import java.util.ArrayList;
Expand Down Expand Up @@ -307,9 +306,12 @@ private TreeItem generateTreeItem(JSONObject jsonObject) {
private void setTrackTypeAndUpdate(TrackTypeEnum trackType) {
configurationButton.setText(trackType.toString());
configuration.setText(TrackConfigurationTemplate.generateForTypeAndKey(trackType, trackFileName.getText()).toString());
showOtherOptions();
showFileOptions(trackType);
if (trackType.isIndexed()) {
showIndexOptions();
showIndexOptions(trackType);
}
else{
hideIndexOptions();
}
}

Expand Down Expand Up @@ -355,7 +357,7 @@ public void saveNewTrackButtonHandler(ClickEvent clickEvent) {
}
}

private void showOtherOptions() {
private void showFileOptions(TrackTypeEnum typeEnum) {
saveNewTrack.setEnabled(true);

trackNameHTML.setVisible(true);
Expand All @@ -366,11 +368,21 @@ private void showOtherOptions() {

trackFileHTML.setVisible(true);
uploadTrackFile.setVisible(true);

trackFileHTML.setText("*."+typeEnum.getSuffix());
}

private void showIndexOptions() {
private void hideIndexOptions() {
trackFileIndexHTML.setVisible(false);
uploadTrackFileIndex.setVisible(false);
trackFileIndexHTML.setText("");
}

private void showIndexOptions(TrackTypeEnum typeEnum) {
trackFileIndexHTML.setVisible(true);
uploadTrackFileIndex.setVisible(true);

trackFileIndexHTML.setText("*."+typeEnum.getSuffixIndex());
}

private void resetNewTrackModel() {
Expand Down
10 changes: 5 additions & 5 deletions src/gwt/org/bbop/apollo/gwt/client/TrackPanel.ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<b:AnchorListItem ui:field="selectBigWig">BigWig HeatMap</b:AnchorListItem>
<b:AnchorListItem ui:field="selectBigWigXY">BigWig XY</b:AnchorListItem>
<b:AnchorListItem ui:field="selectGFF3">GFF3 </b:AnchorListItem>
<b:AnchorListItem ui:field="selectGFF3Canvas">GFF3 Canvas</b:AnchorListItem>
<!--<b:AnchorListItem ui:field="selectGFF3Canvas">GFF3 Canvas</b:AnchorListItem>-->
<b:AnchorListItem ui:field="selectGFF3Tabix">GFF3 Tabix</b:AnchorListItem>
<b:AnchorListItem ui:field="selectGFF3TabixCanvas">GFF3 Tabix Canvas</b:AnchorListItem>
<!--<b:AnchorListItem ui:field="selectGFF3TabixCanvas">GFF3 Tabix Canvas</b:AnchorListItem>-->
<b:AnchorListItem ui:field="selectVCF">VCF</b:AnchorListItem>
<b:AnchorListItem ui:field="selectVCFCanvas">VCF Canvas</b:AnchorListItem>
</b:DropDownMenu>
Expand All @@ -65,13 +65,13 @@
<gwt:HTML text="Track Name" styleName="{style.areaFile}" visible="false" ui:field="trackNameHTML"/>
<gwt:TextBox ui:field="trackFileName" name="trackFileName" visible="false"/>

<gwt:HTML text="Track Configuration JSON (required)" styleName="{style.areaFile}" visible="false" ui:field="trackConfigurationHTML"/>
<gwt:HTML text="Track Configuration JSON" styleName="{style.areaFile}" visible="false" ui:field="trackConfigurationHTML"/>
<gwt:TextArea ui:field="configuration" name="trackConfig" visible="false"/>

<gwt:HTML text="Track File (*.bam,*.vcf.gz,*.bw,*gff.gz" visible="false" ui:field="trackFileHTML"/>
<gwt:HTML visible="false" ui:field="trackFileHTML"/>
<gwt:FileUpload ui:field="uploadTrackFile" name="trackFile" visible="false"/>

<gwt:HTML text="Track File Index (*.bam.bai,*.vcf.gz.tbi,*gff3.gz.tbi)" visible="false" ui:field="trackFileIndexHTML"/>
<gwt:HTML visible="false" ui:field="trackFileIndexHTML"/>
<gwt:FileUpload ui:field="uploadTrackFileIndex" name="trackFileIndex" visible="false"/>
</gwt:FlowPanel>
</b:ModalBody>
Expand Down

0 comments on commit 5accb2d

Please sign in to comment.