Faxtomail-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
April 2014
- 3 participants
- 51 discussions
r31 - in trunk: faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util
by kmorin@users.forge.codelutin.com 07 Apr '14
by kmorin@users.forge.codelutin.com 07 Apr '14
07 Apr '14
Author: kmorin
Date: 2014-04-07 16:02:17 +0200 (Mon, 07 Apr 2014)
New Revision: 31
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/31
Log:
fixes #4665 [ECRAN] Transfert
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FolderTreeNode.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-07 14:02:17 UTC (rev 31)
@@ -140,8 +140,7 @@
if (count == 0) {
List<Client> clients;
try {
-// File clientFile = new File(ClassLoader.getSystemResource("fx_clients.csv").toURI());
- File clientFile = new File("/home/kmorin/Projects/faxToMail/faxtomail-service/src/main/resources/fx_clients.csv");
+ File clientFile = new File(ClassLoader.getSystemResource("fx_clients.csv").toURI());
clients = getReferentielService().importClients(clientFile);
} catch(Exception e) {
@@ -235,15 +234,24 @@
int etatAttenteSize = etatAttentes.size();
+ MailFolder chargesClientelle = folderDao.create(MailFolder.PROPERTY_NAME, "Chargés de clientèle");
+ folders.add(chargesClientelle);
+
Collections.shuffle(etatAttentes);
MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril",
+ MailFolder.PROPERTY_PARENT, chargesClientelle,
MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ chargesClientelle.addChildren(cyrilFolder);
+
int r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, cyrilFolder, cyril);
}
- MailFolder claireFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Claire");
+ MailFolder claireFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Claire",
+ MailFolder.PROPERTY_PARENT, chargesClientelle);
+ chargesClientelle.addChildren(claireFolder);
+
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, claireFolder, claire);
@@ -251,36 +259,46 @@
Collections.shuffle(etatAttentes);
MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe",
+ MailFolder.PROPERTY_PARENT, chargesClientelle,
MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ chargesClientelle.addChildren(agatheFolder);
+
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, agatheFolder, agathe);
}
- folders.add(folderDao.create(MailFolder.PROPERTY_NAME, "Chargés de clientèle",
- MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(cyrilFolder, claireFolder, agatheFolder)));
+ MailFolder sav = folderDao.create(MailFolder.PROPERTY_NAME, "SAV",
+ MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ folders.add(sav);
- MailFolder marcFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Marc");
+ MailFolder marcFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Marc",
+ MailFolder.PROPERTY_PARENT, sav);
+ sav.addChildren(marcFolder);
+
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, marcFolder, marc);
}
- MailFolder fredericFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Frédéric");
+ MailFolder fredericFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Frédéric",
+ MailFolder.PROPERTY_PARENT, sav);
+ sav.addChildren(fredericFolder);
+
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, fredericFolder, frederic);
}
- MailFolder jeanneFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Jeanne");
+ MailFolder jeanneFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Jeanne",
+ MailFolder.PROPERTY_PARENT, sav);
+ sav.addChildren(jeanneFolder);
+
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, jeanneFolder, jeanne);
}
Collections.shuffle(etatAttentes);
- folders.add(folderDao.create(MailFolder.PROPERTY_NAME, "SAV",
- MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(marcFolder, fredericFolder, jeanneFolder),
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2)));
// companies
CompanyTopiaDao companyTopiaDao = getPersistenceContext().getCompanyDao();
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-04-07 14:02:17 UTC (rev 31)
@@ -88,8 +88,10 @@
Collection<MailFolder> result = new HashSet<>();
Collection<MailFolder> children = folder.getChildren();
- for (MailFolder child : children) {
- result.addAll(getFoldersWithEtatAttente(child, parentEtatAttente, etatAttente));
+ if (children != null) {
+ for (MailFolder child : children) {
+ result.addAll(getFoldersWithEtatAttente(child, parentEtatAttente, etatAttente));
+ }
}
if (etatAttentes.contains(etatAttente)) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-07 14:02:17 UTC (rev 31)
@@ -506,7 +506,9 @@
}
public void setMailFolder(MailFolder mailFolder) {
+ Object oldValue = getMailFolder();
editObject.setMailFolder(mailFolder);
+ firePropertyChanged(Email.PROPERTY_MAIL_FOLDER, oldValue, mailFolder);
}
public Date getArchiveDate() {
@@ -514,7 +516,9 @@
}
public void setArchiveDate(Date archiveDate) {
+ Object oldValue = getArchiveDate();
editObject.setArchiveDate(archiveDate);
+ firePropertyChanged(Email.PROPERTY_ARCHIVE_DATE, oldValue, archiveDate);
}
public int getQuotationNb() {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.css 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.css 2014-04-07 14:02:17 UTC (rev 31)
@@ -15,4 +15,5 @@
text: "faxtomail.chooseMailFolder.action.validate";
toolTipText: "faxtomail.chooseMailFolder.action.validate.tip";
_applicationAction: {com.franciaflex.faxtomail.ui.swing.actions.TransmitAction.class};
+ enabled: { model.getMailFolder() != null };
}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java 2014-04-07 14:02:17 UTC (rev 31)
@@ -18,10 +18,8 @@
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreeNode;
import java.awt.*;
import java.util.Collection;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -54,15 +52,26 @@
Map<MailFolder, DefaultMutableTreeNode> nodesByFolder =
FaxToMailUIUtil.initFolderTree(getContext(), navigationTree, folders);
+ MailFolder currentFolder = getModel().getMailFolder();
+ for (MailFolder folder : nodesByFolder.keySet()) {
+ DefaultMutableTreeNode node = nodesByFolder.get(folder);
+ if (node.getClass().isAssignableFrom(FolderTreeNode.class)) {
+ FolderTreeNode folderTreeNode = (FolderTreeNode) node;
+ folderTreeNode.setCanSelect(!currentFolder.equals(folder) &&
+ (foldersWithEtatAttente.isEmpty()
+ || foldersWithEtatAttente.contains(folder)));
+ }
+ }
+
navigationTree.setCellRenderer(new DefaultTreeCellRenderer() {
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel,
boolean expanded, boolean leaf, int row, boolean hasFocus) {
Component component = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
- DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
- setEnabled(foldersWithEtatAttente.isEmpty() || foldersWithEtatAttente.contains(node.getUserObject()));
+ FolderTreeNode node = (FolderTreeNode) value;
+ setEnabled(node.isCanSelect());
return component;
}
@@ -73,6 +82,9 @@
public void valueChanged(TreeSelectionEvent e) {
FolderTreeNode folderNode = (FolderTreeNode) e.getPath().getLastPathComponent();
MailFolder folder = folderNode.getMailFolder();
+ if (!folderNode.isCanSelect()) {
+ folder = null;
+ }
getModel().setMailFolder(folder);
}
});
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FolderTreeNode.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FolderTreeNode.java 2014-04-04 15:42:36 UTC (rev 30)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FolderTreeNode.java 2014-04-07 14:02:17 UTC (rev 31)
@@ -33,6 +33,8 @@
*/
public class FolderTreeNode extends DefaultMutableTreeNode {
+ protected boolean canSelect;
+
public FolderTreeNode(MailFolder folder) {
super(folder);
}
@@ -41,6 +43,14 @@
return (MailFolder) userObject;
}
+ public boolean isCanSelect() {
+ return canSelect;
+ }
+
+ public void setCanSelect(boolean canSelect) {
+ this.canSelect = canSelect;
+ }
+
@Override
public String toString() {
MailFolder folder = (MailFolder) userObject;
1
0
r30 - in trunk: faxtomail-persistence/src/main/xmi faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment
by kmorin@users.forge.codelutin.com 04 Apr '14
by kmorin@users.forge.codelutin.com 04 Apr '14
04 Apr '14
Author: kmorin
Date: 2014-04-04 17:42:36 +0200 (Fri, 04 Apr 2014)
New Revision: 30
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/30
Log:
refs #4665 [ECRAN] Transfert
ajout de la gestion des etats d'attente
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.jaxx
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-04 15:42:36 UTC (rev 30)
@@ -64,6 +64,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Random;
@@ -162,20 +163,20 @@
EtatAttenteTopiaDao etatAttenteDao = getPersistenceContext().getEtatAttenteDao();
List<EtatAttente> etatAttentes = Lists.newArrayList(
- etatAttenteDao.create(Range.PROPERTY_LABEL, "REM Attente Remise-accord expo"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "BAT attente retour BAT lettrage-logo"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "CLT attente réponse client"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "DAC attente pour assistance chantier"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "DAV attente analyse avoir"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "EXP attente expertise"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "GAB attente reception gabarit"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "GRA attente accord gratuit"),
etatAttenteDao.create(Range.PROPERTY_LABEL, "ODC attente Ouverture de Compte"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "GRA attente accord gratuit"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "CLT attente réponse client"),
etatAttenteDao.create(Range.PROPERTY_LABEL, "PPC attente chiffrage BEI PPC"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "SIGN attente réponse BEI signature"),
etatAttenteDao.create(Range.PROPERTY_LABEL, "PROFORMA attente paiement proforma"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "BAT attente retour BAT lettrage-logo"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "GAB attente reception gabarit"),
etatAttenteDao.create(Range.PROPERTY_LABEL, "PROTO attente accord proto"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "DAC attente pour assistance chantier"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "DAV attente analyse avoir"),
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "REM Attente Remise-accord expo"),
etatAttenteDao.create(Range.PROPERTY_LABEL, "RET attente retour materiel"),
- etatAttenteDao.create(Range.PROPERTY_LABEL, "EXP attente expertise")
+ etatAttenteDao.create(Range.PROPERTY_LABEL, "SIGN attente réponse BEI signature")
);
PriorityTopiaDao priorityDao = getPersistenceContext().getPriorityDao();
@@ -232,7 +233,11 @@
HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao();
RangeRowTopiaDao rangeRowDao = getPersistenceContext().getRangeRowDao();
- MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril");
+ int etatAttenteSize = etatAttentes.size();
+
+ Collections.shuffle(etatAttentes);
+ MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril",
+ MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
int r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, cyrilFolder, cyril);
@@ -244,7 +249,9 @@
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, claireFolder, claire);
}
- MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe");
+ Collections.shuffle(etatAttentes);
+ MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe",
+ MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
r = random.nextInt(10) + 5;
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, agatheFolder, agathe);
@@ -270,8 +277,10 @@
for (int i = 0 ; i < r ; i++) {
createEmail(random, historyDao, rangeRowDao, emailDao, ranges, clients, types, priorities, jeanneFolder, jeanne);
}
+ Collections.shuffle(etatAttentes);
folders.add(folderDao.create(MailFolder.PROPERTY_NAME, "SAV",
- MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(marcFolder, fredericFolder, jeanneFolder)));
+ MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(marcFolder, fredericFolder, jeanneFolder),
+ MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2)));
// companies
CompanyTopiaDao companyTopiaDao = getPersistenceContext().getCompanyDao();
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-04-04 15:42:36 UTC (rev 30)
@@ -1,15 +1,19 @@
package com.franciaflex.faxtomail.services.service;
+import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.persistence.entities.MailFolderTopiaDao;
import com.franciaflex.faxtomail.services.FaxToMailServiceSupport;
+import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.persistence.TopiaIdFactory;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
/**
@@ -58,4 +62,42 @@
return result;
}
+ public Collection<MailFolder> getFoldersWithEtatAttente(EtatAttente etatAttente) {
+ Collection<MailFolder> result = new HashSet<>();
+
+ MailFolderTopiaDao dao = getPersistenceContext().getMailFolderDao();
+ List<MailFolder> roots = dao.forParentEquals(null).findAll();
+
+ for (MailFolder root : roots) {
+ result.addAll(getFoldersWithEtatAttente(root, new HashSet<EtatAttente>(), etatAttente));
+ }
+
+ return result;
+ }
+
+ protected Collection<MailFolder> getFoldersWithEtatAttente(MailFolder folder,
+ Collection<EtatAttente> parentEtatAttente,
+ EtatAttente etatAttente) {
+ Collection<EtatAttente> etatAttentes = folder.getEtatAttente();
+ if (CollectionUtils.isEmpty(etatAttentes)) {
+ etatAttentes = parentEtatAttente;
+
+ } else {
+ parentEtatAttente = etatAttentes;
+ }
+
+ Collection<MailFolder> result = new HashSet<>();
+ Collection<MailFolder> children = folder.getChildren();
+ for (MailFolder child : children) {
+ result.addAll(getFoldersWithEtatAttente(child, parentEtatAttente, etatAttente));
+ }
+
+ if (etatAttentes.contains(etatAttente)) {
+ result.add(folder);
+ }
+
+ return result;
+
+ }
+
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-04-04 15:42:36 UTC (rev 30)
@@ -25,7 +25,10 @@
import com.franciaflex.faxtomail.persistence.entities.Attachment;
import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
import com.franciaflex.faxtomail.persistence.entities.HistoryType;
+import com.franciaflex.faxtomail.persistence.entities.MailFolder;
+import com.franciaflex.faxtomail.persistence.entities.MailFolderTopiaDao;
import com.franciaflex.faxtomail.persistence.entities.Range;
import com.franciaflex.faxtomail.persistence.entities.RangeRow;
import com.franciaflex.faxtomail.services.service.ReferentielService;
@@ -37,6 +40,7 @@
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentEditorUIModel;
import jaxx.runtime.validator.swing.SwingValidator;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
@@ -112,12 +116,21 @@
initUI(ui);
DemandeUIModel model = getModel();
+ MailFolder folder = model.getMailFolder();
ReferentielService referentielService = getContext().getReferentielService();
initBeanFilterableComboBox(ui.getDocTypeComboBox(), referentielService.getAllDemandType(), model.getDemandType());
initBeanFilterableComboBox(ui.getPriorityComboBox(), referentielService.getAllPriority(), model.getPriority());
- initBeanFilterableComboBox(ui.getEtatAttenteComboBox(), referentielService.getAllEtatAttente(), model.getEtatAttente());
+ List<EtatAttente> etatAttentes = new ArrayList<EtatAttente>();
+ Collection<EtatAttente> folderEtatAttentes = getEtatAttenteForFolder(folder);
+ if (CollectionUtils.isEmpty(folderEtatAttentes)) {
+ etatAttentes.addAll(referentielService.getAllEtatAttente());
+ } else {
+ etatAttentes.addAll(folderEtatAttentes);
+ }
+ initBeanFilterableComboBox(ui.getEtatAttenteComboBox(), etatAttentes, model.getEtatAttente());
+
JEditorPane editor = ui.getMailBodyField();
HTMLEditorKit htmlEditorKit = new HTMLEditorKit();
editor.setEditorKit(htmlEditorKit);
@@ -381,6 +394,14 @@
return ui.getValidator();
}
+ public Collection<EtatAttente> getEtatAttenteForFolder(MailFolder folder) {
+ Collection<EtatAttente> result = null;
+ while (CollectionUtils.isEmpty(result) && folder != null) {
+ result = folder.getEtatAttente();
+ folder = folder.getParent();
+ }
+ return result;
+ }
public BeanMonitor getMonitor() {
return monitor;
}
@@ -390,8 +411,7 @@
}
public void transmitDemande() {
- MailFolderChooserUI dialogContent = new MailFolderChooserUI(ui);
- dialogContent.setModel(getModel());
+ MailFolderChooserUI dialogContent = new MailFolderChooserUI(ui, getModel());
openDialog(dialogContent, t("faxtomail.chooseMailFolder.title"), new Dimension(350, 500));
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.jaxx 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUI.jaxx 2014-04-04 15:42:36 UTC (rev 30)
@@ -10,13 +10,14 @@
<script><![CDATA[
- public MailFolderChooserUI(FaxToMailUI parentUI) {
+ public MailFolderChooserUI(FaxToMailUI parentUI, DemandeUIModel model) {
FaxToMailUIUtil.setParentUI(this, parentUI);
+ setContextValue(model);
}
]]></script>
- <DemandeUIModel id='model' javaBean='null'/>
+ <DemandeUIModel id='model' javaBean='getContextValue(DemandeUIModel.class)'/>
<JScrollPane constraints='BorderLayout.CENTER'>
<JTree id="navigationTree"/>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/MailFolderChooserUIHandler.java 2014-04-04 15:42:36 UTC (rev 30)
@@ -1,6 +1,7 @@
package com.franciaflex.faxtomail.ui.swing.content.demande;
import com.franciaflex.faxtomail.persistence.entities.Company;
+import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.content.demande.MailFolderChooserUI;
@@ -9,13 +10,19 @@
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
import com.franciaflex.faxtomail.ui.swing.util.FolderTreeNode;
import jaxx.runtime.validator.swing.SwingValidator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreeNode;
+import java.awt.*;
import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
/**
@@ -24,17 +31,43 @@
*/
public class MailFolderChooserUIHandler extends AbstractFaxToMailUIHandler<DemandeUIModel, MailFolderChooserUI> implements Cancelable {
+ private static final Log log = LogFactory.getLog(MailFolderChooserUIHandler.class);
+
@Override
public void afterInit(MailFolderChooserUI mailFolderChooserUI) {
initUI(mailFolderChooserUI);
+ DemandeUIModel model = getModel();
+
+ EtatAttente etatAttente = model.getEtatAttente();
+ final Collection<MailFolder> foldersWithEtatAttente;
+ if (etatAttente != null) {
+ foldersWithEtatAttente = getContext().getMailFolderService().getFoldersWithEtatAttente(etatAttente);
+ } else {
+ foldersWithEtatAttente = new HashSet<MailFolder>();
+ }
+
// init tree
Company franciaflex = getContext().getCurrentCompany();
Collection<MailFolder> folders = franciaflex.getMailFolder();
JTree navigationTree = ui.getNavigationTree();
+
Map<MailFolder, DefaultMutableTreeNode> nodesByFolder =
FaxToMailUIUtil.initFolderTree(getContext(), navigationTree, folders);
+ navigationTree.setCellRenderer(new DefaultTreeCellRenderer() {
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel,
+ boolean expanded, boolean leaf, int row, boolean hasFocus) {
+ Component component = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
+ setEnabled(foldersWithEtatAttente.isEmpty() || foldersWithEtatAttente.contains(node.getUserObject()));
+
+ return component;
+ }
+ });
+
navigationTree.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent e) {
@@ -64,25 +97,4 @@
return ui.getNavigationTree();
}
- /**
- * Creates the tree nodes and returns a map of the nodes by folder
- * @param parent the node parent
- * @param folder the folder to add to the tree
- * @return the map of the nodes by folder
- */
- protected Map<MailFolder, DefaultMutableTreeNode> createFolderTree(DefaultMutableTreeNode parent, MailFolder folder) {
- Map<MailFolder, DefaultMutableTreeNode> result = new HashMap<MailFolder, DefaultMutableTreeNode>();
-
- DefaultMutableTreeNode node = new FolderTreeNode(folder);
- result.put(folder, node);
-
- parent.add(node);
- if (folder.isChildrenNotEmpty()) {
- for (MailFolder child : folder.getChildren()) {
- result.putAll(createFolderTree(node, child));
- }
- }
- return result;
- }
-
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-04 15:42:36 UTC (rev 30)
@@ -230,6 +230,8 @@
label.setIcon(icon);
}
+ setEditable(getModel().isEditable());
+
return this;
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css 2014-04-04 15:42:36 UTC (rev 30)
@@ -20,6 +20,5 @@
actionIcon: "delete";
toolTipText: "faxtomail.attachmentEditor.action.remove.tip";
enabled: { getAttachment() != null && getAttachment().getTopiaId() == null };
- //TODO check
- visible: { getHandler().getModel().isEditable() };
+ visible: { Boolean.TRUE.equals(isEditable()) };
}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.jaxx 2014-04-03 16:13:47 UTC (rev 29)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.jaxx 2014-04-04 15:42:36 UTC (rev 30)
@@ -10,6 +10,8 @@
<AttachmentEditorUIHandler id='handler' javaBean='null'/>
+ <Boolean id="editable" javaBean='null'/>
+
<JLabel id='attachmentNameLabel' constraints='BorderLayout.CENTER'/>
<JToolBar id='toolbar' constraints='BorderLayout.EAST'>
1
0
r29 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: . actions content/demande content/search util util/attachment
by kmorin@users.forge.codelutin.com 03 Apr '14
by kmorin@users.forge.codelutin.com 03 Apr '14
03 Apr '14
Author: kmorin
Date: 2014-04-03 18:13:47 +0200 (Thu, 03 Apr 2014)
New Revision: 29
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/29
Log:
refs #4659 [ECRAN] Recherche
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -41,6 +41,7 @@
import com.franciaflex.faxtomail.services.service.ValidationService;
import com.franciaflex.faxtomail.ui.swing.content.MainUI;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
+import com.franciaflex.faxtomail.ui.swing.content.search.SearchUIModel;
import com.franciaflex.faxtomail.ui.swing.util.UIMessageNotifier;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
@@ -221,6 +222,8 @@
protected List<MailFolder> expandedFolders = new ArrayList<MailFolder>();
+ protected SearchUIModel search;
+
public static FaxToMailUIContext newContext(FaxToMailConfiguration config) {
Preconditions.checkNotNull(config);
Preconditions.checkState(applicationContext == null,
@@ -550,14 +553,6 @@
}
protected void saveContextToConfig() {
-// if (log.isInfoEnabled()) {
-// log.info("Save config (programId: " + getProgramId() + ", cruiseId: " +
-// getCruiseId() + ", protocolId: " + getProtocolId() + ", locale: " +
-// getLocale() + ")");
-// }
-// config.setProgramId(getProgramId());
-// config.setCruiseId(getCruiseId());
-// config.setProtocolId(getProtocolId());
config.setI18nLocale(getLocale());
config.save();
}
@@ -721,4 +716,12 @@
public void setExpandedFolders(List<MailFolder> expandedFolders) {
this.expandedFolders = expandedFolders;
}
+
+ public SearchUIModel getSearch() {
+ return search;
+ }
+
+ public void setSearch(SearchUIModel search) {
+ this.search = search;
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -17,6 +17,6 @@
public void postSuccessAction() {
super.postSuccessAction();
- getContext().setScreen(FaxToMailScreen.LIST);
+ getContext().setScreen(AbstractChangeScreenAction.PREVIOUS_SCREEN.getContextValue(handler.getUI()));
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -23,6 +23,8 @@
@Override
public void doAction() throws Exception {
SearchUIModel model = getModel();
+ getContext().setSearch(model);
+
Email email = model.toEntity();
List<Email> emails = getContext().getEmailService().search(email, model.getMinReceptionDate(), model.getMaxReceptionDate(),
model.getMinModificationDate(), model.getMaxModificationDate(), model.getModifiedBy(),
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -36,4 +36,10 @@
public ShowDemandeListAction(MainUIHandler handler) {
super(handler, true, FaxToMailScreen.LIST);
}
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ getContext().setSearch(null);
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -36,4 +36,5 @@
public ShowRechercheAction(MainUIHandler handler) {
super(handler, true, FaxToMailScreen.SEARCH);
}
+
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -221,6 +221,11 @@
}
@Override
+ protected String[] getEditableTableProperties() {
+ return new String[] { Email.PROPERTY_PRIORITY, Email.PROPERTY_ATTACHMENT };
+ }
+
+ @Override
protected void onDoubleClickOnDemande(DemandeUIModel selectedEmail) {
super.onDoubleClickOnDemande(selectedEmail);
selectedEmail.removePropertyChangeListener(selectedDemandeChangeListener);
@@ -277,34 +282,12 @@
super.beforeOpenPopup(rowIndex, columnIndex);
int selectedRowCount = getUI().getDataTable().getSelectedRowCount();
- log.info(selectedRowCount == 1);
DemandeListUIModel model = getModel();
model.setAddAttachmentEnabled(selectedRowCount == 1);
model.setReplyEnabled(selectedRowCount == 1);
}
- @Override
- public void autoSelectRowInTable(MouseEvent e, JPopupMenu popup) {
- boolean rightClick = SwingUtilities.isRightMouseButton(e);
- if (rightClick) {
- // get the coordinates of the mouse click
- Point p = e.getPoint();
-
- JXTable source = (JXTable) e.getSource();
-
- int[] selectedRows = source.getSelectedRows();
-
- // get the row index at this point
- int rowIndex = source.rowAtPoint(p);
- if (rowIndex == -1 || !ArrayUtils.contains(selectedRows, rowIndex)) {
- source.clearSelection();
- }
- }
-
- super.autoSelectRowInTable(e, popup);
- }
-
public void autoSelectNodeInTree(MouseEvent e, JPopupMenu popup) {
boolean rightClick = SwingUtilities.isRightMouseButton(e);
@@ -374,11 +357,6 @@
log.debug("reply");
}
- public void addAttachment() {
- //TODO
- log.debug("addAttachment");
- }
-
public void archive() {
//TODO
log.debug("archive");
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-04-03 16:13:47 UTC (rev 29)
@@ -273,7 +273,7 @@
#backButton {
text: "faxtomail.demande.back.button.label";
actionIcon: cancel;
- _applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeListAction.class };
+ _applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.GoToPreviousScreenAction.class };
}
#saveButton {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-04-03 16:13:47 UTC (rev 29)
@@ -51,6 +51,11 @@
text: "faxtomail.demande.takenBy.label";
}
+#takenByComboBox {
+ property: takenBy;
+ selectedItem: { model.getTakenBy() };
+}
+
#modifiedBetweenLabel {
text: "faxtomail.search.modifiedBetween.label";
}
@@ -170,6 +175,6 @@
}
#dataTable {
- editable: false;
+ editable: true;
autoCreateRowSorter: true;
}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -25,6 +25,7 @@
import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.services.service.ReferentielService;
+import com.franciaflex.faxtomail.ui.swing.actions.SearchAction;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeListAction;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeListUIModel;
@@ -84,21 +85,24 @@
public void beforeInit(SearchUI ui) {
super.beforeInit(ui);
- SearchUIModel searchUIModel = new SearchUIModel();
- searchUIModel.setTakenBy(getContext().getCurrentUser());
- searchUIModel.setModifiedBy(getContext().getCurrentUser());
+ SearchUIModel searchUIModel = getContext().getSearch();
+ if (searchUIModel == null) {
+ searchUIModel = new SearchUIModel();
+ searchUIModel.setTakenBy(getContext().getCurrentUser());
+ searchUIModel.setModifiedBy(getContext().getCurrentUser());
- Date now = new Date();
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.MONTH, -2);
- Date twoMonthsAgo = cal.getTime();
+ Date now = new Date();
+ Calendar cal = Calendar.getInstance();
+ cal.add(Calendar.MONTH, -2);
+ Date twoMonthsAgo = cal.getTime();
- searchUIModel.setMaxModificationDate(now);
- searchUIModel.setMinModificationDate(twoMonthsAgo);
- searchUIModel.setMaxReceptionDate(now);
- searchUIModel.setMinReceptionDate(twoMonthsAgo);
- searchUIModel.setMaxPrintingDate(now);
- searchUIModel.setMinPrintingDate(twoMonthsAgo);
+ searchUIModel.setMaxModificationDate(now);
+ searchUIModel.setMinModificationDate(twoMonthsAgo);
+ searchUIModel.setMaxReceptionDate(now);
+ searchUIModel.setMinReceptionDate(twoMonthsAgo);
+ searchUIModel.setMaxPrintingDate(now);
+ searchUIModel.setMinPrintingDate(twoMonthsAgo);
+ }
getUI().setContextValue(searchUIModel);
}
@@ -109,37 +113,57 @@
ReferentielService referentielService = getContext().getReferentielService();
+ SearchUIModel model = getModel();
initBeanFilterableComboBox(ui.getTakenByComboBox(),
getContext().getUserService().getAllUsers(),
- getModel().getTakenBy());
+ model.getTakenBy());
initBeanFilterableComboBox(ui.getModifiedByComboBox(),
getContext().getUserService().getAllUsers(),
- getModel().getModifiedBy());
+ model.getModifiedBy());
initBeanFilterableComboBox(ui.getDocTypeComboBox(),
referentielService.getAllDemandType(),
- null);
+ model.getDemandType());
initBeanFilterableComboBox(ui.getPriorityComboBox(),
referentielService.getAllPriority(),
- null);
+ model.getPriority());
initBeanFilterableComboBox(ui.getEtatAttenteComboBox(),
referentielService.getAllEtatAttente(),
- null);
+ model.getEtatAttente());
initBeanFilterableComboBox(ui.getStatusComboBox(),
Arrays.asList(DemandStatus.values()),
- null);
+ model.getDemandStatus());
- JXTable dataTable = getUI().getDataTable();
+ final JXTable dataTable = getUI().getDataTable();
final AbstractApplicationTableModel<DemandeUIModel> tableModel = initDemandeTable(dataTable, true);
- getModel().addPropertyChangeListener(SearchUIModel.PROPERTY_RESULTS, new PropertyChangeListener() {
+ model.addPropertyChangeListener(SearchUIModel.PROPERTY_RESULTS, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
List<DemandeUIModel> emails = (List<DemandeUIModel>) evt.getNewValue();
tableModel.setRows(emails);
showInformationMessage(t("faxtomail.search.resultNb", emails.size()));
+
+ DemandeUIModel currentEmail = getContext().getCurrentEmail();
+ if (currentEmail != null) {
+ int row = tableModel.getRowIndex(currentEmail);
+ if (row > 0) {
+ dataTable.setRowSelectionInterval(row, row);
+ }
+ }
}
});
+ if (getContext().getSearch() != null) {
+ try {
+ SearchAction searchAction = getContext().getActionFactory().createLogicAction(this, SearchAction.class);
+ searchAction.doAction();
+
+ } catch (Exception e) {
+ if (log.isErrorEnabled()) {
+ log.error("error while searching", e);
+ }
+ }
+ }
}
@Override
@@ -153,7 +177,6 @@
log.debug("closing: " + ui);
}
clearValidators();
-
}
@Override
@@ -183,4 +206,9 @@
getContext().setCurrentMailFolder(selectedEmail.getMailFolder());
getContext().getActionEngine().runAction(new ShowDemandeListAction(getContext().getMainUI().getHandler()));
}
+
+ @Override
+ protected String[] getEditableTableProperties() {
+ return new String[] { Email.PROPERTY_ATTACHMENT };
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -15,6 +15,7 @@
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentCellEditor;
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentCellRenderer;
import com.google.common.base.Function;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -146,7 +147,8 @@
}
}
- final AbstractApplicationTableModel<DemandeUIModel> tableModel = new DemandeTableModel(columnModel);
+ final AbstractApplicationTableModel<DemandeUIModel> tableModel = new DemandeTableModel(columnModel,
+ getEditableTableProperties());
table.setModel(tableModel);
table.setColumnModel(columnModel);
table.getTableHeader().setReorderingAllowed(false);
@@ -222,6 +224,29 @@
return tableModel;
}
+ @Override
+ public void autoSelectRowInTable(MouseEvent e, JPopupMenu popup) {
+ boolean rightClick = SwingUtilities.isRightMouseButton(e);
+ if (rightClick) {
+ // get the coordinates of the mouse click
+ Point p = e.getPoint();
+
+ JXTable source = (JXTable) e.getSource();
+
+ int[] selectedRows = source.getSelectedRows();
+
+ // get the row index at this point
+ int rowIndex = source.rowAtPoint(p);
+ if (rowIndex == -1 || !ArrayUtils.contains(selectedRows, rowIndex)) {
+ source.clearSelection();
+ }
+ }
+
+ super.autoSelectRowInTable(e, popup);
+ }
+
+ protected abstract String[] getEditableTableProperties();
+
protected void onDoubleClickOnDemande(DemandeUIModel selectedEmail) {
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -44,8 +44,7 @@
*/
public class DemandeTableModel extends AbstractApplicationTableModel<DemandeUIModel> {
- private static final Log log =
- LogFactory.getLog(DemandeTableModel.class);
+ private static final Log log = LogFactory.getLog(DemandeTableModel.class);
public static final Map<String, ColumnIdentifier<Email>> COLUMN_IDENTIFIERS = new HashMap<String, ColumnIdentifier<Email>>() {{
put(Email.PROPERTY_SENDER,
@@ -158,11 +157,12 @@
}};
- public DemandeTableModel(TableColumnModelExt columnModel) {
+ public DemandeTableModel(TableColumnModelExt columnModel, String... editableProperties) {
super(columnModel, false, false);
List<ColumnIdentifier> nonEditableColumns = new ArrayList<ColumnIdentifier>(COLUMN_IDENTIFIERS.values());
- nonEditableColumns.remove(COLUMN_IDENTIFIERS.get(Email.PROPERTY_PRIORITY));
- nonEditableColumns.remove(COLUMN_IDENTIFIERS.get(Email.PROPERTY_ATTACHMENT));
+ for (String editableProperty : editableProperties) {
+ nonEditableColumns.remove(COLUMN_IDENTIFIERS.get(editableProperty));
+ }
setNoneEditableCols(nonEditableColumns.toArray(new ColumnIdentifier[nonEditableColumns.size()]));
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java 2014-04-03 16:13:47 UTC (rev 29)
@@ -63,14 +63,6 @@
return new AttachmentCellEditor(FaxToMailUIContext.getApplicationContext());
}
- protected JTable table;
-
- protected AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel> tableModel;
-
- protected Integer rowIndex;
-
- protected Integer columnIndex;
-
protected final ButtonAttachment editorButton;
protected FaxToMailUIContext context;
@@ -102,14 +94,12 @@
boolean isSelected,
int row,
int column) {
- this.table = table;
- this.tableModel = (AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel>) table.getModel();
+ AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel> tableModel =
+ (AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel>) table.getModel();
- rowIndex = row;
- columnIndex = column;
+ int modelRow = table.convertRowIndexToModel(row);
+ final DemandeUIModel model = (DemandeUIModel) tableModel.getEntry(modelRow);
- final DemandeUIModel model = (DemandeUIModel) tableModel.getEntry(row);
-
editorButton.init(model);
listener = new AttachmentEditorUIModel.AttachmentListener() {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css 2014-04-03 15:06:12 UTC (rev 28)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentItem.css 2014-04-03 16:13:47 UTC (rev 29)
@@ -20,4 +20,6 @@
actionIcon: "delete";
toolTipText: "faxtomail.attachmentEditor.action.remove.tip";
enabled: { getAttachment() != null && getAttachment().getTopiaId() == null };
+ //TODO check
+ visible: { getHandler().getModel().isEditable() };
}
\ No newline at end of file
1
0
r28 - in trunk: faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history
by kmorin@users.forge.codelutin.com 03 Apr '14
by kmorin@users.forge.codelutin.com 03 Apr '14
03 Apr '14
Author: kmorin
Date: 2014-04-03 17:06:12 +0200 (Thu, 03 Apr 2014)
New Revision: 28
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/28
Log:
refs #4665 [ECRAN] Transfert
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-04-03 14:21:15 UTC (rev 27)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-04-03 15:06:12 UTC (rev 28)
@@ -50,7 +50,7 @@
HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao();
Set<String> fieldSet = Sets.newHashSet(modifiedFields);
- if (modifiedFields.length > 0) {
+ if (!fieldSet.isEmpty() && !fieldSet.contains(Email.PROPERTY_TAKEN_BY)) {
email.setTakenBy(user);
fieldSet.add(Email.PROPERTY_TAKEN_BY);
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-04-03 14:21:15 UTC (rev 27)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-04-03 15:06:12 UTC (rev 28)
@@ -1,9 +1,12 @@
package com.franciaflex.faxtomail.ui.swing.actions;
import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUI;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.content.demande.MailFolderChooserUI;
import com.franciaflex.faxtomail.ui.swing.content.demande.MailFolderChooserUIHandler;
+import jaxx.runtime.JAXXContext;
+import jaxx.runtime.JAXXUtil;
/**
* @author Kevin Morin (Code Lutin)
@@ -19,10 +22,14 @@
public void doAction() throws Exception {
DemandeUIModel model = getModel();
model.setDemandStatus(DemandStatus.QUALIFIED);
+ model.setTakenBy(null);
//TODO kmorin 20140306
-// SaveDemandeAction action = getContext().getActionFactory().createLogicAction(getContext().getMainUI().getHandler(), SaveDemandeAction.class);
-// action.setDemandeModel(getModel());
-// getContext().getActionEngine().runAction(action);
+ DemandeUI parentUI = (DemandeUI) getUI().getContextValue(JAXXContext.class, JAXXUtil.PARENT);
+ SaveDemandeAction action = getContext().getActionFactory().createLogicAction(parentUI.getHandler(),
+ SaveDemandeAndExitAction.class);
+ getContext().getActionEngine().runAction(action);
+
+
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java 2014-04-03 14:21:15 UTC (rev 27)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java 2014-04-03 15:06:12 UTC (rev 28)
@@ -114,7 +114,7 @@
if (fields != null) {
for (String field : fields) {
String label;
- if (I18n.hasKey(field)) {
+ if (I18n.hasKey("faxtomail.demande." + field + ".label")) {
label = t("faxtomail.demande." + field + ".label");
} else {
label = field;
1
0
r27 - in trunk/faxtomail-ui-swing/src/main: java/com/franciaflex/faxtomail/ui/swing/content/demande java/com/franciaflex/faxtomail/ui/swing/util resources/i18n
by kmorin@users.forge.codelutin.com 03 Apr '14
by kmorin@users.forge.codelutin.com 03 Apr '14
03 Apr '14
Author: kmorin
Date: 2014-04-03 16:21:15 +0200 (Thu, 03 Apr 2014)
New Revision: 27
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/27
Log:
refs #4654 [ECRAN] Liste des mails / fax
ajout des colonnes pris par et dernier ?\195?\160 ouvrir une pi?\195?\168ce jointe
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-03 14:00:27 UTC (rev 26)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-03 14:21:15 UTC (rev 27)
@@ -65,6 +65,7 @@
public static final String PROPERTY_CLIENT_CODE = "clientCode";
public static final String PROPERTY_CLIENT_BRAND = "clientBrand";
public static final String PROPERTY_EDITABLE = "editable";
+ public static final String PROPERTY_LAST_ATTACHMENT_OPENING_USER = "lastAttachmentOpeningUser";
protected final Email editObject = new EmailImpl();
@@ -462,25 +463,37 @@
}
public void addRangeRow(RangeRow rangeRow) {
- Object oldValue = new ArrayList<RangeRow>(getRangeRow());
+ Object oldValue = null;
+ if (getRangeRow() != null) {
+ oldValue = new ArrayList<RangeRow>(getRangeRow());
+ }
editObject.addRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void addAllRangeRow(Collection<RangeRow> rangeRow) {
- Object oldValue = new ArrayList<RangeRow>(getRangeRow());
+ Object oldValue = null;
+ if (getRangeRow() != null) {
+ oldValue = new ArrayList<RangeRow>(getRangeRow());
+ }
editObject.addAllRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void removeRangeRow(RangeRow rangeRow) {
- Object oldValue = new ArrayList<RangeRow>(getRangeRow());
+ Object oldValue = null;
+ if (getRangeRow() != null) {
+ oldValue = new ArrayList<RangeRow>(getRangeRow());
+ }
editObject.removeRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void setRangeRow(Collection<RangeRow> rangeRow) {
- Object oldValue = new ArrayList<RangeRow>(getRangeRow());
+ Object oldValue = null;
+ if (getRangeRow() != null) {
+ oldValue = new ArrayList<RangeRow>(getRangeRow());
+ }
if (rangeRow == null) {
rangeRow = new ArrayList<RangeRow>();
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-03 14:00:27 UTC (rev 26)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-03 14:21:15 UTC (rev 27)
@@ -4,6 +4,7 @@
import com.franciaflex.faxtomail.persistence.entities.Company;
import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.HasLabel;
import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.persistence.entities.Priority;
@@ -72,6 +73,8 @@
Email.PROPERTY_ETAT_ATTENTE,
DemandeUIModel.PROPERTY_PF_NB,
DemandeUIModel.PROPERTY_SAV_NB,
+ Email.PROPERTY_TAKEN_BY,
+ DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
Email.PROPERTY_ATTACHMENT
}, ',');
}
@@ -117,11 +120,17 @@
case Email.PROPERTY_DEMAND_STATUS:
tableCellRenderer = newTableCellRender(DemandStatus.class);
break;
+
case Email.PROPERTY_DEMAND_TYPE:
case Email.PROPERTY_ETAT_ATTENTE:
tableCellRenderer = newTableCellRender(HasLabel.class);
break;
+ case Email.PROPERTY_TAKEN_BY:
+ case DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER:
+ tableCellRenderer = newTableCellRender(FaxToMailUser.class);
+ break;
+
default:
tableCellRenderer = newTableCellRender(new Decorator<Object>(Object.class) {
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-04-03 14:00:27 UTC (rev 26)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-04-03 14:21:15 UTC (rev 27)
@@ -150,6 +150,12 @@
n("faxtomail.demandeList.table.header.attachment"),
n("faxtomail.demandeList.table.header.attachment.tip")));
+ put(DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ ColumnIdentifier.<Email>newId(
+ DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ n("faxtomail.demandeList.table.header.lastAttachmentOpeningUser"),
+ n("faxtomail.demandeList.table.header.lastAttachmentOpeningUser.tip")));
+
}};
public DemandeTableModel(TableColumnModelExt columnModel) {
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-03 14:00:27 UTC (rev 26)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-03 14:21:15 UTC (rev 27)
@@ -202,6 +202,8 @@
faxtomail.demandeList.table.header.ediCodeNumber.tip=
faxtomail.demandeList.table.header.folder=
faxtomail.demandeList.table.header.folder.tip=
+faxtomail.demandeList.table.header.lastAttachmentOpeningUser=
+faxtomail.demandeList.table.header.lastAttachmentOpeningUser.tip=
faxtomail.demandeList.table.header.object=
faxtomail.demandeList.table.header.object.tip=
faxtomail.demandeList.table.header.pfNb=
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-03 14:00:27 UTC (rev 26)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-03 14:21:15 UTC (rev 27)
@@ -102,6 +102,8 @@
faxtomail.demandeList.table.header.companyReference.tip=Notre référence
faxtomail.demandeList.table.header.ediCodeNumber=Code EDI
faxtomail.demandeList.table.header.ediCodeNumber.tip=Code EDI
+faxtomail.demandeList.table.header.lastAttachmentOpeningUser=Dernier à ouvrir une PJ
+faxtomail.demandeList.table.header.lastAttachmentOpeningUser.tip=Dernier utilisateur à avoir ouvert une pièce-jointe
faxtomail.demandeList.table.header.object=Objet
faxtomail.demandeList.table.header.object.tip=Objet
faxtomail.demandeList.table.header.pfNb=Qté produits
1
0
03 Apr '14
Author: kmorin
Date: 2014-04-03 16:00:27 +0200 (Thu, 03 Apr 2014)
New Revision: 26
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/26
Log:
refs #4654 [ECRAN] Liste des mails / fax
refs #4655 [ECRAN] D?\195?\169tail d'un mail / fax
dernier utilisateur qui a visualis?\195?\169 une pi?\195?\168ce jointe
refs #4666 [ECRAN] Pi?\195?\168ces jointes
historique d'ouverture et d'?\195?\169dition des pi?\195?\168ces jointes
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java
trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_en_GB.properties
trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_fr_FR.properties
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GenerateAnnotatedAttachmentAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/ButtonAttachment.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/ButtonHistory.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -38,7 +38,9 @@
MODIFICATION(n("faxtomail.historyType.modification")),
REPLY(n("faxtomail.historyType.reply")),
PRINTING(n("faxtomail.historyType.printing")),
- ARCHIVED(n("faxtomail.historyType.archive"));
+ ARCHIVED(n("faxtomail.historyType.archive")),
+ ATTACHMENT_OPENING(n("faxtomail.historyType.attachmentOpening")),
+ ATTACHMENT_MODIFICATION(n("faxtomail.historyType.attachmentModification"));
protected String labelKey;
Modified: trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_en_GB.properties
===================================================================
--- trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_en_GB.properties 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_en_GB.properties 2014-04-03 14:00:27 UTC (rev 26)
@@ -26,6 +26,9 @@
faxtomail.demandStatus.transmittedToEdi=
faxtomail.demandStatus.untreated=
faxtomail.historyType.archive=
+faxtomail.historyType.attachmentCreation=
+faxtomail.historyType.attachmentModification=
+faxtomail.historyType.attachmentOpening=
faxtomail.historyType.creation=
faxtomail.historyType.modification=
faxtomail.historyType.opening=
Modified: trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_fr_FR.properties
===================================================================
--- trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_fr_FR.properties 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-persistence/src/main/resources/i18n/faxtomail-persistence_fr_FR.properties 2014-04-03 14:00:27 UTC (rev 26)
@@ -26,6 +26,8 @@
faxtomail.demandStatus.transmittedToEdi=Transmis à l'EDI
faxtomail.demandStatus.untreated=Non traité
faxtomail.historyType.archive=Archivage
+faxtomail.historyType.attachmentModification=Modification de pièce jointe
+faxtomail.historyType.attachmentOpening=Ouverture de pièce jointe
faxtomail.historyType.creation=Création
faxtomail.historyType.modification=Modification
faxtomail.historyType.opening=Ouverture
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -133,13 +133,14 @@
return folders;
}
- public Email addToOpeningHistory(String emailId, FaxToMailUser user, Date date) {
+ public Email addToHistory(String emailId, HistoryType type, FaxToMailUser user, Date date, String... fields) {
EmailTopiaDao emailDao = getPersistenceContext().getEmailDao();
Email email = emailDao.findByTopiaId(emailId);
HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao();
- History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.OPENING,
+ History history = historyDao.create(History.PROPERTY_TYPE, type,
History.PROPERTY_FAX_TO_MAIL_USER, user,
+ History.PROPERTY_FIELDS, Sets.newHashSet(fields),
History.PROPERTY_MODIFICATION_DATE, date);
email.addHistory(history);
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -62,10 +62,6 @@
import org.nuiton.jaxx.application.ApplicationTechnicalException;
import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
@@ -350,7 +346,7 @@
if (opened) {
- getEmailService().addToOpeningHistory(email.getTopiaId(), user, now);
+ getEmailService().addToHistory(email.getTopiaId(), HistoryType.OPENING, user, now);
email.setDemandType(types.get(random.nextInt(types.size())));
email.setPriority(priorities.get(random.nextInt(priorities.size())));
email.setRangeRow(rangeRows);
@@ -383,7 +379,7 @@
if (opened) {
- getEmailService().addToOpeningHistory(email.getTopiaId(), user, now);
+ getEmailService().addToHistory(email.getTopiaId(), HistoryType.OPENING, user, now);
email.setDemandType(types.get(random.nextInt(types.size())));
email.setPriority(priorities.get(random.nextInt(priorities.size())));
email.setRangeRow(rangeRows);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GenerateAnnotatedAttachmentAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GenerateAnnotatedAttachmentAction.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GenerateAnnotatedAttachmentAction.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -2,6 +2,7 @@
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
import com.franciaflex.faxtomail.ui.swing.util.JImagePanel;
+import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentEditorUI;
import com.franciaflex.faxtomail.ui.swing.util.attachment.PDFEditorCrossUI;
import com.franciaflex.faxtomail.ui.swing.util.attachment.PDFEditorNoteUI;
import com.franciaflex.faxtomail.ui.swing.util.attachment.PDFEditorUI;
@@ -19,6 +20,7 @@
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import com.itextpdf.text.pdf.PdfWriter;
+import jaxx.runtime.JAXXContext;
import jaxx.runtime.JAXXUtil;
import jaxx.runtime.SwingUtil;
import org.apache.commons.io.FileUtils;
@@ -154,5 +156,11 @@
getModel().setEditedFile(target);
}
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+ AttachmentEditorUI parentUI = (AttachmentEditorUI) getUI().getContextValue(JAXXContext.class, JAXXUtil.PARENT);
+ parentUI.getModel().fireAttachmentEdited(getModel().toEntity());
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-04-03 14:00:27 UTC (rev 26)
@@ -204,6 +204,26 @@
text: { handler.decorate(model.getLastModificationDate()) };
}
+#lastAttachmentOpeningLabel {
+ text: "faxtomail.demande.lastAttachmentOpening.label";
+}
+
+#lastAttachmentOpenedByLabel {
+ text: "faxtomail.common.by.label";
+}
+
+#lastAttachmentOpenedByField {
+ text: { handler.decorateUser(model.getLastAttachmentOpeningUser(), true) };
+}
+
+#lastAttachmentOpeningDateLabel {
+ text: "faxtomail.common.on.label";
+}
+
+#lastAttachmentOpeningDateField {
+ text: { handler.decorate(model.getLastAttachmentOpeningDate()) };
+}
+
#ediCodeNumberLabel {
text: "faxtomail.demande.ediCodeNumber.label";
visible: { model.getEdiCodeNumber() != null };
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-04-03 14:00:27 UTC (rev 26)
@@ -231,6 +231,27 @@
<JLabel id="lastModificationDateField"/>
</cell>
</row>
+ <row>
+ <cell columns='4'>
+ <JLabel id="lastAttachmentOpeningLabel"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel id="lastAttachmentOpenedByLabel"/>
+ </cell>
+ <cell columns="3">
+ <JLabel id="lastAttachmentOpenedByField"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel id="lastAttachmentOpeningDateLabel"/>
+ </cell>
+ <cell weightx='1' columns="3">
+ <JLabel id="lastAttachmentOpeningDateField"/>
+ </cell>
+ </row>
<row>
<cell>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -24,6 +24,8 @@
import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.persistence.entities.Range;
import com.franciaflex.faxtomail.persistence.entities.RangeRow;
import com.franciaflex.faxtomail.services.service.ReferentielService;
@@ -33,7 +35,7 @@
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler;
import com.franciaflex.faxtomail.ui.swing.util.CloseableUI;
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
-import com.google.common.collect.Maps;
+import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentEditorUIModel;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -48,40 +50,25 @@
import org.nuiton.jaxx.application.swing.table.MoveToNextEditableRowAction;
import org.nuiton.jaxx.application.swing.table.MoveToPreviousEditableCellAction;
import org.nuiton.jaxx.application.swing.table.MoveToPreviousEditableRowAction;
-import org.nuiton.topia.persistence.TopiaEntities;
import org.nuiton.util.beans.BeanMonitor;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
import javax.swing.table.TableCellEditor;
-import javax.swing.text.AbstractDocument;
-import javax.swing.text.AttributeSet;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.Element;
-import javax.swing.text.LabelView;
-import javax.swing.text.StyleConstants;
-import javax.swing.text.View;
-import javax.swing.text.ViewFactory;
-import javax.swing.text.html.HTML;
import javax.swing.text.html.HTMLEditorKit;
import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
-import java.awt.print.PrinterJob;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import static org.nuiton.i18n.I18n.t;
@@ -111,7 +98,7 @@
super.beforeInit(ui);
DemandeUIModel model = getContext().getCurrentEmail();
- listModelIsModify(model);
+// listModelIsModify(model);
Set<String> propertiesToIgnore = getPropertiesToIgnore();
monitor = new BeanMonitor(true, propertiesToIgnore.toArray(new String[propertiesToIgnore.size()]));
monitor.setBean(model);
@@ -319,6 +306,39 @@
model.setModify(false);
registerValidators(validator);
+
+ ui.getAttachmentsButton().getBean().addAttachmentListener(
+ new AttachmentEditorUIModel.AttachmentListener() {
+
+ @Override
+ public void onAttachmentOpened(Attachment attachment) {
+ String topiaId = getModel().getTopiaId();
+ if (topiaId != null) {
+ Email email = getContext().getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_OPENING,
+ getContext().getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ getModel().fromEntity(email);
+ }
+ }
+
+ @Override
+ public void onAttachmentEdited(Attachment attachment) {
+ String topiaId = getModel().getTopiaId();
+ if (topiaId != null) {
+ Email email = getContext().getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_MODIFICATION,
+ getContext().getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ getModel().fromEntity(email);
+ }
+ }
+
+
+ }
+ );
}
@Override
@@ -330,6 +350,7 @@
protected Set<String> getPropertiesToIgnore() {
Set<String> result = super.getPropertiesToIgnore();
result.add(DemandeUIModel.PROPERTY_EDITABLE);
+ result.add(Email.PROPERTY_HISTORY);
return result;
}
@@ -347,7 +368,7 @@
public boolean quitUI() {
boolean result = quitScreen(
true,
- getModel().isModify(),
+ getMonitor().wasModified(),
t("faxtomail.demande.askCancelEditBeforeLeaving.cancelSave"),
t("faxtomail.demande.askSaveBeforeLeaving.save"),
getContext().getActionFactory().createUIAction(this, SaveDemandeAction.class)
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -47,6 +47,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
+import java.util.List;
import static org.nuiton.i18n.I18n.t;
@@ -73,6 +74,8 @@
protected History lastModificationHistory;
+ protected History lastAttachmentOpeningHistory;
+
protected int quotationNb;
protected int pfNb;
@@ -95,6 +98,7 @@
public void propertyChange(PropertyChangeEvent evt) {
findFirstOpeningHistory();
findLastModificationHistory();
+ findLastAttachmentOpeningHistory();
}
});
@@ -316,9 +320,8 @@
}
public void setHistory(Collection<History> history) {
- Object oldValue = getHistory();
editObject.setHistory(history);
- firePropertyChanged(Email.PROPERTY_HISTORY, oldValue, history);
+ firePropertyChanged(Email.PROPERTY_HISTORY, null, history);
}
public Collection<History> getHistory() {
@@ -360,6 +363,23 @@
lastModificationHistory = result;
}
+ public void findLastAttachmentOpeningHistory() {
+ History result = null;
+ Date date = null;
+ Collection<History> histories = getHistory();
+ if (histories != null) {
+ for (History history : histories) {
+ if (HistoryType.ATTACHMENT_OPENING.equals(history.getType())) {
+ if (date == null || date.before(history.getModificationDate())) {
+ date = history.getModificationDate();
+ result = history;
+ }
+ }
+ }
+ }
+ lastAttachmentOpeningHistory = result;
+ }
+
public History getFirstOpeningHistory() {
return firstOpeningHistory;
}
@@ -388,6 +408,20 @@
return history != null ? history.getModificationDate() : null;
}
+ public History getLastAttachmentOpeningHistory() {
+ return lastAttachmentOpeningHistory;
+ }
+
+ public FaxToMailUser getLastAttachmentOpeningUser() {
+ History history = getLastAttachmentOpeningHistory();
+ return history != null ? history.getFaxToMailUser() : null;
+ }
+
+ public Date getLastAttachmentOpeningDate() {
+ History history = getLastAttachmentOpeningHistory();
+ return history != null ? history.getModificationDate() : null;
+ }
+
@Override
public Collection<Attachment> getAttachment() {
return attachments;
@@ -395,28 +429,32 @@
@Override
public void addAllAttachment(Collection<Attachment> attachment) {
+ Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.addAll(attachment);
- firePropertyChange(Email.PROPERTY_ATTACHMENT, null, getAttachment());
+ firePropertyChange(Email.PROPERTY_ATTACHMENT, oldValue, getAttachment());
}
@Override
public void addAttachment(Attachment attachment) {
+ Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.add(attachment);
- firePropertyChange(Email.PROPERTY_ATTACHMENT, null, getAttachment());
+ firePropertyChange(Email.PROPERTY_ATTACHMENT, oldValue, getAttachment());
}
@Override
public void removeAttachment(Attachment attachment) {
+ Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.remove(attachment);
- firePropertyChange(Email.PROPERTY_ATTACHMENT, null, getAttachment());
+ firePropertyChange(Email.PROPERTY_ATTACHMENT, oldValue, getAttachment());
}
public void setAttachment(Collection<Attachment> attachment) {
+ Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.clear();
if (attachment != null) {
attachments.addAll(attachment);
}
- firePropertyChange(Email.PROPERTY_ATTACHMENT, null, getAttachment());
+ firePropertyChange(Email.PROPERTY_ATTACHMENT, oldValue, getAttachment());
}
public Collection<RangeRow> getRangeRow() {
@@ -424,26 +462,30 @@
}
public void addRangeRow(RangeRow rangeRow) {
+ Object oldValue = new ArrayList<RangeRow>(getRangeRow());
editObject.addRangeRow(rangeRow);
- firePropertyChange(Email.PROPERTY_RANGE_ROW, null, getRangeRow());
+ firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void addAllRangeRow(Collection<RangeRow> rangeRow) {
+ Object oldValue = new ArrayList<RangeRow>(getRangeRow());
editObject.addAllRangeRow(rangeRow);
- firePropertyChange(Email.PROPERTY_RANGE_ROW, null, getRangeRow());
+ firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void removeRangeRow(RangeRow rangeRow) {
+ Object oldValue = new ArrayList<RangeRow>(getRangeRow());
editObject.removeRangeRow(rangeRow);
- firePropertyChange(Email.PROPERTY_RANGE_ROW, null, getRangeRow());
+ firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public void setRangeRow(Collection<RangeRow> rangeRow) {
+ Object oldValue = new ArrayList<RangeRow>(getRangeRow());
if (rangeRow == null) {
rangeRow = new ArrayList<RangeRow>();
}
editObject.setRangeRow(rangeRow);
- firePropertyChange(Email.PROPERTY_RANGE_ROW, null, getRangeRow());
+ firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
}
public MailFolder getMailFolder() {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -87,4 +87,5 @@
attachments.remove(attachment);
firePropertyChange(AttachmentModelAware.PROPERTY_ATTACHMENT, null, getAttachment());
}
+
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -5,17 +5,15 @@
import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.HasLabel;
+import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.persistence.entities.Priority;
import com.franciaflex.faxtomail.persistence.entities.RangeRow;
-import com.franciaflex.faxtomail.services.service.ValidationService;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
-import com.franciaflex.faxtomail.ui.swing.content.demande.RangeRowModel;
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentCellEditor;
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentCellRenderer;
import com.google.common.base.Function;
-import jaxx.runtime.swing.renderer.DecoratorTableCellRenderer;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,7 +32,6 @@
import javax.swing.*;
import javax.swing.event.ChangeListener;
import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.awt.event.MouseAdapter;
@@ -203,9 +200,10 @@
DemandeUIModel selectedEmail = tableModel.getEntry(rowIndex);
onDoubleClickOnDemande(selectedEmail);
FaxToMailUIContext context = getContext();
- Email email = context.getEmailService().addToOpeningHistory(selectedEmail.getTopiaId(),
- context.getCurrentUser(),
- new Date());
+ Email email = context.getEmailService().addToHistory(selectedEmail.getTopiaId(),
+ HistoryType.OPENING,
+ context.getCurrentUser(),
+ new Date());
selectedEmail.fromEntity(email);
openDemand(selectedEmail);
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -182,7 +182,9 @@
@Override
public void propertyChange(PropertyChangeEvent evt) {
- if (!excludeProperties.contains(evt.getPropertyName())) {
+ if (!excludeProperties.contains(evt.getPropertyName())
+ //check that the new value and old value are not both null
+ && evt.getNewValue() != evt.getOldValue()) {
((AbstractFaxToMailBeanUIModel) evt.getSource()).setModify(true);
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentCellEditor.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -24,7 +24,10 @@
* #L%
*/
+import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailBeanUIModel;
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI;
import com.google.common.base.Preconditions;
@@ -38,6 +41,7 @@
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
import java.awt.*;
+import java.util.Date;
import java.util.EventObject;
/**
@@ -69,7 +73,12 @@
protected final ButtonAttachment editorButton;
+ protected FaxToMailUIContext context;
+
+ protected AttachmentEditorUIModel.AttachmentListener listener;
+
public AttachmentCellEditor(FaxToMailUIContext context) {
+ this.context = context;
this.editorButton = new ButtonAttachment("faxtomail.attachmentCellRenderer.text", null);
this.editorButton.setBorder(new LineBorder(Color.BLACK));
@@ -99,11 +108,36 @@
rowIndex = row;
columnIndex = column;
- AttachmentModelAware model =
- (AttachmentModelAware) tableModel.getEntry(row);
+ final DemandeUIModel model = (DemandeUIModel) tableModel.getEntry(row);
editorButton.init(model);
+ listener = new AttachmentEditorUIModel.AttachmentListener() {
+ @Override
+ public void onAttachmentOpened(Attachment attachment) {
+ String topiaId = model.getTopiaId();
+ if (topiaId != null) {
+ context.getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_OPENING,
+ context.getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ }
+ }
+
+ @Override
+ public void onAttachmentEdited(Attachment attachment) {
+ String topiaId = model.getTopiaId();
+ context.getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_MODIFICATION,
+ context.getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ }
+ };
+
+ editorButton.getBean().addAttachmentListener(listener);
+
return editorButton;
}
@@ -115,7 +149,7 @@
@Override
public Object getCellEditorValue() {
- AttachmentModelAware model = editorButton.getBean();
+ AttachmentEditorUIModel model = editorButton.getBean();
Preconditions.checkNotNull(model, "No model found in editor.");
Object result = model.getAttachment();
@@ -130,6 +164,7 @@
public boolean stopCellEditing() {
boolean b = super.stopCellEditing();
if (b) {
+ editorButton.getBean().removeAttachmentListener(listener);
editorButton.init(null);
}
return b;
@@ -137,6 +172,7 @@
@Override
public void cancelCellEditing() {
+ editorButton.getBean().removeAttachmentListener(listener);
editorButton.init(null);
super.cancelCellEditing();
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -31,6 +31,7 @@
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
+import java.util.Date;
import java.util.List;
import static org.nuiton.i18n.I18n.t;
@@ -53,7 +54,7 @@
initTable(ui.getAttachments());
- getModel().addPropertyChangeListener(AttachmentEditorUIModel.PROPERTY_ATTACHMENT, new PropertyChangeListener() {
+ getModel().addPropertyChangeListener(AttachmentModelAware.PROPERTY_ATTACHMENT, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
AbstractTableModel tableModel = (AbstractTableModel) getUI().getAttachments().getModel();
@@ -164,8 +165,10 @@
throw new ApplicationTechnicalException(t("faxtomail.attachmentEditor.fileNotFound", file.getAbsolutePath()));
}
+ getModel().fireAttachmentOpened(attachment);
+
String extension = FileUtil.extension(file);
- if (EDITABLE_EXTENSIONS.contains(extension.toUpperCase())) {
+ if (getModel().isEditable() && EDITABLE_EXTENSIONS.contains(extension.toUpperCase())) {
PDFEditorUI dialogContent = new PDFEditorUI(ui);
dialogContent.getModel().fromEntity(attachment);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIModel.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIModel.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -8,13 +8,13 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
/**
* @author Kevin Morin (Code Lutin)
* @since x.x
*/
-public class AttachmentEditorUIModel extends AbstractFaxToMailBeanUIModel<AttachmentModelAware, AttachmentEditorUIModel>
- implements AttachmentModelAware {
+public class AttachmentEditorUIModel extends AbstractFaxToMailBeanUIModel<AttachmentModelAware, AttachmentEditorUIModel> {
public static final String PROPERTY_FILE = "file";
public static final String PROPERTY_EDITABLE = "editable";
@@ -24,6 +24,8 @@
protected final Collection<Attachment> attachments = new ArrayList<Attachment>();
+ protected List<AttachmentListener> openingListeners = new ArrayList<AttachmentListener>();
+
protected static Binder<AttachmentEditorUIModel, AttachmentModelAware> toBeanBinder =
BinderFactory.newBinder(AttachmentEditorUIModel.class,
AttachmentModelAware.class);
@@ -55,26 +57,22 @@
firePropertyChange(PROPERTY_EDITABLE, oldValue, editable);
}
- @Override
public Collection<Attachment> getAttachment() {
return attachments;
}
- @Override
public void addAllAttachment(Collection<Attachment> attachments) {
Object oldValue = new ArrayList<Attachment>(getAttachment());
this.attachments.addAll(attachments);
firePropertyChange(AttachmentModelAware.PROPERTY_ATTACHMENT, oldValue, this.attachments);
}
- @Override
public void addAttachment(Attachment attachment) {
Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.add(attachment);
firePropertyChange(AttachmentModelAware.PROPERTY_ATTACHMENT, oldValue, attachments);
}
- @Override
public void removeAttachment(Attachment attachment) {
Object oldValue = new ArrayList<Attachment>(getAttachment());
attachments.remove(attachment);
@@ -94,4 +92,32 @@
protected AttachmentModelAware newEntity() {
return null;
}
+
+ public void addAttachmentListener(AttachmentListener listener) {
+ openingListeners.add(listener);
+ }
+
+ public void removeAttachmentListener(AttachmentListener listener) {
+ openingListeners.remove(listener);
+ }
+
+ public void fireAttachmentOpened(Attachment attachment) {
+ for (AttachmentListener listener : openingListeners) {
+ listener.onAttachmentOpened(attachment);
+ }
+ }
+
+ public void fireAttachmentEdited(Attachment attachment) {
+ for (AttachmentListener listener : openingListeners) {
+ listener.onAttachmentEdited(attachment);
+ }
+ }
+
+ public static interface AttachmentListener {
+
+ public void onAttachmentOpened(Attachment attachment);
+
+ public void onAttachmentEdited(Attachment attachment);
+
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/ButtonAttachment.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/ButtonAttachment.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/ButtonAttachment.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -70,13 +70,13 @@
public void init(AttachmentModelAware model) {
attachmentModelAware = model;
- popup.getModel().removePropertyChangeListener(AttachmentEditorUIModel.PROPERTY_ATTACHMENT, listener);
+ popup.getModel().removePropertyChangeListener(AttachmentModelAware.PROPERTY_ATTACHMENT, listener);
popup.getModel().fromEntity(model);
- popup.getModel().addPropertyChangeListener(AttachmentEditorUIModel.PROPERTY_ATTACHMENT, listener);
+ popup.getModel().addPropertyChangeListener(AttachmentModelAware.PROPERTY_ATTACHMENT, listener);
setText(getButtonText(model != null ? model.getAttachment() : null));
}
- public AttachmentModelAware getBean() {
+ public AttachmentEditorUIModel getBean() {
return popup.getModel();
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/ButtonHistory.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/ButtonHistory.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/ButtonHistory.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -1,6 +1,8 @@
package com.franciaflex.faxtomail.ui.swing.util.history;
import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.History;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupButton;
import com.franciaflex.faxtomail.ui.swing.util.attachment.AttachmentEditorUI;
@@ -18,6 +20,7 @@
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.util.Collection;
import java.util.List;
import static org.nuiton.i18n.I18n.t;
@@ -34,6 +37,16 @@
setToolTipText(t("faxtomail.historyList.action.tip"));
int historySize = popup.getModel().sizeHistory();
setText(t("faxtomail.historyList.text", historySize));
+
+ popup.getModel().addPropertyChangeListener(Email.PROPERTY_HISTORY, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ Collection<History> history = (Collection<History>) evt.getNewValue();
+ if (history != null) {
+ setText(t("faxtomail.historyList.text", history.size()));
+ }
+ }
+ });
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIHandler.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -1,5 +1,6 @@
package com.franciaflex.faxtomail.ui.swing.util.history;
+import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.History;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupHandler;
@@ -12,6 +13,7 @@
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXList;
import org.jdesktop.swingx.decorator.HighlighterFactory;
+import org.nuiton.i18n.I18n;
import org.nuiton.util.StringUtil;
import javax.swing.*;
@@ -52,11 +54,20 @@
n("faxtomail.demande.rangeRow.label");
}
+ protected PropertyChangeListener historyChangeListener = new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ Collection<History> history = (Collection<History>) evt.getNewValue();
+ getModel().setHistory(history);
+ }
+ };
+
@Override
public void beforeInit(HistoryListUI ui) {
super.beforeInit(ui);
DemandeUIModel currentEmail = getContext().getCurrentEmail();
+ currentEmail.addPropertyChangeListener(Email.PROPERTY_HISTORY, historyChangeListener);
HistoryListUIModel model = new HistoryListUIModel();
model.fromBean(currentEmail);
@@ -73,10 +84,19 @@
listModel.setAllElements(getModel().getHistory());
list.setModel(listModel);
list.addHighlighter(HighlighterFactory.createAlternateStriping());
+
+ getModel().addPropertyChangeListener(Email.PROPERTY_HISTORY, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ Collection<History> history = (Collection<History>) evt.getNewValue();
+ ((JaxxDefaultListModel) getUI().getHistories().getModel()).setAllElements(history);
+ }
+ });
}
@Override
public void onCloseUI() {
+ getContext().getCurrentEmail().removePropertyChangeListener(Email.PROPERTY_HISTORY, historyChangeListener);
}
@Override
@@ -93,7 +113,13 @@
List<String> fieldLabels = new ArrayList<String>();
if (fields != null) {
for (String field : fields) {
- fieldLabels.add(t("faxtomail.demande." + field + ".label"));
+ String label;
+ if (I18n.hasKey(field)) {
+ label = t("faxtomail.demande." + field + ".label");
+ } else {
+ label = field;
+ }
+ fieldLabels.add(label);
}
}
return StringUtils.join(fieldLabels, ", ");
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIModel.java 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryListUIModel.java 2014-04-03 14:00:27 UTC (rev 26)
@@ -31,6 +31,7 @@
public void setHistory(Collection<History> history) {
editObject.setHistory(history);
+ firePropertyChanged(Email.PROPERTY_HISTORY, null, history);
}
public Collection<History> getHistory() {
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-03 14:00:27 UTC (rev 26)
@@ -132,6 +132,7 @@
faxtomail.demande.gamme.label=
faxtomail.demande.group.button.label=
faxtomail.demande.history.label=
+faxtomail.demande.lastAttachmentOpening.label=
faxtomail.demande.lastModificationDate.label=
faxtomail.demande.lastModified.label=
faxtomail.demande.lastModifiedBy.label=
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-02 15:46:04 UTC (rev 25)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-03 14:00:27 UTC (rev 26)
@@ -56,6 +56,7 @@
faxtomail.demande.fax.label=Fax
faxtomail.demande.firstOpened.label=Première ouverture
faxtomail.demande.group.button.label=Grouper
+faxtomail.demande.lastAttachmentOpening.label=Dernière ouverture de pièce-jointe
faxtomail.demande.lastModified.label=Dernière modification
faxtomail.demande.mailBody.label=Corps du mail
faxtomail.demande.mailFolder.label=Dossier
1
0
02 Apr '14
See <http://ci.codelutin.com/jenkins/job/faxtomail-ci/13/changes>
Changes:
[kmorin] refs #4654 [ECRAN] Liste des mails / fax
refs #4655 [ECRAN] Détail d'un mail / fax
------------------------------------------
[...truncated 148 lines...]
[INFO] Add compile source root : <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO] Add resource root :Resource {targetPath: null, filtering: false, FileSet {directory: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…,> PatternSet [includes: {}, excludes: {**/*.java}]}}
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (scan-sources) @ faxtomail-persistence ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-persistence >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ faxtomail-persistence ---
[INFO] Copying faxtomail-persistence.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO] Copying faxtomail-persistence.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-persistence <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-persistence ---
[WARNING] bundle fr_FR contains 30/33 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 33/33 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ faxtomail-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-persistence ---
[INFO] Compiling 121 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ faxtomail-persistence ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ faxtomail-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ faxtomail-persistence ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ faxtomail-persistence ---
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ faxtomail-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-persist…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ faxtomail-persistence ---
[JENKINS] Archiving disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FaxToMail :: Service 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ faxtomail-service ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ faxtomail-service ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (scan-sources) @ faxtomail-service ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserValidation (scan-sources) @ faxtomail-service ---
[INFO] Load rules file validation.rules
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-service >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ faxtomail-service ---
[INFO] Copying faxtomail-service.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO] Copying faxtomail-service.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-service <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-service ---
[WARNING] bundle fr_FR contains 4/5 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 67/67 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ faxtomail-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-service ---
[INFO] Compiling 16 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…> uses unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ faxtomail-service ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ faxtomail-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ faxtomail-service ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ faxtomail-service ---
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ faxtomail-service ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-service…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ faxtomail-service ---
[JENKINS] Archiving disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FaxToMail :: Web 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ faxtomail-ui-web ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ faxtomail-ui-web ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserStruts2 (parseJsp) @ faxtomail-ui-web ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (parseOthersAndGen) @ faxtomail-ui-web ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ faxtomail-ui-web ---
[INFO] Copying faxtomail-ui-web.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO] Copying faxtomail-ui-web.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ faxtomail-ui-web ---
[INFO] collected 8 i18n artifacts for locale fr_FR stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO] collected 8 i18n artifacts for locale en_GB stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web ---
[WARNING] bundle fr_FR contains 34/92 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 90/144 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ faxtomail-ui-web ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-ui-web ---
[INFO] Compiling 12 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>: Recompile with -Xlint:unchecked for details.
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>:[161,25] cannot find symbol
symbol: variable PROPERTY_CLIENT_CODE
location: interface com.franciaflex.faxtomail.persistence.entities.Email
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] FaxToMail ......................................... SUCCESS [ 2.880 s]
[INFO] FaxToMail :: Persistence .......................... SUCCESS [ 13.371 s]
[INFO] FaxToMail :: Service .............................. SUCCESS [ 2.035 s]
[INFO] FaxToMail :: Web .................................. FAILURE [ 1.880 s]
[INFO] FaxToMail :: UI ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.664 s
[INFO] Finished at: 2014-03-31T18:56:17+01:00
[JENKINS] Archiving disabled
[INFO] Final Memory: 46M/697M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project faxtomail-ui-web: Compilation failure
[ERROR] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>:[161,25] cannot find symbol
[ERROR] symbol: variable PROPERTY_CLIENT_CODE
[ERROR] location: interface com.franciaflex.faxtomail.persistence.entities.Email
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project faxtomail-ui-web: Compilation failure
<http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>:[161,25] cannot find symbol
symbol: variable PROPERTY_CLIENT_CODE
location: interface com.franciaflex.faxtomail.persistence.entities.Email
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
<http://ci.codelutin.com/jenkins/job/faxtomail-ci/ws/trunk/faxtomail-ui-web/…>:[161,25] cannot find symbol
symbol: variable PROPERTY_CLIENT_CODE
location: interface com.franciaflex.faxtomail.persistence.entities.Email
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :faxtomail-ui-web
Sending e-mails to: faxtomail-commits(a)list.forge.codelutin.com
channel stopped
1
2
Build failed in Jenkins: faxtomail-ci » FaxToMail :: UI #14
by admin+ci-codelutin.com@codelutin.com 02 Apr '14
by admin+ci-codelutin.com@codelutin.com 02 Apr '14
02 Apr '14
See <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
Changes:
[kmorin] refs #4654 [ECRAN] Liste des mails / fax
refs #4655 [ECRAN] Détail d'un mail / fax
refs #4666 [ECRAN] Pièces jointes
gestion des statuts, différentiation des pièces jointes d'origine et ajoutées par l'utilisateur
refs #4658 [TECH] Archivage
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FaxToMail :: UI 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui… (5 KB at 65.6 KB/sec)
[INFO] Downloading: http://repository.springsource.com/maven/bundles/external/org/nuiton/jaxx/j…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/faxtomail-group/org/nuiton/jax…
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-config/2.8.2/jaxx-…
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-config/2.8.2/jaxx-… (5 KB at 4.7 KB/sec)
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui… (6 KB at 94.4 KB/sec)
[INFO] Downloading: http://repository.springsource.com/maven/bundles/external/org/nuiton/jaxx/j…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/faxtomail-group/org/nuiton/jax…
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-application-swing/…
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-application-swing/… (6 KB at 185.3 KB/sec)
[INFO] Downloading: http://repository.springsource.com/maven/bundles/external/org/nuiton/nuiton…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui… (97 KB at 1394.4 KB/sec)
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui… (81 KB at 734.1 KB/sec)
[INFO] Downloading: http://repository.springsource.com/maven/bundles/external/org/nuiton/jaxx/j…
[INFO] Downloading: http://repository.springsource.com/maven/bundles/external/org/nuiton/jaxx/j…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/faxtomail-group/org/nuiton/jax…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/faxtomail-group/org/nuiton/jax…
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-config/2.8.2/jaxx-…
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-application-swing/…
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-config/2.8.2/jaxx-… (81 KB at 1194.2 KB/sec)
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-application-swing/… (97 KB at 198.4 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ faxtomail-ui-swing ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ faxtomail-ui-swing ---
[INFO]
[INFO] --- jaxx-maven-plugin:2.8.2:generate (default) @ faxtomail-ui-swing ---
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/repositories/central-releases/org/nui… (0 B at 0.0 KB/sec)
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/faxtomail-group/org/nuiton/jax…
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-widgets-extra/2.8.…
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/nuiton/jaxx/jaxx-widgets-extra/2.8.… (0 B at 0.0 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 16 modified jaxx file(s).
[WARNING] JAXX detects 1 warning :
<http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
jaxx supports i18n, no need to add explicit call to I18n.t for attribute 'text' in component 'attachmentNameLabel' : [ attachment != null ? getAttachment().getOriginalFile().getName() : null ]
[INFO] Generated 16 file(s) in 3.276s
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (scan-sources) @ faxtomail-ui-swing ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserValidation (scan-sources) @ faxtomail-ui-swing ---
[INFO] Load rules file validation.rules
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-ui-swing >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ faxtomail-ui-swing ---
[INFO] Copying faxtomail-ui-swing.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] Copying faxtomail-ui-swing.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-ui-swing <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (scan-sources) @ faxtomail-ui-swing ---
[WARNING] bundle fr_FR contains 15/201 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 385/385 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (make-bundle) @ faxtomail-ui-swing >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ faxtomail-ui-swing ---
[INFO] collected 11 i18n artifacts for locale fr_FR stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] collected 11 i18n artifacts for locale en_GB stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (make-bundle) @ faxtomail-ui-swing <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (make-bundle) @ faxtomail-ui-swing ---
[WARNING] bundle fr_FR contains 47/438 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 487/659 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- license-maven-plugin:1.6:update-project-license (attach-licenses) @ faxtomail-ui-swing ---
[INFO]
[INFO] --- license-maven-plugin:1.6:add-third-party (attach-licenses) @ faxtomail-ui-swing ---
[WARNING] No license name defined for org.hibernate.javax.persistence--hibernate-jpa-2.0-api--1.0.1.Final
[INFO] Load missing file <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] Missing file <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…> is up-to-date.
[INFO] Writing third-party file to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] Writing bundled third-party file to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] Will attach third party file from <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ faxtomail-ui-swing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 37 resources
[INFO] Copying 4 resources
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-ui-swing ---
[INFO] Compiling 82 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>: Recompile with -Xlint:unchecked for details.
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>:[439,76] cannot find symbol
symbol: method getLabelKey()
location: class com.franciaflex.faxtomail.persistence.entities.HistoryType
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
1
1
r25 - in trunk/faxtomail-ui-swing/src/main: java/com/franciaflex/faxtomail/ui/swing/util/attachment java/com/franciaflex/faxtomail/ui/swing/util/history resources/i18n resources/icons
by kmorin@users.forge.codelutin.com 02 Apr '14
by kmorin@users.forge.codelutin.com 02 Apr '14
02 Apr '14
Author: kmorin
Date: 2014-04-02 17:46:04 +0200 (Wed, 02 Apr 2014)
New Revision: 25
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/25
Log:
refs #4655 [ECRAN] D?\195?\169tail d'un mail / fax
affichage de l'historique
refs #4666 [ECRAN] Pi?\195?\168ces jointes
croix bleu au lieu de rouge
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/PDFEditorCrossUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.jaxx
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
trunk/faxtomail-ui-swing/src/main/resources/icons/action-cross.png
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/AttachmentEditorUIHandler.java 2014-04-02 15:46:04 UTC (rev 25)
@@ -244,6 +244,14 @@
boolean isSelected, int row, int column) {
Attachment attachment = (Attachment) value;
attachmentItem.setAttachment(attachment);
+
+ if (attachment != null) {
+ JLabel label = attachmentItem.getAttachmentNameLabel();
+ String actionIconName = Boolean.TRUE.equals(attachment.getAddedByUser()) ? "user" : "email";
+ Icon icon = SwingUtil.createActionIcon(actionIconName);
+ label.setIcon(icon);
+ }
+
return attachmentItem;
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/PDFEditorCrossUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/PDFEditorCrossUI.jaxx 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/attachment/PDFEditorCrossUI.jaxx 2014-04-02 15:46:04 UTC (rev 25)
@@ -10,10 +10,10 @@
<script><![CDATA[
- public static final String CROSS_IMAGE_FILE = "cross.png";
+ public static final String CROSS_IMAGE_FILE = "cross_blue.png";
public PDFEditorCrossUI() {
- setImage(SwingUtil.createImageIcon("cross.png").getImage());
+ setImage(SwingUtil.createImageIcon(CROSS_IMAGE_FILE).getImage());
}
protected void removeCross() {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.css 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.css 2014-04-02 15:46:04 UTC (rev 25)
@@ -2,17 +2,28 @@
border: { BorderFactory.createEmptyBorder(2, 3, 2, 3) };
}
-#type {
- text : { JAXXUtil.getStringValue(model.getType().getLabelKey()) };
+#data {
+ opaque: false;
+}
+
+#dateLabel {
+ text : "faxtomail.common.on.label";
+ font-style: "italic";
+}
+
+#date {
+ text : { handler.decorate(model.getModificationDate()) };
font-weight: "bold";
}
-#fields {
- text : { handler.decorateFields(model.getFields()) };
+#typeLabel {
+ text : ":";
+ font-style: "italic";
}
-#data {
- opaque: false;
+#type {
+ text : { JAXXUtil.getStringValue(model.getType().getLabel()) };
+ font-weight: "bold";
}
#userLabel {
@@ -24,11 +35,6 @@
text : { handler.decorateUser(model.getFaxToMailUser(), true) };
}
-#dateLabel {
- text : "faxtomail.common.on.label";
- font-style: "italic";
-}
-
-#date {
- text : { handler.decorate(model.getModificationDate()) };
-}
+#fields {
+ text : { handler.decorateFields(model.getFields()) };
+}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.jaxx 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/history/HistoryItem.jaxx 2014-04-02 15:46:04 UTC (rev 25)
@@ -21,16 +21,17 @@
}
]]></script>
- <JLabel id='type'/>
-
- <JLabel id='fields'/>
-
<JPanel id="data"
layout="{new FlowLayout(FlowLayout.LEADING)}">
+
+ <JLabel id='dateLabel'/>
+ <JLabel id='date'/>
+ <JLabel id='typeLabel'/>
+ <JLabel id='type'/>
<JLabel id='userLabel'/>
<JLabel id='user'/>
- <JLabel id='dateLabel'/>
- <JLabel id='date'/>
</JPanel>
+ <JLabel id='fields'/>
+
</JPanel>
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-04-02 15:46:04 UTC (rev 25)
@@ -1,5 +1,6 @@
\ |\ =
1\ -\ Volets\ roulants=
+\:=
Ajouter=
Derni\\u00e8re\ modification\ par\ Utilisateur\ 1\ le\ 14/01/2014\ \\u00e0\ 08\:42=
Editer=
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-02 13:47:41 UTC (rev 24)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-02 15:46:04 UTC (rev 25)
@@ -1,4 +1,5 @@
\ |\ =
+\:=
X=
application.action.create.error=
application.error.ui.business.warning=
Modified: trunk/faxtomail-ui-swing/src/main/resources/icons/action-cross.png
===================================================================
(Binary files differ)
1
0
Build failed in Jenkins: faxtomail-ci » FaxToMail :: Web #13
by admin+ci-codelutin.com@codelutin.com 02 Apr '14
by admin+ci-codelutin.com@codelutin.com 02 Apr '14
02 Apr '14
See <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FaxToMail :: Web 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ faxtomail-ui-web ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ faxtomail-ui-web ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserStruts2 (parseJsp) @ faxtomail-ui-web ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (parseOthersAndGen) @ faxtomail-ui-web ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ faxtomail-ui-web ---
[INFO] Copying faxtomail-ui-web.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] Copying faxtomail-ui-web.properties to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ faxtomail-ui-web ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ faxtomail-ui-web ---
[INFO] collected 8 i18n artifacts for locale fr_FR stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] collected 8 i18n artifacts for locale en_GB stored in <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (parseOthersAndGen) @ faxtomail-ui-web ---
[WARNING] bundle fr_FR contains 34/92 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 90/144 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ faxtomail-ui-web ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-ui-web ---
[INFO] Compiling 12 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>: Recompile with -Xlint:unchecked for details.
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.codelutin.com/jenkins/job/faxtomail-ci/com.franciaflex.faxtomail$…>:[161,25] cannot find symbol
symbol: variable PROPERTY_CLIENT_CODE
location: interface com.franciaflex.faxtomail.persistence.entities.Email
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
1
1