branch feature/observations_individuelles-amélioration_notification created (now 60ace1e)
This is an automated email from the git hooks/post-receive script. New change to branch feature/observations_individuelles-amélioration_notification in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git at 60ace1e - on n'affiche plus rien dans la barre de notif si aucune ou plusieurs lignes sont sélectionnées - on n'affiche de notif de statut de prélèvement si on modifie une ligne qui a dejà un code de prélèvement This branch includes the following new commits: new 60ace1e - on n'affiche plus rien dans la barre de notif si aucune ou plusieurs lignes sont sélectionnées - on n'affiche de notif de statut de prélèvement si on modifie une ligne qui a dejà un code de prélèvement The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 60ace1ec928d20a6e75be91ef8bbbe162d649723 Author: Kevin Morin <morin@codelutin.com> Date: Tue Apr 26 18:01:52 2016 +0200 - on n'affiche plus rien dans la barre de notif si aucune ou plusieurs lignes sont sélectionnées - on n'affiche de notif de statut de prélèvement si on modifie une ligne qui a dejà un code de prélèvement -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/observations_individuelles-amélioration_notification in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit 60ace1ec928d20a6e75be91ef8bbbe162d649723 Author: Kevin Morin <morin@codelutin.com> Date: Tue Apr 26 18:01:52 2016 +0200 - on n'affiche plus rien dans la barre de notif si aucune ou plusieurs lignes sont sélectionnées - on n'affiche de notif de statut de prélèvement si on modifie une ligne qui a dejà un code de prélèvement --- .../frequency/SamplingNotificationZoneHandler.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java index 986a51f..c5faeba 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SamplingNotificationZoneHandler.java @@ -35,7 +35,6 @@ import fr.ifremer.tutti.service.sampling.IndividualObservationSamplingContext; import fr.ifremer.tutti.service.sampling.IndividualObservationSamplingStatus; import fr.ifremer.tutti.service.sampling.SizeNotDefinedOnIndividualObservationException; import fr.ifremer.tutti.service.sampling.ZoneNotDefinedOnFishingOperationException; -import fr.ifremer.tutti.util.Numbers; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; @@ -169,7 +168,8 @@ public class SamplingNotificationZoneHandler implements Closeable { if (selectedRow == null) { - whenCanNotUseSampling(t("tutti.editSpeciesFrequencies.samplingNotification.warning.noRowSelected")); +// whenCanNotUseSampling(t("tutti.editSpeciesFrequencies.samplingNotification.warning.noRowSelected")); + hideAll(); return; } @@ -235,6 +235,10 @@ public class SamplingNotificationZoneHandler implements Closeable { // ne jamais prélever (max à 0) samplingNotificationZoneStatus = SamplingNotificationZoneStatus.NOT_USING_SAMPLING; + } else if (updatedRow.withSamplingCode()) { + + // l'observation a un code de prélèvement, on n'affiche pas de notification + samplingNotificationZoneStatus = SamplingNotificationZoneStatus.NONE; } else { // pas de prélèvement requis (samplingInterval) @@ -274,7 +278,8 @@ public class SamplingNotificationZoneHandler implements Closeable { if (getSelectedRowCount(source) > 1) { // plusieurs lignes sélectionnées, on ne peut pas afficher d'informations - whenCanNotUseSampling(t("tutti.editSpeciesFrequencies.samplingNotification.warning.moreThanOneRowSelected")); +// whenCanNotUseSampling(t("tutti.editSpeciesFrequencies.samplingNotification.warning.moreThanOneRowSelected")); + hideAll(); return; } @@ -351,6 +356,13 @@ public class SamplingNotificationZoneHandler implements Closeable { } + private void hideAll() { + + model.setSummaryText(null); + model.setSamplingNotificationZoneStatus(SamplingNotificationZoneStatus.NONE); + + } + private void whenCanNotUseSampling(String message) { model.setSummaryText(message); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm