From tchemit@users.forge.codelutin.com Thu Mar 27 17:38:38 2014
From: tchemit@users.forge.codelutin.com
To: tutti-commits@list.forge.codelutin.com
Subject: [Tutti-commits] r1648 - in trunk:
	tutti-service/src/main/java/fr/ifremer/tutti/service/export
	tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action
	tutti-ui-swing/src/main/resources/i18n
Date: Thu, 27 Mar 2014 17:38:38 +0100
Message-ID: <20140327163838.3B9FB18147C@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2497515209959641698=="

--===============2497515209959641698==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Author: tchemit
Date: 2014-03-27 17:38:37 +0100 (Thu, 27 Mar 2014)
New Revision: 1648

Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1648

Log:
fixes #4841: [ELEVATIONS] probl?\195?\168me d'?\195?\169l?\195?\169vation qua=
nd il y a un poids NONTRIE

Modified:
   trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportCa=
tchContext.java
   trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Export=
FishingOperationForSumatraAction.java
   trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Export=
FishingOperationReportAction.java
   trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properti=
es
   trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properti=
es

Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/E=
xportCatchContext.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportC=
atchContext.java	2014-03-27 14:49:15 UTC (rev 1647)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportC=
atchContext.java	2014-03-27 16:38:37 UTC (rev 1648)
@@ -128,7 +128,9 @@
=20
     public float getCatchTotalSortedWeight() {
         return catchBatch.getSpeciesTotalSampleSortedComputedWeight() +
-               catchBatch.getBenthosTotalSampleSortedComputedWeight();
+               catchBatch.getBenthosTotalSampleSortedComputedWeight() +
+               catchBatch.getSpeciesTotalUnsortedComputedWeight() +
+               catchBatch.getBenthosTotalUnsortedComputedWeight();
     }
=20
     public boolean withSpeciesBatches() {

Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action=
/ExportFishingOperationForSumatraAction.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Expor=
tFishingOperationForSumatraAction.java	2014-03-27 14:49:15 UTC (rev 1647)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Expor=
tFishingOperationForSumatraAction.java	2014-03-27 16:38:37 UTC (rev 1648)
@@ -64,6 +64,15 @@
=20
         boolean doAction =3D super.prepareAction();
=20
+        if (getModel().isModify()) {
+
+            displayWarningMessage(
+                    t("tutti.exportFishingOperationForSumatra.title.model.mo=
dified"),
+                    t("tutti.exportFishingOperationForSumatra.message.model.=
modified")
+            );
+            doAction =3D false;
+        }
+
         if (doAction) {
=20
             FishingOperation fishingOperation =3D getModel().getFishingOpera=
tion();

Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action=
/ExportFishingOperationReportAction.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Expor=
tFishingOperationReportAction.java	2014-03-27 14:49:15 UTC (rev 1647)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/action/Expor=
tFishingOperationReportAction.java	2014-03-27 16:38:37 UTC (rev 1648)
@@ -61,6 +61,15 @@
=20
         boolean doAction =3D super.prepareAction();
=20
+        if (getModel().isModify()) {
+
+            displayWarningMessage(
+                    t("tutti.exportFishingOperationReport.title.model.modifi=
ed"),
+                    t("tutti.exportFishingOperationReport.message.model.modi=
fied")
+            );
+            doAction =3D false;
+        }
+
         if (doAction) {
=20
             Cruise cruise =3D getDataContext().getCruise();

Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.p=
roperties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.propert=
ies	2014-03-27 14:49:15 UTC (rev 1647)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.propert=
ies	2014-03-27 16:38:37 UTC (rev 1648)
@@ -1134,10 +1134,14 @@
 tutti.exportDb.step.reloadApplication=3D
 tutti.exportFishingOperationForSumatra.action.chooseFile=3D
 tutti.exportFishingOperationForSumatra.action.success=3D
+tutti.exportFishingOperationForSumatra.message.model.modified=3DCatch was mo=
dified, please save it before launching an export.
 tutti.exportFishingOperationForSumatra.title.choose.exportFile=3D
+tutti.exportFishingOperationForSumatra.title.model.modified=3DCan't export, =
catch is modified
 tutti.exportFishingOperationReport.action.chooseFile=3D
 tutti.exportFishingOperationReport.action.success=3D
+tutti.exportFishingOperationReport.message.model.modified=3DCatch was modifi=
ed, please save it before launching an export.
 tutti.exportFishingOperationReport.title.choose.exportFile=3D
+tutti.exportFishingOperationReport.title.model.modified=3DCan't export, catc=
h is modified
 tutti.exportProgram.action.exportErrors=3D
 tutti.exportProgram.action.success=3D
 tutti.exportProtocol.action.success=3D

Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.p=
roperties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.propert=
ies	2014-03-27 14:49:15 UTC (rev 1647)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.propert=
ies	2014-03-27 16:38:37 UTC (rev 1648)
@@ -1121,10 +1121,14 @@
 tutti.exportDb.step.reloadApplication=3DRed=C3=A9marrage de l'application
 tutti.exportFishingOperationForSumatra.action.chooseFile=3DChoisir le fichie=
r d'export
 tutti.exportFishingOperationForSumatra.action.success=3DLe trait a =C3=A9t=
=C3=A9 export=C3=A9 dans le fichier <strong>%s</strong>
+tutti.exportFishingOperationForSumatra.message.model.modified=3DLa capture a=
 =C3=A9t=C3=A9 modifi=C3=A9, veuillez l'enregistrer avant de lancer un export.
 tutti.exportFishingOperationForSumatra.title.choose.exportFile=3DExporter le=
 trait de la campagne
+tutti.exportFishingOperationForSumatra.title.model.modified=3DImpossible d'e=
xporter, capture modifi=C3=A9e
 tutti.exportFishingOperationReport.action.chooseFile=3DChoisir le fichier de=
 rapport
 tutti.exportFishingOperationReport.action.success=3DLe trait a =C3=A9t=C3=A9=
 export=C3=A9 dans le fichier <strong>%s</strong>
+tutti.exportFishingOperationReport.message.model.modified=3DLa capture a =C3=
=A9t=C3=A9 modifi=C3=A9, veuillez l'enregistrer avant de lancer un export.
 tutti.exportFishingOperationReport.title.choose.exportFile=3DExporter le tra=
it de la campagne
+tutti.exportFishingOperationReport.title.model.modified=3DImpossible d'expor=
ter, capture modifi=C3=A9e
 tutti.exportProgram.action.exportErrors=3DDes erreurs sont apparues pendant =
l'=C3=A9l=C3=A9vation des poids d'une campagne de la s=C3=A9rie <strong>%s</s=
trong>.<br/>L'export a cependant =C3=A9t=C3=A9 r=C3=A9alis=C3=A9.<hr/>Erreur(=
s) rencontr=C3=A9e(s) \: <br/>%s
 tutti.exportProgram.action.success=3DLa s=C3=A9rie de campagne <strong>%s</s=
trong> a =C3=A9t=C3=A9 export=C3=A9e dans le fichier <strong>%s</strong>.
 tutti.exportProtocol.action.success=3DProtocole [%1s] export=C3=A9 dans le f=
ichier <strong>%2s</strong>.


--===============2497515209959641698==--


