diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/NamedInputStream.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/NamedInputStream.java index 1d787990465f075e15749616372e411063c381a1..e9c2bc59aa7cf8788171280e3af0b20c998da03e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/NamedInputStream.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/NamedInputStream.java @@ -36,7 +36,6 @@ public class NamedInputStream { this.stream = stream; this.originalName = originalName; - // FIXME: do not require this.bytes = bytes; } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java index cdb674c35f81b3f902ada2cb29264de21657adde..f4dc178c5da1721d6953eb88b7688cdf39eb63b8 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java @@ -28,6 +28,8 @@ public final class Dict extends ch.systemsx.cisd.openbis.generic.client.web.clie public static final String IMPORT_SCHEDULED_MESSAGE = "import_scheduled"; + public static final String REGISTER = "register"; + private Dict() { // Can not be instantiated. diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/sample/LibrarySampleBatchRegistrationForm.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/sample/LibrarySampleBatchRegistrationForm.java index c252954821f91666d3c30b16e77c23765c1c910e..1035500f14cc7f22efd626b2e193b9ce0fc49e5c 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/sample/LibrarySampleBatchRegistrationForm.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/sample/LibrarySampleBatchRegistrationForm.java @@ -17,9 +17,9 @@ package ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.sample; import com.extjs.gxt.ui.client.widget.form.FormPanel; -import com.extjs.gxt.ui.client.widget.form.Radio; -import com.extjs.gxt.ui.client.widget.form.RadioGroup; +import com.extjs.gxt.ui.client.widget.form.SimpleComboBox; import com.extjs.gxt.ui.client.widget.form.TextField; +import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction; import com.google.gwt.user.client.ui.AbstractImagePrototype; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; @@ -48,6 +48,12 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.LibraryRegistr public final class LibrarySampleBatchRegistrationForm extends AbstractSampleBatchRegistrationForm { + private static final String PLATES = "Plates"; + + private static final String OLIGOS_PLATES = "Oligos + Plates"; + + private static final String GENES_OLIGOS_PLATES = "Genes + Oligos + Plates"; + private static final String SESSION_KEY = "qiagen-library-sample-batch-registration"; private final ExperimentChooserFieldAdaptor experimentChooser; @@ -56,13 +62,7 @@ public final class LibrarySampleBatchRegistrationForm extends AbstractSampleBatc private final PlateGeometrySelectionWidget plateGeometryField; - private final RadioGroup scopeField; - - private Radio genesOligosPlatesRadio; - - private Radio oligosPlatesRadio; - - private Radio platesRadio; + private final SimpleComboBox<String> scopeField; private final TextField<String> emailField; @@ -99,26 +99,22 @@ public final class LibrarySampleBatchRegistrationForm extends AbstractSampleBatc return field; } - // FIXME: change to combobox - private RadioGroup createScope() - { - RadioGroup group = new RadioGroup(); - group.setFieldLabel("Register"); - genesOligosPlatesRadio = createCheckBox("Genes + Oligos + Plates"); - oligosPlatesRadio = createCheckBox("Oligos + Plates"); - platesRadio = createCheckBox("Plates"); - group.add(genesOligosPlatesRadio); - group.add(oligosPlatesRadio); - group.add(platesRadio); - group.setValue(genesOligosPlatesRadio); - return group; - } - - private Radio createCheckBox(String label) + private SimpleComboBox<String> createScope() { - Radio checkBox = new Radio(); - checkBox.setBoxLabel(label); - return checkBox; + SimpleComboBox<String> options = new SimpleComboBox<String>(); + options.add(GENES_OLIGOS_PLATES); + options.add(OLIGOS_PLATES); + options.add(PLATES); + options + .setFieldLabel(viewContext + .getMessage(ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.Dict.REGISTER)); + options.setTriggerAction(TriggerAction.ALL); + options.setForceSelection(true); + options.setEditable(false); + options.setAllowBlank(false); + options.setSimpleValue(GENES_OLIGOS_PLATES); + FieldUtil.markAsMandatory(options); + return options; } @Override @@ -140,13 +136,14 @@ public final class LibrarySampleBatchRegistrationForm extends AbstractSampleBatc private RegistrationScope extractRegistrationScope() { - if (genesOligosPlatesRadio.getValue()) + String value = scopeField.getValue().getValue(); + if (value.equals(GENES_OLIGOS_PLATES)) { return RegistrationScope.GENES_OLIGOS_PLATES; - } else if (oligosPlatesRadio.getValue()) + } else if (value.equals(OLIGOS_PLATES)) { return RegistrationScope.OLIGOS_PLATES; - } else if (platesRadio.getValue()) + } else if (value.equals(PLATES)) { return RegistrationScope.PLATES; } @@ -183,7 +180,7 @@ public final class LibrarySampleBatchRegistrationForm extends AbstractSampleBatc private PlateGeometrySelectionWidget createPlateGeometryField() { PlateGeometrySelectionWidget field = new PlateGeometrySelectionWidget(viewContext); - field.setFieldLabel("Plate geometry"); + field.setFieldLabel("Plate Geometry"); FieldUtil.markAsMandatory(field); return field; } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js index 211e765af7cb33d0a75f96152af64ee65e8c61c0..2f4d9bd3b3836c4986b5410d969222358a4c878e 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js @@ -23,6 +23,7 @@ var screening = { // Sample import // import_scheduled: "Import started successfully. Notification will be sent to '{0}' upon completion.", + register: "Register", // LAST LINE: KEEP IT AT THE END lastline: "" // we need a line without a comma diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/LibraryRegistrationTask.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/LibraryRegistrationTask.java index 8b6f92464971b42fe2578cce27038c7b8a0d73d2..f8f940a57984a6af782762c72761aa47c1f77f62 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/LibraryRegistrationTask.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/LibraryRegistrationTask.java @@ -19,6 +19,8 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ScreeningConst class LibraryRegistrationTask implements Runnable { + private static final String LIBRARY_REGISTARION_STATUS = "Library registarion status"; + private final MailClientParameters mailClientParameters; private final String sessionToken; @@ -49,7 +51,6 @@ class LibraryRegistrationTask implements Runnable public void run() { - // FIXME: improve messages, add details StringBuilder message = new StringBuilder(); try { @@ -67,7 +68,7 @@ class LibraryRegistrationTask implements Runnable { message.append("GENES: ERROR (NOT REGISTERED)\n"); message.append(ex.getMessage()); - sendEmail("Library registarion status", message.toString(), email); + sendEmail(LIBRARY_REGISTARION_STATUS, message.toString(), email); return; } try @@ -86,7 +87,7 @@ class LibraryRegistrationTask implements Runnable { message.append("OLIGOS: ERROR (NOT REGISTERED)\n"); message.append(ex.getMessage()); - sendEmail("Library registarion status", message.toString(), email); + sendEmail(LIBRARY_REGISTARION_STATUS, message.toString(), email); return; } try @@ -105,10 +106,10 @@ class LibraryRegistrationTask implements Runnable { message.append("PLATES: ERROR (NOT REGISTERED)\n"); message.append(ex.getMessage()); - sendEmail("Library registarion status", message.toString(), email); + sendEmail(LIBRARY_REGISTARION_STATUS, message.toString(), email); return; } - sendEmail("Library registarion status", message.toString(), email); + sendEmail(LIBRARY_REGISTARION_STATUS, message.toString(), email); }