diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java index bdae38d757459bbd4c06e640d5a214979f40184e..2c2f892b02cc5edc029913af643c695a773661f1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java @@ -1041,6 +1041,16 @@ public abstract class Dict public static final String BUTTON_DELETE = "button_delete"; + public static final String BUTTON_DELETE_SAMPLE = "button_delete_sample"; + + public static final String BUTTON_DELETE_EXPERIMENT = "button_delete_experiment"; + + public static final String BUTTON_DELETE_MATERIAL = "button_delete_material"; + + public static final String BUTTON_DELETE_DATA_SET = "button_delete_data_set"; + + public static final String BUTTON_DELETE_PROJECT = "button_delete_project"; + public static final String BUTTON_CONFIGURE = "button_configure"; public static final String BUTTON_FILTERS = "button_filters"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java index 7399b07b012e5b0020c8fb087100bca0d684bd82..4d2f0546d90a74bbb07a2451e82ba9be376b9711 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java @@ -206,4 +206,10 @@ public final class ProjectViewer extends AbstractViewer<IEntityInformationHolder { return DatabaseModificationKind.any(ObjectKind.PROJECT); } + + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_PROJECT); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java index b1827af4d3ca05386e89480395fe47f4a9970f18..8ebe84b0800072063ce4eb1271f975f6bf832d43 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java @@ -126,6 +126,8 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends viewContext.getClientPluginFactoryProvider().registerModuleInitializationObserver(this); } + protected abstract String getDeleteButtonLabel(); + private Button createEditButton() { Button result = new Button(viewContext.getMessage(Dict.BUTTON_EDIT)); @@ -148,7 +150,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends protected Button createDeleteButton(final IDelegatedAction deleteAction) { - Button result = new Button(viewContext.getMessage(Dict.BUTTON_DELETE)); + Button result = new Button(getDeleteButtonLabel()); result.setId(getId() + ID_DELETE_SUFFIX); result.addListener(Events.Select, new Listener<BaseEvent>() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/public/generic-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/public/generic-dictionary.js index 0b487ce375ad4794872184d5325695e727d10a5c..0ba4633c3eb9a1f146eded07a659a7bec0cf5c37 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/public/generic-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/public/generic-dictionary.js @@ -13,7 +13,7 @@ var generic = { // Sample Viewer // - sample_properties_panel_sample_identifier: "Sample", + sample_properties_panel_sample_identifier: "Sample", sample_properties_heading: "Sample Properties", part_of_heading: "Components", derived_samples_heading: "Derived Samples", diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoSampleViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoSampleViewer.java index 5c8f9546bfa984a23194fc441499b392d5698e60..0f9936871660e9740abc1b149f38b35188c702c6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoSampleViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoSampleViewer.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.demo.client.web.client.application; import com.google.gwt.user.client.ui.Widget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractViewer; @@ -72,7 +73,8 @@ public final class DemoSampleViewer extends AbstractViewer<Sample> protected void reloadAllData() { SampleInfoCallback callback = new SampleInfoCallback(getViewContext(), this); - getViewContext().getService().getSampleGenerationInfo(sampleId, getBaseIndexURL(), callback); + getViewContext().getService() + .getSampleGenerationInfo(sampleId, getBaseIndexURL(), callback); } // @@ -110,4 +112,10 @@ public final class DemoSampleViewer extends AbstractViewer<Sample> } } + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_SAMPLE); + } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java index 12882f23d2006420b2bbaf9c07796e7ab7573881..78d1130b129f20e3a048b255ebb084c29494bbb4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java @@ -496,4 +496,9 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl } } + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_DATA_SET); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java index 79d3fd3aa88cfc08eaff3d67e81a09e10fc8a830..be007c4e18763c1facccd2fd130b41d882d12d70 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java @@ -337,4 +337,10 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp { createModificationObserver().update(observedModifications); } + + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_EXPERIMENT); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java index 9311ef27986e5ecbedeb1c61bd59842d69c16892..d0e422243feb49363b809fc7fa46b017e3a53302 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java @@ -298,7 +298,11 @@ abstract public class GenericMaterialViewer extends AbstractViewerWithVerticalSp viewer.setupRemovedEntityView(); } } - } + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_MATERIAL); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java index 8e3bfbb987e2d47465639eac67c2b6c67346e26d..631f9908b22365ad8b50c9e44fc06b893c45bad4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java @@ -161,14 +161,16 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli } addToolBarButton(createDeleteButton(new IDelegatedAction() { - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings( + { "unchecked", "rawtypes" }) public void execute() { final AsyncCallback<Void> callback = isTrashEnabled() ? createDeletionCallback() : createPermanentDeletionCallback(); - new SampleListDeletionConfirmationDialog(getViewContext().getCommonViewContext(), - getOriginalDataAsSingleton(), callback, getOriginalData()).show(); + new SampleListDeletionConfirmationDialog(getViewContext() + .getCommonViewContext(), getOriginalDataAsSingleton(), callback, + getOriginalData()).show(); } })); addToolBarButton(createRevertDeletionButton(new IDelegatedAction() @@ -202,8 +204,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli final Sample generator = sampleGeneration.getParent(); final IViewContext<?> context = getViewContext(); - final SectionsPanel container = - new SectionsPanel(context.getCommonViewContext(), getId()); + final SectionsPanel container = new SectionsPanel(context.getCommonViewContext(), getId()); container.setDisplayID(DisplayTypeIDGenerator.GENERIC_SAMPLE_VIEWER, displayIdSuffix); List<TabContent> additionalPanels = createAdditionalSectionPanels(); for (TabContent panel : additionalPanels) @@ -220,8 +221,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli parentSamplesSection = new ParentSamplesSection(context, generator); container.addSection(parentSamplesSection); // Data Sets - dataSetSection = - new SampleDataSetsSection(context, sampleId, generator.getSampleType()); + dataSetSection = new SampleDataSetsSection(context, sampleId, generator.getSampleType()); container.addSection(dataSetSection); // Attachments @@ -522,7 +522,11 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli genericSampleViewer.setupRemovedEntityView(); } } - } + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_SAMPLE); + } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js index 204366730d2a06930e1174e1c8d3405054477d23..65351df382fc28f6d719114037a7d94b68148615 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js @@ -146,6 +146,11 @@ var common = { button_browse: "Browse", button_view: "View", button_delete: "Delete", + button_delete_sample: "Delete Sample", + button_delete_experiment: "Delete Experiment", + button_delete_material: "Delete Material", + button_delete_data_set: "Delete Data Set", + button_delete_project: "Delete Project", button_configure: "Settings", button_filters: "Filters", button_upload_data_via_cifex: "Upload Data", diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/Dict.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/Dict.java index d32f0f32dec5776d9a44331a1fc6bb4d3ffd50ab..1cb7e86bd0aa4470530d740293ee69eee27302d9 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/Dict.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/Dict.java @@ -90,6 +90,8 @@ public class Dict // Protein Detail View public static final String PROBABILITY = "protein_probability"; + public static final String BUTTON_DELETE_PROTEIN = "button_delete_protein"; + // SampleAbundance Browser public static final String ABUNDANCE = "abundance"; @@ -104,6 +106,4 @@ public class Dict public static final String COPY_DATA_SETS_MESSAGE = "copy_data_sets_message"; public static final String COPY_DATA_SETS_DATA_SET_TYPE_FIELD = "copy_data_sets_data_set_type_field"; - - } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java index 7daf1f91776844d262e85e15c39c14b5e2222496..d3c6c4033b51293cf40d7541f854d6941c70fa03 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinViewer.java @@ -436,4 +436,10 @@ public class ProteinViewer extends AbstractViewerWithVerticalSplit<IEntityInform } + @Override + protected String getDeleteButtonLabel() + { + return viewContext.getMessage(Dict.BUTTON_DELETE_PROTEIN); + } + } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/public/phosphonetx-dictionary.js b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/public/phosphonetx-dictionary.js index 763d662e41257c551315a7d0d2ae0c5e4efc5615..fbc798cf09c705bb8f7ca0b584f340cffcd8d170 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/public/phosphonetx-dictionary.js +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/public/phosphonetx-dictionary.js @@ -40,6 +40,7 @@ var phosphonetx = { sequence_name: "Sequence Reference", false_discovery_rate_column: "FDR (Protein Prophet)", protein_probability: "Probability (Protein Prophet)", + button_delete_protein: "Delete Protein", // ProteinRelatedSampleGrid openbis_protein_related_sample_grid_main_SAMPLE_IDENTIFIER: "Identifier",