Skip to content

Commit

Permalink
fixes #2187
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Jun 21, 2019
1 parent 2d59e9a commit 0f5e2b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/gwt/org/bbop/apollo/gwt/client/AnnotatorPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.cellview.client.*;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.*;
import com.google.gwt.view.client.*;
import org.bbop.apollo.gwt.client.dto.AnnotationInfo;
Expand Down Expand Up @@ -815,6 +816,15 @@ public void onResponseReceived(Request request, Response response) {
// parse to make sure we return the complete amount
try {
JSONValue returnValue = JSONParser.parseStrict(response.getText());
GWT.log("Return: "+returnValue.toString());
Bootbox.confirm("Success. Reload page to reflect results?", new ConfirmCallback() {
@Override
public void callback(boolean result) {
if(result){
Window.Location.reload();
}
}
});
} catch (Exception e) {
Bootbox.alert(e.getMessage());
}
Expand Down
11 changes: 9 additions & 2 deletions src/gwt/org/bbop/apollo/gwt/client/SequencePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void onResponseReceived(Request request, Response response) {
dataGrid.setRowData(start, SequenceInfoConverter.convertFromJsonArray(jsonArray));
if (MainPanel.getInstance().getCurrentOrganism() != null) {
deleteSequencesButton.setText("Annotation (" + MainPanel.getInstance().getCurrentOrganism().getNumFeatures() + ")");
deleteVariantEffectsButton.setText("All Variant Effects (" + MainPanel.getInstance().getCurrentOrganism().getVariantEffectCount() + ")");
deleteVariantEffectsButton.setText("Variant Effects (" + MainPanel.getInstance().getCurrentOrganism().getVariantEffectCount() + " on all Seq)");
}
}

Expand Down Expand Up @@ -457,7 +457,14 @@ public void callback(boolean result) {
}
JSONObject returnObject = AnnotationRestService.deleteVariantAnnotationsFromSequences(requestCallback, sequenceInfoSet);
loadingDialog.hide();
Bootbox.alert("Variant Effects deleted from " + sequenceInfoSet.size() + " sequences");
Bootbox.confirm("Variant Effects deleted from " + sequenceInfoSet.size() + " sequences. Reload if effect not visible?", new ConfirmCallback() {
@Override
public void callback(boolean result) {
if(result){
Window.Location.reload();
}
}
});
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/gwt/org/bbop/apollo/gwt/client/SequencePanel.ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<h5>Delete</h5>
</gwt:HTML>
</b:Column>
<b:Column size="MD_7" marginTop="8">
<b:Column size="MD_9" marginTop="8">
<b:Button ui:field="deleteSequencesButton" icon="TRASH_O" size="EXTRA_SMALL"
title="Annotations" marginLeft="1" text="Annotations"/>
<b:Button ui:field="deleteVariantEffectsButton" icon="TRASH_O" size="EXTRA_SMALL"
Expand Down

0 comments on commit 0f5e2b2

Please sign in to comment.