Skip to content

Commit

Permalink
made copy of
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Feb 5, 2019
1 parent 06a9428 commit 91bab3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gwt/org/bbop/apollo/gwt/client/OrganismPanel.java
Expand Up @@ -32,8 +32,8 @@
import org.bbop.apollo.gwt.client.resources.TableResources;
import org.bbop.apollo.gwt.client.rest.OrganismRestService;
import org.gwtbootstrap3.client.ui.Button;
import org.gwtbootstrap3.client.ui.TextBox;
import org.gwtbootstrap3.client.ui.CheckBox;
import org.gwtbootstrap3.client.ui.TextBox;
import org.gwtbootstrap3.extras.bootbox.client.Bootbox;
import org.gwtbootstrap3.extras.bootbox.client.callback.ConfirmCallback;

Expand Down Expand Up @@ -209,7 +209,7 @@ public void loadOrganismInfo(OrganismInfo organismInfo) {
setTextEnabled(organismInfo.isEditable());

GWT.log("loadOrganismInfo setValue " + organismInfo.getPublicMode());
Boolean isEditable = organismInfo.isEditable()||MainPanel.getInstance().isCurrentUserAdmin();
Boolean isEditable = organismInfo.isEditable() || MainPanel.getInstance().isCurrentUserAdmin();

organismName.setText(organismInfo.getName());
organismName.setEnabled(isEditable);
Expand All @@ -229,7 +229,7 @@ public void loadOrganismInfo(OrganismInfo organismInfo) {
publicMode.setValue(organismInfo.getPublicMode());
publicMode.setEnabled(isEditable);

organismIdLabel.setHTML("Internal ID: " +organismInfo.getId());
organismIdLabel.setHTML("Internal ID: " + organismInfo.getId());

nonDefaultTranslationTable.setText(organismInfo.getNonDefaultTranslationTable());
nonDefaultTranslationTable.setEnabled(isEditable);
Expand Down Expand Up @@ -334,7 +334,7 @@ public void handleSaveNewOrganism(ClickEvent clickEvent) {
public void handleDuplicateOrganism(ClickEvent clickEvent) {
duplicateButton.setEnabled(MainPanel.getInstance().isCurrentUserAdmin());
OrganismInfo organismInfo = singleSelectionModel.getSelectedObject();
organismInfo.setName(organismInfo.getName() + " Copy");
organismInfo.setName("Copy of " + organismInfo.getName());
OrganismRestService.createOrganism(new UpdateInfoListCallback(), organismInfo);
setNoSelection();
}
Expand All @@ -353,7 +353,7 @@ public void handleDeleteOrganism(ClickEvent clickEvent) {
OrganismInfo organismInfo = singleSelectionModel.getSelectedObject();
if (organismInfo == null) return;
if (organismInfo.getNumFeatures() > 0) {
new ErrorDialog("Cannot delete organism '" + organismInfo.getName() + "'", "You must first remove " + singleSelectionModel.getSelectedObject().getNumFeatures() + " annotations before deleting organism '"+organismInfo.getName()+"'. Please see our <a href='../WebServices/'>Web Services API</a> from the 'Help' menu for more details on how to perform this operation in bulk.", true, true);
new ErrorDialog("Cannot delete organism '" + organismInfo.getName() + "'", "You must first remove " + singleSelectionModel.getSelectedObject().getNumFeatures() + " annotations before deleting organism '" + organismInfo.getName() + "'. Please see our <a href='../WebServices/'>Web Services API</a> from the 'Help' menu for more details on how to perform this operation in bulk.", true, true);
return;
}
Bootbox.confirm("Are you sure you want to delete organism " + singleSelectionModel.getSelectedObject().getName() + "?", new ConfirmCallback() {
Expand Down

0 comments on commit 91bab3d

Please sign in to comment.