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
- 1934 discussions
r654 - in trunk: . faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-ui-swing faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util
by kmorin@users.forge.codelutin.com 30 Sep '14
by kmorin@users.forge.codelutin.com 30 Sep '14
30 Sep '14
Author: kmorin
Date: 2014-09-30 14:22:29 +0200 (Tue, 30 Sep 2014)
New Revision: 654
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/654
Log:
test impression avec pdfbox
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ClientTopiaDao.java
trunk/faxtomail-ui-swing/pom.xml
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java
trunk/pom.xml
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ClientTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ClientTopiaDao.java 2014-09-29 15:02:51 UTC (rev 653)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ClientTopiaDao.java 2014-09-30 12:22:29 UTC (rev 654)
@@ -40,7 +40,7 @@
String query = "FROM " + Client.class.getName() + " WHERE " + property + " LIKE :propValue";
Map<String, Object> args = new HashMap<>();
- args.put("propValue", "%" + value + "%");
+ args.put("propValue", "%\"" + value + "\"%");
List<Client> result = findAll(query, args);
return result;
}
Modified: trunk/faxtomail-ui-swing/pom.xml
===================================================================
--- trunk/faxtomail-ui-swing/pom.xml 2014-09-29 15:02:51 UTC (rev 653)
+++ trunk/faxtomail-ui-swing/pom.xml 2014-09-30 12:22:29 UTC (rev 654)
@@ -226,6 +226,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.pdfbox</groupId>
+ <artifactId>pdfbox</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.media.jai</groupId>
<artifactId>com.springsource.javax.media.jai.core</artifactId>
<version>1.1.3</version>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUIHandler.java 2014-09-29 15:02:51 UTC (rev 653)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUIHandler.java 2014-09-30 12:22:29 UTC (rev 654)
@@ -78,15 +78,7 @@
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler;
import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
import com.franciaflex.faxtomail.ui.swing.util.JImagePanel;
-import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
-import com.itextpdf.text.PageSize;
-import com.itextpdf.text.Paragraph;
-import com.itextpdf.text.pdf.PdfWriter;
-import com.sun.media.jai.codec.ByteArraySeekableStream;
-import com.sun.media.jai.codec.ImageCodec;
-import com.sun.media.jai.codec.ImageDecoder;
-import com.sun.media.jai.codec.SeekableStream;
import com.sun.pdfview.PDFFile;
import com.sun.pdfview.PDFPage;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-09-29 15:02:51 UTC (rev 653)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-09-30 12:22:29 UTC (rev 654)
@@ -52,10 +52,15 @@
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.regex.Pattern;
import javax.media.jai.PlanarImage;
+import javax.print.PrintService;
+import javax.print.attribute.HashPrintRequestAttributeSet;
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.standard.JobName;
import javax.swing.Icon;
import javax.swing.JTextPane;
import javax.swing.JTree;
@@ -80,6 +85,11 @@
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.PDPage;
+import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
+import org.apache.pdfbox.pdmodel.font.PDFont;
+import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.nuiton.jaxx.application.ApplicationTechnicalException;
import org.nuiton.jaxx.application.swing.util.ApplicationUIUtil;
import org.nuiton.util.FileUtil;
@@ -113,8 +123,6 @@
import com.sun.media.jai.codec.ImageCodec;
import com.sun.media.jai.codec.ImageDecoder;
import com.sun.media.jai.codec.SeekableStream;
-import com.sun.pdfview.PDFFile;
-import com.sun.pdfview.PDFPrintPage;
/**
* @author kmorin - morin(a)codelutin.com
@@ -495,41 +503,28 @@
protected static boolean printWithPdfRenderer(String printName, FileInputStream fis, boolean defaultPrinter) {
boolean result = false;
+ PDDocument document = null;
try {
- // Create a PDFFile from a File reference
- FileChannel fc = fis.getChannel();
- ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
- PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
- PDFPrintPage pages = new PDFPrintPage(pdfFile);
- // fix fit to page
- // see http://lynema.org/2010/12/29/printing-a-pdf-in-java-with-pdfrenderer
PrinterJob pjob = PrinterJob.getPrinterJob();
- PageFormat pf = pjob.defaultPage();
- pf.setOrientation(PageFormat.PORTRAIT);
-
- Paper paper = new Paper();
- paper.setImageableArea(0, 0, paper.getWidth() * 2, paper.getHeight());
- pf.setPaper(paper);
-
- // Create Print Job
pjob.setJobName(printName);
- Book book = new Book();
- book.append(pages, pf, pdfFile.getNumPages());
- pjob.setPageable(book);
-
- // Send print job to default printer
- result = defaultPrinter || pjob.printDialog();
- if (result) {
- pjob.print();
+
+ document = PDDocument.load(fis);
+ if (defaultPrinter) {
+ document.silentPrint(pjob);
+ } else {
+ document.print(pjob);
}
+ result = true;
- } catch (PrinterException | IOException ex) {
+ } catch (PrinterException | IOException e) {
if (log.isErrorEnabled()) {
- log.error("can't print", ex);
+ log.error("can't print", e);
}
- }
+ } finally {
+ IOUtils.closeQuietly(document);
+ }
return result;
}
@@ -570,8 +565,10 @@
try {
br = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
StringBuilder text = new StringBuilder();
- while (br.readLine() != null) {
- text.append(br.readLine()).append("\n");
+ String line = br.readLine();
+ while (line != null) {
+ text.append(line).append("\n");
+ line = br.readLine();
}
document.add(new Paragraph(text.toString()));
br.close();
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-09-29 15:02:51 UTC (rev 653)
+++ trunk/pom.xml 2014-09-30 12:22:29 UTC (rev 654)
@@ -304,6 +304,12 @@
<version>5.5.2</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.pdfbox</groupId>
+ <artifactId>pdfbox</artifactId>
+ <version>1.8.7</version>
+ </dependency>
+
<!-- librairie Jaxx -->
<dependency>
<groupId>org.nuiton.jaxx</groupId>
1
0
r653 - in trunk: . faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-ui-swing faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 17:02:51 +0200 (Mon, 29 Sep 2014)
New Revision: 653
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/653
Log:
- fix release build
- correction import archives
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java
trunk/faxtomail-ui-swing/pom.xml
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportArchiveAction.java
trunk/pom.xml
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java 2014-09-29 14:21:28 UTC (rev 652)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java 2014-09-29 15:02:51 UTC (rev 653)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.persistence.entities;
+/*
+ * #%L
+ * FaxToMail :: Persistence
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
Modified: trunk/faxtomail-ui-swing/pom.xml
===================================================================
--- trunk/faxtomail-ui-swing/pom.xml 2014-09-29 14:21:28 UTC (rev 652)
+++ trunk/faxtomail-ui-swing/pom.xml 2014-09-29 15:02:51 UTC (rev 653)
@@ -183,6 +183,11 @@
<artifactId>swingx-common</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-autocomplete</artifactId>
+ </dependency>
+
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css 2014-09-29 14:21:28 UTC (rev 652)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css 2014-09-29 15:02:51 UTC (rev 653)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * FaxToMail :: UI
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
BeanFilterableComboBox, BeanComboBox {
maximumRowCount: 20;
}
\ No newline at end of file
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportArchiveAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportArchiveAction.java 2014-09-29 14:21:28 UTC (rev 652)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportArchiveAction.java 2014-09-29 15:02:51 UTC (rev 653)
@@ -105,10 +105,7 @@
@Override
public void validate() {
- if (StringUtils.isEmpty(attachmentBase)) {
- addActionError("Le répertoire de base des pièces jointes est obligatoire !");
- }
- else if (!new File(attachmentBase).isDirectory()) {
+ if (StringUtils.isNotEmpty(attachmentBase) && !new File(attachmentBase).isDirectory()) {
addActionError("Le répertoire de base des pièces jointes n'est pas un répertoire lisible !");
}
if (archiveFile == null) {
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-09-29 14:21:28 UTC (rev 652)
+++ trunk/pom.xml 2014-09-29 15:02:51 UTC (rev 653)
@@ -350,6 +350,12 @@
</dependency>
<dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-autocomplete</artifactId>
+ <version>${swingXVersion}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.swinglabs</groupId>
<artifactId>pdf-renderer</artifactId>
<version>1.0.5</version>
1
0
r652 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content: demande search
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 16:21:28 +0200 (Mon, 29 Sep 2014)
New Revision: 652
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/652
Log:
scroller automatiquement pour voir l'?\195?\169l?\195?\169ment s?\195?\169lectionn?\195?\169
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/search/SearchUIHandler.java
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-09-29 13:30:42 UTC (rev 651)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-09-29 14:21:28 UTC (rev 652)
@@ -273,6 +273,7 @@
int row = dataTableModel.getRowIndex(currentEmail);
if (row > 0) {
dataTable.setRowSelectionInterval(row, row);
+ dataTable.scrollRowToVisible(row);
}
}
}
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-09-29 13:30:42 UTC (rev 651)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-09-29 14:21:28 UTC (rev 652)
@@ -167,6 +167,7 @@
int row = dataTableModel.getRowIndex(currentEmail);
if (row > 0) {
dataTable.setRowSelectionInterval(row, row);
+ dataTable.scrollRowToVisible(row);
}
}
}
1
0
r651 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 15:30:42 +0200 (Mon, 29 Sep 2014)
New Revision: 651
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/651
Log:
correction icone
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
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-09-29 13:22:47 UTC (rev 650)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-09-29 13:30:42 UTC (rev 651)
@@ -284,8 +284,7 @@
#showAdvancedSearchButton {
text: { showAdvancedSearchButton.isSelected() ? "faxtomail.search.hideAdvancedSearch.label" : "faxtomail.search.showAdvancedSearch.label" };
- actionIcon: "expand";
- selectedIcon: { JAXXWidgetUtil.createActionIcon("collapse") };
+ icon: { JAXXWidgetUtil.createActionIcon(showAdvancedSearchButton.isSelected() ? "collapse" :"expand") };
}
#searchButton {
1
0
r650 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: . actions content/demande content/search
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 15:22:47 +0200 (Mon, 29 Sep 2014)
New Revision: 650
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/650
Log:
retourner sur la bonne page quand on revient
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/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/DemandeListTableFilter.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/search/SearchUIHandler.java
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-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -89,6 +89,7 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
+import org.nuiton.util.pagination.PaginationParameter;
/**
* UI application context.
@@ -189,6 +190,8 @@
/** Le dossier courant (pour ???). */
protected MailFolder currentMailFolder;
+ protected PaginationParameter currentPaginationParameter;
+
/** L'email courant (pour quoi faire ?). */
protected DemandeUIModel currentEmail;
@@ -691,6 +694,14 @@
this.currentMailFolder = currentMailFolder;
}
+ public PaginationParameter getCurrentPaginationParameter() {
+ return currentPaginationParameter;
+ }
+
+ public void setCurrentPaginationParameter(PaginationParameter currentPaginationParameter) {
+ this.currentPaginationParameter = currentPaginationParameter;
+ }
+
public DemandeUIModel getCurrentEmail() {
return currentEmail;
}
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-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -40,8 +40,10 @@
}
@Override
- public void postSuccessAction() {
- super.postSuccessAction();
+ public void doAction() throws Exception {
getContext().setSearch(null);
+ getContext().setCurrentPaginationParameter(null);
+ super.doAction();
}
+
}
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-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -39,4 +39,9 @@
setActionDescription(t("faxtomail.action.goto.search.tip"));
}
+ @Override
+ public void doAction() throws Exception {
+ getContext().setCurrentPaginationParameter(null);
+ super.doAction();
+ }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -49,6 +49,7 @@
import org.jdesktop.swingx.JXTable;
import org.nuiton.decorator.Decorator;
import org.nuiton.jaxx.application.swing.table.ColumnIdentifier;
+import org.nuiton.util.pagination.PaginationParameter;
import javax.swing.table.TableModel;
import java.text.DateFormat;
@@ -277,8 +278,17 @@
protected void executeFilter() {
FaxToMailUIContext context = handler.getContext();
- handler.getModel().resetPaginationParameter();
+ // reset pagination when folder change
+ PaginationParameter currentPaginationParameter = context.getCurrentPaginationParameter();
+ if (currentPaginationParameter != null) {
+ handler.getModel().setPaginationParameter(currentPaginationParameter);
+ context.setCurrentPaginationParameter(null);
+
+ } else {
+ handler.getModel().resetPaginationParameter();
+ }
+
LoadFolderEmailsAction loadFolderEmailsAction =
context.getActionFactory().createLogicAction(handler, LoadFolderEmailsAction.class);
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-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -101,6 +101,7 @@
import com.franciaflex.faxtomail.ui.swing.util.PaginationComboModel;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
+import org.nuiton.util.pagination.PaginationParameter;
/**
* Handler of UI {@link com.franciaflex.faxtomail.ui.swing.content.demande.DemandeListUIHandler}.
@@ -338,12 +339,7 @@
}
protected void loadFolderDemands(MailFolder folder, Map<MailFolder, FolderTreeNode> nodesByFolder) {
- // a new transaction has been opened by getContext().createNewTransaction();
- // 10 line upper
- // reset pagination when folder change
- getModel().resetPaginationParameter();
-
FolderTreeNode folderNode = nodesByFolder.get(folder);
boolean readable = folderNode.isCanRead();
@@ -445,6 +441,7 @@
protected void onDoubleClickOnDemande(DemandeUIModel selectedEmail) {
super.onDoubleClickOnDemande(selectedEmail);
selectedEmail.removePropertyChangeListener(selectedDemandeChangeListener);
+ getContext().setCurrentPaginationParameter(getModel().getPaginationParameter());
}
@Override
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-09-29 12:15:22 UTC (rev 649)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-09-29 13:22:47 UTC (rev 650)
@@ -56,6 +56,7 @@
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailDemandListHandler;
import com.franciaflex.faxtomail.ui.swing.util.DemandeTableModel;
import com.franciaflex.faxtomail.ui.swing.util.PaginationComboModel;
+import org.nuiton.util.pagination.PaginationParameter;
/**
* Handler of UI {@link SearchUIHandler}.
@@ -188,6 +189,11 @@
});
}
+
+ protected void onDoubleClickOnDemande(DemandeUIModel selectedEmail) {
+ getContext().setCurrentPaginationParameter(getModel().getPaginationParameter());
+ }
+
public void searchDemandes() {
getModel().resetPaginationParameter();
runSearchAction();
@@ -216,6 +222,12 @@
protected void runSearchAction() {
FaxToMailUIContext context = getContext();
+ PaginationParameter currentPaginationParameter = context.getCurrentPaginationParameter();
+ if (currentPaginationParameter != null) {
+ getModel().setPaginationParameter(currentPaginationParameter);
+ context.setCurrentPaginationParameter(null);
+ }
+
try {
SearchAction searchAction = new SearchAction(this);
if (context.isActionInProgress(null)) {
1
0
r649 - trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 14:15:22 +0200 (Mon, 29 Sep 2014)
New Revision: 649
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/649
Log:
correction mise a jour clients
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java 2014-09-29 11:39:04 UTC (rev 648)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientServiceImpl.java 2014-09-29 12:15:22 UTC (rev 649)
@@ -195,7 +195,7 @@
// save data
Client client = clientCache.get(code, company);
if (client == null) {
- client = clientDao.forCodeEquals(code).addEquals(Client.PROPERTY_COMPANY, company).findUnique();
+ client = clientDao.forCodeEquals(code).addEquals(Client.PROPERTY_COMPANY, company).findUniqueOrNull();
if (client == null) {
client = new ClientImpl();
client.setCode(code);
1
0
29 Sep '14
Author: kmorin
Date: 2014-09-29 13:39:04 +0200 (Mon, 29 Sep 2014)
New Revision: 648
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/648
Log:
ajout des infos manquantes lors de l'impression des ?\195?\169l?\195?\169ments
Added:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java
trunk/faxtomail-service/src/main/resources/pdf/demande.mustache
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/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/ButtonEmailGroup.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
Added: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java (rev 0)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailImpl.java 2014-09-29 11:39:04 UTC (rev 648)
@@ -0,0 +1,177 @@
+package com.franciaflex.faxtomail.persistence.entities;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Kevin Morin (Code Lutin)
+ */
+public class EmailImpl extends EmailAbstract {
+
+ protected History firstOpeningHistory;
+
+ protected History lastModificationHistory;
+
+ protected History lastAttachmentOpeningInFolderHistory;
+
+ public void findFirstOpeningHistory() {
+ History result = null;
+ Date date = null;
+ Collection<History> histories = getHistory();
+ if (histories != null) {
+ for (History history : histories) {
+ if (HistoryType.OPENING.equals(history.getType())) {
+ if (date == null || date.after(history.getModificationDate())) {
+ date = history.getModificationDate();
+ result = history;
+ }
+ }
+ }
+ }
+ firstOpeningHistory = result;
+ }
+
+ public void findLastModificationHistory() {
+ History result = null;
+ Date date = null;
+ Collection<History> histories = getHistory();
+ if (histories != null) {
+ for (History history : histories) {
+ if (history.getType().isConsideredAsModification()) {
+ if (date == null || date.before(history.getModificationDate())) {
+ date = history.getModificationDate();
+ result = history;
+ }
+ }
+ }
+ }
+ lastModificationHistory = result;
+ }
+
+ public void findLastAttachmentOpeningInFolderHistory() {
+ History result = null;
+ Collection<History> histories = getHistory();
+
+ if (histories != null) {
+ History transmissionHistory = null;
+ for (History history : histories) {
+ Date modificationDate = history.getModificationDate();
+ if (HistoryType.ATTACHMENT_OPENING.equals(history.getType())) {
+ if ((transmissionHistory == null
+ || transmissionHistory.getModificationDate().before(modificationDate))
+ && (result == null
+ || result.getModificationDate().before(modificationDate))) {
+ result = history;
+ }
+
+ } else if (HistoryType.TRANSMISSION.equals(history.getType())) {
+ if (transmissionHistory == null
+ || transmissionHistory.getModificationDate().before(modificationDate)) {
+
+ transmissionHistory = history;
+ if (result != null && result.getModificationDate().before(transmissionHistory.getModificationDate())) {
+ result = null;
+ }
+ }
+ }
+ }
+ }
+ lastAttachmentOpeningInFolderHistory = result;
+ }
+
+ protected History getFirstOpeningHistory() {
+ if (firstOpeningHistory == null) {
+ findFirstOpeningHistory();
+ }
+ return firstOpeningHistory;
+ }
+
+ @Override
+ public FaxToMailUser getFirstOpeningUser() {
+ History history = getFirstOpeningHistory();
+ return history != null ? history.getFaxToMailUser() : null;
+ }
+
+ @Override
+ public Date getFirstOpeningDate() {
+ History history = getFirstOpeningHistory();
+ return history != null ? history.getModificationDate() : null;
+ }
+
+ protected History getLastModificationHistory() {
+ if (lastModificationHistory == null) {
+ findLastModificationHistory();
+ }
+ return lastModificationHistory;
+ }
+
+ @Override
+ public FaxToMailUser getLastModificationUser() {
+ History history = getLastModificationHistory();
+ return history != null ? history.getFaxToMailUser() : null;
+ }
+
+ @Override
+ public Date getLastModificationDate() {
+ History history = getLastModificationHistory();
+ return history != null ? history.getModificationDate() : null;
+ }
+
+ protected History getLastAttachmentOpeningInThisFolderHistory() {
+ if (lastAttachmentOpeningInFolderHistory == null) {
+ findLastAttachmentOpeningInFolderHistory();
+ }
+ return lastAttachmentOpeningInFolderHistory;
+ }
+
+ @Override
+ public FaxToMailUser getLastAttachmentOpeningInFolderUser() {
+ History history = getLastAttachmentOpeningInThisFolderHistory();
+ return history != null ? history.getFaxToMailUser() : null;
+ }
+
+ @Override
+ public Date getLastAttachmentOpeningInFolderDate() {
+ History history = getLastAttachmentOpeningInThisFolderHistory();
+ return history != null ? history.getModificationDate() : null;
+ }
+
+ @Override
+ public void setHistory(List<History> history) {
+ firstOpeningHistory = null;
+ lastModificationHistory = null;
+ lastAttachmentOpeningInFolderHistory = null;
+ super.setHistory(history);
+ }
+
+ public String getReference() {
+ List<String> reference = new ArrayList<String>();
+ if (StringUtils.isNotBlank(getCompanyReference())) {
+ reference.add(getCompanyReference());
+ }
+ Collection<RangeRow> rangeRow = getRangeRow();
+ if (rangeRow != null) {
+ Collection<String> commandNumbers = Collections2.transform(rangeRow, new Function<RangeRow, String>() {
+ @Override
+ public String apply(RangeRow input) {
+ return input != null ? input.getCommandNumber() : "";
+ }
+ });
+ Collections2.filter(commandNumbers, new Predicate<String>() {
+ @Override
+ public boolean apply(String input) {
+ return StringUtils.isNotBlank(input);
+ }
+ });
+ reference.addAll(commandNumbers);
+ }
+ return StringUtils.join(reference, ", ");
+ }
+}
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-09-29 11:39:04 UTC (rev 648)
@@ -75,6 +75,7 @@
import org.hibernate.Hibernate;
import org.nuiton.csv.Import;
import org.nuiton.csv.ImportRuntimeException;
+import org.nuiton.decorator.Decorator;
import org.nuiton.jaxx.application.ApplicationTechnicalException;
import org.nuiton.topia.persistence.TopiaEntities;
import org.nuiton.topia.persistence.support.TopiaSqlSupport;
@@ -1332,20 +1333,49 @@
}
protected String getEmailDetailAsHtml(Email email) {
+ Decorator<FaxToMailUser> userDecorator = getDecoratorService().getDecoratorByType(FaxToMailUser.class);
+
Map<String, Object> scopes = new HashMap<String, Object>();
- scopes.put("receivedDate", DateFormatUtils.format(email.getReceptionDate(), "dd/MM/yyyy"));
+
+ String result = email.getObject();
+ String ref = email.getReference();
+ if (!ref.isEmpty()) {
+ result = ref + " - " + result;
+ }
+
+ scopes.put("title", result);
+ scopes.put("receivedDate", DateFormatUtils.format(email.getReceptionDate(), "dd/MM/yyyy HH:mm"));
scopes.put("sender", email.getSender());
scopes.put("object", email.getObject());
- scopes.put("clientCode", email.getClient() == null ? "" : email.getClient().getCode());
- scopes.put("demandType", email.getDemandType() == null ? "" : email.getDemandType().getLabel());
- scopes.put("priority", email.getPriority() == null ? "" : email.getPriority().getLabel());
+ scopes.put("client", email.getClient());
+ scopes.put("demandType", email.getDemandType());
+ scopes.put("priority", email.getPriority());
scopes.put("projectReference", email.getProjectReference());
scopes.put("companyReference", email.getCompanyReference());
- scopes.put("waitingState", email.getWaitingState() == null ? "" : email.getWaitingState().getLabel());
- scopes.put("status", email.getDemandStatus() == null ? "" : email.getDemandStatus().getLabel());
- scopes.put("takenBy", email.getTakenBy() == null ? "" : (email.getTakenBy().getLogin() + " " + email.getTakenBy().getFirstName() + " " + email.getTakenBy().getLastName()));
- scopes.put("date", DateFormatUtils.format(serviceContext.getNow(), "dd/MM/yyyy"));
+ scopes.put("waitingState", email.getWaitingState());
+ scopes.put("status", email.getDemandStatus());
+ scopes.put("takenBy", email.getTakenBy() == null ? "" : userDecorator.toString(email.getTakenBy()));
+ scopes.put("message", email.getComment());
+ scopes.put("date", DateFormatUtils.format(serviceContext.getNow(), "dd/MM/yyyy HH:mm"));
+ scopes.put("firstOpeningUser", email.getFirstOpeningUser() == null ?
+ "" : userDecorator.toString(email.getFirstOpeningUser()));
+ scopes.put("firstOpeningDate", email.getFirstOpeningDate() == null ?
+ "" : DateFormatUtils.format(email.getFirstOpeningDate(), "dd/MM/yyyy HH:mm"));
+
+ scopes.put("lastModificationUser", email.getLastModificationUser() == null ?
+ "" : userDecorator.toString(email.getLastModificationUser()));
+ scopes.put("lastModificationDate", email.getLastModificationDate() == null ?
+ "" : DateFormatUtils.format(email.getLastModificationDate(), "dd/MM/yyyy HH:mm"));
+
+ scopes.put("lastAttachmentOpeningInFolderUser", email.getLastAttachmentOpeningInFolderUser() == null ?
+ "" : userDecorator.toString(email.getLastAttachmentOpeningInFolderUser()));
+ scopes.put("lastAttachmentOpeningInFolderDate", email.getLastAttachmentOpeningInFolderDate() == null ?
+ "" : DateFormatUtils.format(email.getLastAttachmentOpeningInFolderDate(), "dd/MM/yyyy HH:mm"));
+
+ scopes.put("hasRangeRows", email.sizeRangeRow() > 0);
+ scopes.put("rangeRows", email.getRangeRow());
+
// find template
InputStream is = EmailServiceImpl.class.getResourceAsStream("/pdf/demande.mustache");
MustacheFactory mf = new DefaultMustacheFactory();
Modified: trunk/faxtomail-service/src/main/resources/pdf/demande.mustache
===================================================================
--- trunk/faxtomail-service/src/main/resources/pdf/demande.mustache 2014-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-service/src/main/resources/pdf/demande.mustache 2014-09-29 11:39:04 UTC (rev 648)
@@ -8,60 +8,111 @@
position: running(footer);
font-size: small;
}
+ table {
+ margin-bottom: 20px;
+ }
@page {
@bottom-center { content: element(footer) }
}
</style>
</head>
<body>
- <h1 class="title">Détail de la demande</h1>
+ <h1 class="title">Détail de l'élément {{title}}</h1>
<table>
<tr>
- <td>Objet :</td>
- <td>{{object}}</td>
+ <td>Reçu le :</td>
+ <td colspan="3">{{receivedDate}}</td>
</tr>
<tr>
- <td>Reçue le :</td>
- <td>{{receivedDate}}</td>
+ <td>Emetteur :</td>
+ <td colspan="3">{{sender}}</td>
</tr>
<tr>
- <td>Emetteur :</td>
- <td>{{sender}}</td>
+ <td>Objet :</td>
+ <td colspan="3">{{object}}</td>
</tr>
<tr>
<td>Client :</td>
- <td>{{client}}</td>
+ <td colspan="3">{{#client}}{{client.code}} ({{client.brand}}){{/client}}</td>
</tr>
<tr>
<td>Type :</td>
- <td>{{demandType}}</td>
+ <td colspan="3">{{demandType.label}}</td>
</tr>
<tr>
<td>Priorité :</td>
- <td>{{priority}}</td>
+ <td colspan="3">{{priority.label}}</td>
</tr>
<tr>
<td>Référence chantier :</td>
- <td>{{projectReference}}</td>
+ <td colspan="3">{{projectReference}}</td>
</tr>
<tr>
<td>Notre référence :</td>
- <td>{{companyReference}}</td>
+ <td colspan="3">{{companyReference}}</td>
</tr>
<tr>
<td>Etat d'attente :</td>
- <td>{{waitingState}}</td>
+ <td colspan="3">{{waitingState.label}}</td>
</tr>
<tr>
<td>Statut :</td>
- <td>{{status}}</td>
+ <td colspan="3">{{status.label}}</td>
</tr>
<tr>
<td>Pris par :</td>
- <td>{{takenBy}}</td>
+ <td colspan="3">{{takenBy}}</td>
</tr>
+ <tr>
+ <td>Première ouverture par :</td>
+ <td>{{firstOpeningUser}}</td>
+ <td>le :</td>
+ <td>{{firstOpeningDate}}</td>
+ </tr>
+ <tr>
+ <td>Dernière modification par :</td>
+ <td>{{lastModificationUser}}</td>
+ <td>le :</td>
+ <td>{{lastModificationDate}}</td>
+ </tr>
+ <tr>
+ <td>Dernière ouverture de pièce jointe par :</td>
+ <td>{{lastAttachmentOpeningInFolderUser}}</td>
+ <td>le :</td>
+ <td>{{lastAttachmentOpeningInFolderDate}}</td>
+ </tr>
+ <tr>
+ <td>Message :</td>
+ <td colspan="3">{{message}}</td>
+ </tr>
</table>
+
+ {{#hasRangeRows}}
+ <table>
+ <caption></caption>
+ <thead>
+ <tr>
+ <th>Gammes</th>
+ <th>N° commande/devis</th>
+ <th>Quantitié de devis</th>
+ <th>Quantitié de PF</th>
+ <th>Quantitié de SAV</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#rangeRows}}
+ <tr>
+ <td>{{range.label}}</td>
+ <td>{{commandNumber}}</td>
+ <td>{{quotationQuantity}}</td>
+ <td>{{productQuantity}}</td>
+ <td>{{savQuantity}}</td>
+ </tr>
+ {{/rangeRows}}
+ </tbody>
+ </table>
+ {{/hasRangeRows}}
<div class="footer">
Date d'impression : {{date}}
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-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-09-29 11:39:04 UTC (rev 648)
@@ -254,7 +254,7 @@
}
#lastAttachmentOpeningPanel {
- visible: { model.getLastAttachmentOpeningInThisFolderUser() != null };
+ visible: { model.getLastAttachmentOpeningInFolderUser() != null };
}
#lastAttachmentOpeningLabel {
@@ -266,7 +266,7 @@
}
#lastAttachmentOpenedByField {
- text: { handler.decorateUser(model.getLastAttachmentOpeningInThisFolderUser(), true) };
+ text: { handler.decorateUser(model.getLastAttachmentOpeningInFolderUser(), true) };
}
#lastAttachmentOpeningDateLabel {
@@ -274,7 +274,7 @@
}
#lastAttachmentOpeningDateField {
- text: { handler.decorate(model.getLastAttachmentOpeningInThisFolderDate()) };
+ text: { handler.decorate(model.getLastAttachmentOpeningInFolderDate()) };
}
#leftVerticalSplitPanel {
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-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-09-29 11:39:04 UTC (rev 648)
@@ -107,12 +107,6 @@
protected final List<RangeRowModel> validRangeRowModels = new ArrayList<RangeRowModel>();
- protected History firstOpeningHistory;
-
- protected History lastModificationHistory;
-
- protected History lastAttachmentOpeningInThisFolderHistory;
-
protected int quotationNb;
protected int pfNb;
@@ -151,14 +145,14 @@
public DemandeUIModel() {
super(fromBeanBinder, toBeanBinder);
- addPropertyChangeListener(Email.PROPERTY_HISTORY, new PropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- findFirstOpeningHistory();
- findLastModificationHistory();
- findLastAttachmentOpeningInThisFolderHistory();
- }
- });
+// addPropertyChangeListener(Email.PROPERTY_HISTORY, new PropertyChangeListener() {
+// @Override
+// public void propertyChange(PropertyChangeEvent evt) {
+// findFirstOpeningHistory();
+// findLastModificationHistory();
+// findLastAttachmentOpeningInThisFolderHistory();
+// }
+// });
addPropertyChangeListener(Email.PROPERTY_RANGE_ROW, new PropertyChangeListener() {
@Override
@@ -504,27 +498,7 @@
}
public String getReference() {
- List<String> reference = new ArrayList<String>();
- if (StringUtils.isNotBlank(getCompanyReference())) {
- reference.add(getCompanyReference());
- }
- Collection<RangeRow> rangeRow = getRangeRow();
- if (rangeRow != null) {
- Collection<String> commandNumbers = Collections2.transform(rangeRow, new Function<RangeRow, String>() {
- @Override
- public String apply(RangeRow input) {
- return input != null ? input.getCommandNumber() : "";
- }
- });
- Collections2.filter(commandNumbers, new Predicate<String>() {
- @Override
- public boolean apply(String input) {
- return StringUtils.isNotBlank(input);
- }
- });
- reference.addAll(commandNumbers);
- }
- return StringUtils.join(reference, ", ");
+ return editObject.getReference();
}
public void setHistory(List<History> history) {
@@ -540,103 +514,22 @@
return editObject.sizeHistory();
}
- public void findFirstOpeningHistory() {
- History result = null;
- Date date = null;
- Collection<History> histories = getHistory();
- if (histories != null) {
- for (History history : histories) {
- if (HistoryType.OPENING.equals(history.getType())) {
- if (date == null || date.after(history.getModificationDate())) {
- date = history.getModificationDate();
- result = history;
- }
- }
- }
- }
- firstOpeningHistory = result;
- }
-
- public void findLastModificationHistory() {
- History result = null;
- Date date = null;
- Collection<History> histories = getHistory();
- if (histories != null) {
- for (History history : histories) {
- if (history.getType().isConsideredAsModification()) {
- if (date == null || date.before(history.getModificationDate())) {
- date = history.getModificationDate();
- result = history;
- }
- }
- }
- }
- lastModificationHistory = result;
- }
-
- public void findLastAttachmentOpeningInThisFolderHistory() {
- History result = null;
- Collection<History> histories = getHistory();
-
- if (histories != null) {
- History transmissionHistory = null;
- for (History history : histories) {
- Date modificationDate = history.getModificationDate();
- if (HistoryType.ATTACHMENT_OPENING.equals(history.getType())) {
- if ((transmissionHistory == null
- || transmissionHistory.getModificationDate().before(modificationDate))
- && (result == null
- || result.getModificationDate().before(modificationDate))) {
- result = history;
- }
-
- } else if (HistoryType.TRANSMISSION.equals(history.getType())) {
- if (transmissionHistory == null
- || transmissionHistory.getModificationDate().before(modificationDate)) {
-
- transmissionHistory = history;
- if (result != null && result.getModificationDate().before(transmissionHistory.getModificationDate())) {
- result = null;
- }
- }
- }
- }
- }
- lastAttachmentOpeningInThisFolderHistory = result;
- }
-
- public History getFirstOpeningHistory() {
- return firstOpeningHistory;
- }
-
public FaxToMailUser getFirstOpeningUser() {
- History history = getFirstOpeningHistory();
- return history != null ? history.getFaxToMailUser() : null;
+ return editObject.getFirstOpeningUser();
}
public Date getFirstOpeningDate() {
- History history = getFirstOpeningHistory();
- return history != null ? history.getModificationDate() : null;
+ return editObject.getFirstOpeningDate();
}
- public History getLastModificationHistory() {
- return lastModificationHistory;
- }
-
public FaxToMailUser getLastModificationUser() {
- History history = getLastModificationHistory();
- return history != null ? history.getFaxToMailUser() : null;
+ return editObject.getLastModificationUser();
}
public Date getLastModificationDate() {
- History history = getLastModificationHistory();
- return history != null ? history.getModificationDate() : null;
+ return editObject.getLastModificationDate();
}
- public History getLastAttachmentOpeningInThisFolderHistory() {
- return lastAttachmentOpeningInThisFolderHistory;
- }
-
/**
* Utilisé depuis la liste des mails seulement pour des raisons de performances sans charger
* l'historique.
@@ -653,14 +546,12 @@
editObject.setLastAttachmentOpener(lastAttachmentOpener);
}
- public FaxToMailUser getLastAttachmentOpeningInThisFolderUser() {
- History history = getLastAttachmentOpeningInThisFolderHistory();
- return history != null ? history.getFaxToMailUser() : null;
+ public FaxToMailUser getLastAttachmentOpeningInFolderUser() {
+ return editObject.getLastAttachmentOpeningInFolderUser();
}
- public Date getLastAttachmentOpeningInThisFolderDate() {
- History history = getLastAttachmentOpeningInThisFolderHistory();
- return history != null ? history.getModificationDate() : null;
+ public Date getLastAttachmentOpeningInFolderDate() {
+ return editObject.getLastAttachmentOpeningInFolderDate();
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/ButtonEmailGroup.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/ButtonEmailGroup.java 2014-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/ButtonEmailGroup.java 2014-09-29 11:39:04 UTC (rev 648)
@@ -43,7 +43,7 @@
public ButtonEmailGroup() {
setToolTipText(t("faxtomail.demandGroup.action.tip"));
- int demandNb = popup.getModel().sizeGroupedDemandes() + 1;
+ int demandNb = popup.getModel().sizeGroupedDemandes();
setText(t("faxtomail.demandGroup.text", demandNb));
popup.getModel().addPropertyChangeListener(DemandeUIModel.PROPERTY_GROUPED_DEMANDES, new PropertyChangeListener() {
@@ -52,7 +52,7 @@
Collection<DemandeUIModel> demands = (Collection<DemandeUIModel>) evt.getNewValue();
if (demands != null) {
int size = demands.size();
- setText(t("faxtomail.demandGroup.text", size + 1));
+ setText(t("faxtomail.demandGroup.text", size));
}
}
});
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-09-29 09:34:03 UTC (rev 647)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-09-29 11:39:04 UTC (rev 648)
@@ -62,7 +62,7 @@
static {
n("faxtomail.demande.receptionDate.label");
- n("faxtomail.demande.ediCodeNumber.label");
+ n("faxtomail.demande.ediError.label");
n("faxtomail.demande.projectReference.label");
n("faxtomail.demande.sender.label");
n("faxtomail.demande.fax.label");
1
0
r647 - in trunk: . faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util
by kmorin@users.forge.codelutin.com 29 Sep '14
by kmorin@users.forge.codelutin.com 29 Sep '14
29 Sep '14
Author: kmorin
Date: 2014-09-29 11:34:03 +0200 (Mon, 29 Sep 2014)
New Revision: 647
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/647
Log:
- correction plusieurs popup de sauvegarde quand on quitte l'editeur de pdf
- agrandissement de la taille des popups de filtre
- correction libell?\195?\169 action "null" quand on quitte un ?\195?\169l?\195?\169ment
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.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/DemandesUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
trunk/pom.xml
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -71,7 +71,6 @@
@Override
public boolean prepareAction() throws Exception {
-
DemandeListUIModel model = getModel();
MailFolder folder = model.getSelectedFolder();
final JXTable dataTable = getUI().getDataTable();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -58,6 +58,8 @@
import java.util.HashSet;
import java.util.Set;
+import static org.nuiton.i18n.I18n.t;
+
/**
* @author Kevin Morin (Code Lutin)
* @since x.x
@@ -216,6 +218,7 @@
case Email.PROPERTY_ATTACHMENT:
case Email.PROPERTY_REPLIES:
+ case Email.PROPERTY_EMAIL_GROUP:
return null;
default:
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-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -333,6 +333,7 @@
.searchable(true)
.searchDecorator(decorator)
.useTableRenderers(true)
+ .setPopupDefaultSize(new Dimension(250, 290))
.apply();
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-09-29 09:34:03 UTC (rev 647)
@@ -30,6 +30,7 @@
#backButton {
text: "faxtomail.demande.back.button.label";
actionIcon: cancel;
+ toolTipText: "faxtomail.action.goto.previousScreen.tip";
_applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.GoToPreviousScreenAction.class };
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -32,6 +32,7 @@
import javax.swing.JComponent;
import javax.swing.JTabbedPane;
+import com.franciaflex.faxtomail.ui.swing.actions.GoToPreviousScreenAction;
import com.franciaflex.faxtomail.ui.swing.actions.SaveAndOpenChooseAttachmentToPrintAction;
import com.franciaflex.faxtomail.ui.swing.actions.SaveAndOpenMailFolderChooserAction;
import com.franciaflex.faxtomail.ui.swing.actions.SaveAndOpenReplyFormAction;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -163,6 +163,7 @@
sendAction.putValue(Action.LARGE_ICON_KEY, actionIcon);
sendAction.putValue(Action.NAME, "send");
sendAction.putValue(Action.SHORT_DESCRIPTION, t("faxtomail.demande.history.action.send.tip"));
+
JButton sendButton = new JButton(sendAction);
sendButton.setText(null);
sendButton.setFocusPainted(false);
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-09-26 17:17:17 UTC (rev 646)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-09-29 09:34:03 UTC (rev 647)
@@ -33,6 +33,7 @@
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
@@ -239,12 +240,9 @@
public void openFrame(ApplicationUI dialogContent,
String title, Dimension dim) {
- JFrame result = getContext().getSecondaryFrame();
- if (result == null) {
- result = new JFrame();
- result.setResizable(true);
- getContext().setSecondaryFrame(result);
- }
+ JFrame result = new JFrame();
+ result.setResizable(true);
+ getContext().setSecondaryFrame(result);
result.setTitle(title);
result.setContentPane((Container) dialogContent);
@@ -279,12 +277,9 @@
* Open frame and disable parent frame
*/
public JFrame openModalFrame(final ApplicationUI dialogContent, String title, Dimension dim) {
- JFrame result = getContext().getSecondaryFrame();
- if (result == null) {
- result = new JFrame();
- result.setResizable(true);
- getContext().setSecondaryFrame(result);
- }
+ JFrame result = new JFrame();
+ result.setResizable(true);
+ getContext().setSecondaryFrame(result);
final JFrame parentContainer = getParentContainer(JFrame.class);
parentContainer.setEnabled(false);
@@ -309,7 +304,7 @@
@Override
public void actionPerformed(ActionEvent e) {
- ((org.nuiton.jaxx.application.swing.util.Cancelable) handler).cancel();
+ ((Cancelable) handler).cancel();
}
});
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-09-26 17:17:17 UTC (rev 646)
+++ trunk/pom.xml 2014-09-29 09:34:03 UTC (rev 647)
@@ -110,7 +110,7 @@
<h2Version>1.3.176</h2Version>
<guavaVersion>18.0</guavaVersion>
- <jaxxVersion>2.13-SNAPSHOT</jaxxVersion>
+ <jaxxVersion>2.14-SNAPSHOT</jaxxVersion>
<!-- do not upgrade to 1.6.5-1 -->
<swingXVersion>1.6.4</swingXVersion>
<xworkVersion>2.3.16.3</xworkVersion>
1
0
26 Sep '14
Author: kmorin
Date: 2014-09-26 19:17:17 +0200 (Fri, 26 Sep 2014)
New Revision: 646
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/646
Log:
- Suppression du bouton Quitter (en haut ?\195?\160 droite)
- agrandissement du nombre d'?\195?\169l?\195?\169ments visible dans les listes d?\195?\169roulantes (20 au lieu de 8)
- surlignement plus transparent et croix et lignes plus ?\195?\169paisses dans l'?\195?\169diteur de pj
- Correction libell?\195?\169s
- recherche avanc?\195?\169e
- colonne Groupe dans la liste (en lecture seulement)
Added:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupCellRenderer.java
trunk/faxtomail-ui-swing/src/main/resources/icons/action-collapse.png
trunk/faxtomail-ui-swing/src/main/resources/icons/action-expand.png
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/SearchFilter.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/ArchiveImportModel.java
trunk/faxtomail-ui-swing/pom.xml
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/content/MainUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.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/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorCrossUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorHighlighterUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorLineUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
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.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.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/DemandeTableModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -344,10 +344,15 @@
// email message
if (StringUtils.isNotBlank(searchFilter.getMessage())) {
- query.append(" AND lower(E." + Email.PROPERTY_ORIGINAL_EMAIL + ") LIKE lower(:" + SearchFilter.PROPERTY_MESSAGE + ")");
+ query.append(" AND lower(E." + Email.PROPERTY_COMMENT + ") LIKE lower(:" + SearchFilter.PROPERTY_MESSAGE + ")");
args.put(SearchFilter.PROPERTY_MESSAGE, "%" + searchFilter.getMessage() + "%");
}
+ if (StringUtils.isNotBlank(searchFilter.getBody())) {
+ query.append(" AND lower(E." + Email.PROPERTY_ORIGINAL_EMAIL + ") LIKE lower(:" + SearchFilter.PROPERTY_BODY + ")");
+ args.put(SearchFilter.PROPERTY_BODY, "%" + searchFilter.getBody() + "%");
+ }
+
// email gamme
List<Range> gamme = searchFilter.getGamme();
if (CollectionUtils.isNotEmpty(gamme)) {
@@ -370,6 +375,15 @@
query.append(")");
}
+ // command Nb
+ if (StringUtils.isNotBlank(searchFilter.getCommandNb())) {
+ query.append(" AND (EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
+ query.append(" AND lower(RR." + RangeRow.PROPERTY_COMMAND_NUMBER + ") LIKE lower(:" + SearchFilter.PROPERTY_COMMAND_NB + "))");
+ query.append(" OR lower(E." + Email.PROPERTY_COMPANY_REFERENCE + ") LIKE lower(:" + SearchFilter.PROPERTY_COMMAND_NB + ")");
+ args.put(SearchFilter.PROPERTY_COMMAND_NB, "%" + searchFilter.getCommandNb() + "%");
+ query.append(")");
+ }
+
// add same fecth liste as emailService#getEmailForFolder()
String hqlForFetchStep1 = "select E." + TopiaEntity.PROPERTY_TOPIA_ID + " FROM " + Email.class.getName() + " E "
+ "WHERE E." + TopiaEntity.PROPERTY_TOPIA_ID + " IN ("
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -54,6 +54,7 @@
LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
REPLIES,
ATTACHMENT,
+ GROUP,
EDI_RETURN;
public static MailField[] getCanBeRequiredMailFields() {
@@ -92,7 +93,8 @@
EDI_RETURN,
LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
REPLIES,
- ATTACHMENT
+ ATTACHMENT,
+ GROUP
};
}
}
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/SearchFilter.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/SearchFilter.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/SearchFilter.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -46,6 +46,7 @@
public static final String PROPERTY_DEMAND_STATUS = "demandStatus";
public static final String PROPERTY_EDI_CODE_NUMBER = "ediCodeNumber";
public static final String PROPERTY_PROJECT_REFERENCE = "projectReference";
+ public static final String PROPERTY_COMMAND_NB = "commandNb";
public static final String PROPERTY_LOCAL_REFERENCE = "localReference";
public static final String PROPERTY_MODIFIED_BY = "modifiedBy";
public static final String PROPERTY_PRINTING_BY = "printingBy";
@@ -89,6 +90,8 @@
protected String projectReference;
+ protected String commandNb;
+
protected String localReference;
protected FaxToMailUser takenBy;
@@ -326,6 +329,16 @@
firePropertyChange(PROPERTY_GAMME, null, gamme);
}
+ public String getCommandNb() {
+ return commandNb;
+ }
+
+ public void setCommandNb(String commandNb) {
+ String oldValue = this.commandNb;
+ this.commandNb = commandNb;
+ firePropertyChange(PROPERTY_COMMAND_NB, oldValue, commandNb);
+ }
+
public String getLocalReference() {
return localReference;
}
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/ArchiveImportModel.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/ArchiveImportModel.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/ArchiveImportModel.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -30,6 +30,7 @@
import java.util.Date;
import java.util.Map;
+import org.nuiton.csv.Common;
import org.nuiton.csv.ValueParser;
import org.nuiton.csv.ext.AbstractImportModel;
@@ -78,7 +79,7 @@
newMandatoryColumn("receptionDate", Email.PROPERTY_RECEPTION_DATE, dateValueParser);
newMandatoryColumn("projectReference", Email.PROPERTY_PROJECT_REFERENCE);
newMandatoryColumn("sender", Email.PROPERTY_SENDER);
- newMandatoryColumn("fax", Email.PROPERTY_FAX, yesNoParser);
+ newMandatoryColumn("fax", Email.PROPERTY_FAX, Common.PRIMITIVE_BOOLEAN);
newMandatoryColumn("recipient", Email.PROPERTY_RECIPIENT);
newMandatoryColumn("object", Email.PROPERTY_OBJECT);
newMandatoryColumn("archiveDate", Email.PROPERTY_ARCHIVE_DATE, dateValueParser);
Modified: trunk/faxtomail-ui-swing/pom.xml
===================================================================
--- trunk/faxtomail-ui-swing/pom.xml 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/pom.xml 2014-09-26 17:17:17 UTC (rev 646)
@@ -49,6 +49,7 @@
<jaxx.autoImportCss>true</jaxx.autoImportCss>
<jaxx.autoRecurseInCss>false</jaxx.autoRecurseInCss>
<jaxx.addAutoHandlerUI>true</jaxx.addAutoHandlerUI>
+ <jaxx.commonCss>${project.basedir}/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css</jaxx.commonCss>
<i18n.bundleOutputName>faxtomail-i18n</i18n.bundleOutputName>
<i18n.generateCsvFile>true</i18n.generateCsvFile>
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -65,7 +65,7 @@
MailFolderChooserUIModel model = getModel();
List<DemandeUIModel> demandeUIModels = new ArrayList<DemandeUIModel>(model.getDemandeUIModels());
- for (DemandeUIModel demandeUIModel : model.getDemandeUIModels()) {
+ for (final DemandeUIModel demandeUIModel : model.getDemandeUIModels()) {
final MailFolder mailFolder = demandeUIModel.getMailFolder();
List<DemandeUIModel> groupedDemandes = demandeUIModel.getGroupedDemandes();
@@ -73,8 +73,9 @@
Collection<DemandeUIModel> sameFolderGroupedDemands =
Collections2.filter(groupedDemandes, new Predicate<DemandeUIModel>() {
@Override
- public boolean apply(DemandeUIModel demandeUIModel) {
- return mailFolder.equals(demandeUIModel.getMailFolder());
+ public boolean apply(DemandeUIModel groupDemandeUIModel) {
+ return !demandeUIModel.equals(groupDemandeUIModel)
+ && mailFolder.equals(groupDemandeUIModel.getMailFolder());
}
});
Added: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css (rev 0)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/Common.css 2014-09-26 17:17:17 UTC (rev 646)
@@ -0,0 +1,3 @@
+BeanFilterableComboBox, BeanComboBox {
+ maximumRowCount: 20;
+}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx 2014-09-26 17:17:17 UTC (rev 646)
@@ -52,7 +52,7 @@
<JToggleButton id='demandListButton'/>
<JToggleButton id='searchButton'/>
<Component initializer="Box.createHorizontalGlue()"/>
- <JButton id='exitButton'/>
+ <!--<JButton id='exitButton'/>-->
</JToolBar>
<JToolBar id='bottomBar'>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -166,7 +166,7 @@
MainUI ui = getUI();
ui.getSearchButton().setEnabled(!inProgress);
ui.getDemandListButton().setEnabled(!inProgress);
- ui.getExitButton().setEnabled(!inProgress);
+// ui.getExitButton().setEnabled(!inProgress);
}
});
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -329,7 +329,11 @@
return s;
}
};
- TableRowFilterSupport.forFilter(tableFilter).searchable(true).searchDecorator(decorator).useTableRenderers(true).apply();
+ TableRowFilterSupport.forFilter(tableFilter)
+ .searchable(true)
+ .searchDecorator(decorator)
+ .useTableRenderers(true)
+ .apply();
}
protected void loadFolderDemands(MailFolder folder, Map<MailFolder, FolderTreeNode> nodesByFolder) {
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -823,21 +823,21 @@
public void setGroupedDemandes(EmailGroup emailGroup) {
Object oldValue = new ArrayList<DemandeUIModel>(getGroupedDemandes());
+ groupedDemandes.clear();
if (emailGroup != null) {
- groupedDemandes.clear();
Collection<Email> emails = emailGroup.getEmail();
if (emails != null) {
for (Email email : emails) {
- if (!email.getTopiaId().equals(getTopiaId())) {
- DemandeUIModel demandeUIModel = new DemandeUIModel();
- demandeUIModel.setObject(email.getObject());
- demandeUIModel.setCompanyReference(email.getCompanyReference());
- demandeUIModel.setTopiaId(email.getTopiaId());
- demandeUIModel.setMailFolder(email.getMailFolder());
- groupedDemandes.add(demandeUIModel);
- }
+ DemandeUIModel demandeUIModel = new DemandeUIModel();
+ demandeUIModel.setObject(email.getObject());
+ demandeUIModel.setCompanyReference(email.getCompanyReference());
+ demandeUIModel.setTopiaId(email.getTopiaId());
+ demandeUIModel.setMailFolder(email.getMailFolder());
+ groupedDemandes.add(demandeUIModel);
}
}
+ } else {
+ groupedDemandes.add(this);
}
firePropertyChange(PROPERTY_GROUPED_DEMANDES, oldValue, getGroupedDemandes());
}
Copied: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupCellRenderer.java (from rev 645, trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java)
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupCellRenderer.java (rev 0)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupCellRenderer.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -0,0 +1,106 @@
+package com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup;
+
+/*
+ * #%L
+ * FaxToMail :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
+import jaxx.runtime.SwingUtil;
+import org.apache.commons.collections4.CollectionUtils;
+import org.nuiton.decorator.Decorator;
+
+import javax.swing.*;
+import javax.swing.table.DefaultTableCellRenderer;
+import java.util.List;
+
+import static org.nuiton.i18n.I18n.n;
+import static org.nuiton.i18n.I18n.t;
+
+/**
+ * Renderer of a attachement editor in a table cell.
+ *
+ * @author kmorin - morin(a)codelutin.com
+ */
+public class DemandGroupCellRenderer extends DefaultTableCellRenderer {
+
+ public static final String TEXT_PATTERN = "<html><body>%s</body></html>";
+
+ private static final long serialVersionUID = 1L;
+
+ private final String noneText;
+
+ public static DemandGroupCellRenderer newRender() {
+ return new DemandGroupCellRenderer();
+ }
+
+ protected DemandGroupCellRenderer() {
+ setHorizontalAlignment(CENTER);
+ setIcon(SwingUtil.createActionIcon("group"));
+ this.noneText = n("faxtomail.demandGroup.empty");
+ }
+
+ @Override
+ protected void setValue(Object value) {
+ // do nothing
+ }
+
+ @Override
+ public JComponent getTableCellRendererComponent(JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column) {
+
+ super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+
+ List<DemandeUIModel> demands = (List<DemandeUIModel>) value;
+
+ String toolTipTextValue;
+
+ if (CollectionUtils.isEmpty(demands)) {
+
+ // use HTML to show the tooltip in italic
+ toolTipTextValue = "<i>" + t(noneText) + "</i>";
+
+
+ } else {
+
+ StringBuilder sb = new StringBuilder();
+ for (DemandeUIModel demand : demands) {
+ sb.append("<br/>").append(demand.getTitle());
+ }
+ // use html to display the tooltip on several lines
+ toolTipTextValue = sb.substring(5);
+ }
+ String textValue = t("faxtomail.demandGroupCellRenderer.text", demands != null ? demands.size() : 0);
+ boolean editable = table.isCellEditable(row, column);
+ toolTipTextValue = String.format(TEXT_PATTERN, toolTipTextValue);
+// setEnabled(editable);
+ setText(textValue);
+ setToolTipText(toolTipTextValue);
+
+ return this;
+ }
+}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -83,7 +83,7 @@
TableModel demandGroupTableModel = new AbstractTableModel() {
@Override
public int getRowCount() {
- return getModel().sizeGroupedDemandes() + 1;
+ return getModel().sizeGroupedDemandes();
}
@Override
@@ -93,10 +93,7 @@
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
- if (rowIndex == 0) {
- return getModel();
- }
- return Iterables.get(getModel().getGroupedDemandes(), rowIndex - 1);
+ return Iterables.get(getModel().getGroupedDemandes(), rowIndex);
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorCrossUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorCrossUI.jaxx 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorCrossUI.jaxx 2014-09-26 17:17:17 UTC (rev 646)
@@ -48,7 +48,7 @@
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g.create();
- g2.setStroke(new BasicStroke(1));
+ g2.setStroke(new BasicStroke(3));
g2.setColor(Color.BLUE);
g2.drawLine(0, 0, getWidth(), getHeight());
g2.drawLine(getWidth(), 0, 0, getHeight());
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorHighlighterUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorHighlighterUI.css 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorHighlighterUI.css 2014-09-26 17:17:17 UTC (rev 646)
@@ -24,7 +24,7 @@
#highlighterPanel {
//scaleImageToFitPanel: { true };
border: { BorderFactory.createDashedBorder(null) };
- background: { new Color(255, 255, 0, 100) };
+ background: { new Color(255, 255, 0, 80) };
size: { new Dimension(500, 200) };
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorLineUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorLineUI.jaxx 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorLineUI.jaxx 2014-09-26 17:17:17 UTC (rev 646)
@@ -48,7 +48,7 @@
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g.create();
- g2.setStroke(new BasicStroke(1));
+ g2.setStroke(new BasicStroke(3));
g2.setColor(Color.BLUE);
if (Boolean.TRUE.equals(horizontal)) {
g2.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUI.css 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/pdfeditor/PDFEditorUI.css 2014-09-26 17:17:17 UTC (rev 646)
@@ -87,6 +87,7 @@
#zoomOutButton {
actionIcon: zoom-out;
+ toolTipText: "faxtomail.pdfEditor.button.zoomOut";
}
#zoomLabel {
@@ -95,18 +96,22 @@
#zoomInButton {
actionIcon: zoom-in;
+ toolTipText: "faxtomail.pdfEditor.button.zoomIn";
}
#rotateClockwiseButton {
- actionIcon: rotate-clockwise
+ actionIcon: rotate-clockwise;
+ toolTipText: "faxtomail.pdfEditor.button.rotateClockwise";
}
#rotateAntiClockwiseButton {
- actionIcon: rotate-anticlockwise
+ actionIcon: rotate-anticlockwise;
+ toolTipText: "faxtomail.pdfEditor.button.rotateAntiClockwise";
}
#printButton {
actionIcon: print;
+ toolTipText: "faxtomail.pdfEditor.button.print";
}
#cancelButton {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -108,7 +108,6 @@
ReplyFormUIModel model = (ReplyFormUIModel) evt.getSource();
List<DemandeUIModel> models = new ArrayList<DemandeUIModel>();
- models.add(demand);
models.addAll(demand.getGroupedDemandes());
for (DemandeUIModel demandeUIModel : models) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-09-26 17:17:17 UTC (rev 646)
@@ -40,10 +40,14 @@
_selectOnFocus: {true};
}
-.between2ndPartLabel {
+.between2ndPartLabel, .between2ndPartLabel_advancedSearch {
text: "faxtomail.search.between2ndPart.label";
}
+.advancedSearch, .between2ndPartLabel_advancedSearch {
+ visible: { showAdvancedSearchButton.isSelected() };
+}
+
#goToFolderMenu {
actionIcon: list;
text: "faxtomail.search.action.gotoFolder";
@@ -201,7 +205,7 @@
}
#ediCodeNumberLabel {
- text: "faxtomail.demande.ediCodeNumber.label";
+ text: "faxtomail.demande.ediError.label";
}
#ediCodeNumberField {
@@ -228,6 +232,14 @@
text: { model.getProjectReference() };
}
+#commandNbLabel {
+ text: "faxtomail.demande.commandNb.label";
+}
+
+#commandNbField {
+ text: { model.getCommandNb() };
+}
+
#localReferenceLabel {
text: "faxtomail.demande.localReference.label";
}
@@ -252,18 +264,16 @@
text: { model.getBody() };
}
-#commandNumberLabel {
- text: "faxtomail.demande.commandNumber.label";
+#gammeLabel {
+ text: "faxtomail.demande.gamme.label";
}
-#commandNumberField {
- text: { model.getCommandNumber() };
+#showAdvancedSearchButton {
+ text: { showAdvancedSearchButton.isSelected() ? "faxtomail.search.hideAdvancedSearch.label" : "faxtomail.search.showAdvancedSearch.label" };
+ actionIcon: "expand";
+ selectedIcon: { JAXXWidgetUtil.createActionIcon("collapse") };
}
-#gammeLabel {
- text: "faxtomail.demande.gamme.label";
-}
-
#searchButton {
text: "faxtomail.search.button.label";
/* _applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.SearchToGroupAction.class };*/
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-09-26 17:17:17 UTC (rev 646)
@@ -37,6 +37,7 @@
com.franciaflex.faxtomail.persistence.entities.FaxToMailUser
jaxx.runtime.swing.editor.bean.BeanFilterableComboBox
+ jaxx.runtime.swing.JAXXWidgetUtil
org.jdesktop.swingx.JXDatePicker
org.jdesktop.swingx.JXTable
@@ -61,7 +62,7 @@
<JPanel layout='{new BorderLayout()}'>
<JScrollPane id='searchScrollPane' constraints='BorderLayout.CENTER'>
- <Table fill='both'>
+ <Table fill='horizontal'>
<row>
<cell anchor='west'>
@@ -69,153 +70,110 @@
</cell>
<cell weightx='1'>
<JXDatePicker id='receivedBetweenStartDatePicker'
- onActionPerformed="model.setMinReceptionDate(receivedBetweenStartDatePicker.getDate())"/>
+ onActionPerformed="model.setMinReceptionDate(receivedBetweenStartDatePicker.getDate())"/>
</cell>
+
<cell>
<JLabel styleClass='between2ndPartLabel'/>
</cell>
<cell weightx='1'>
<JXDatePicker id='receivedBetweenEndDatePicker'
- onActionPerformed="model.setMaxReceptionDate(receivedBetweenEndDatePicker.getDate())"/>
+ onActionPerformed="model.setMaxReceptionDate(receivedBetweenEndDatePicker.getDate())"/>
</cell>
<cell>
- <JLabel id='takenByLabel'/>
+ <JLabel id='priorityLabel'/>
</cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='takenByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
+ <cell weightx='2'>
+ <JComboBox id='priorityComboBox' genericType="Priority"/>
</cell>
</row>
<row>
- <cell anchor='west'>
- <JLabel id='modifiedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='modifiedBetweenStartDatePicker'
- onActionPerformed="model.setMinModificationDate(modifiedBetweenStartDatePicker.getDate())"/>
- </cell>
<cell>
- <JLabel styleClass='between2ndPartLabel'/>
+ <JLabel id='commandNbLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='modifiedBetweenEndDatePicker'
- onActionPerformed="model.setMaxModificationDate(modifiedBetweenEndDatePicker.getDate())"/>
+ <cell columns='3' weightx='1'>
+ <JTextField id='commandNbField'
+ onKeyReleased='handler.setText(event, "commandNb")'/>
</cell>
- <cell anchor='west'>
- <JLabel id='modifiedByLabel'/>
+ <cell>
+ <JLabel id='waitingStateLabel'/>
</cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='modifiedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
+ <cell columns='1' weightx='1'>
+ <JComboBox id='waitingStateComboBox' genericType="WaitingState"/>
</cell>
</row>
<row>
- <cell anchor='west'>
- <JLabel id='transferBetweenLabel'/>
+ <cell>
+ <JLabel id='projectReferenceLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='transferBetweenStartDatePicker'
- onActionPerformed="model.setMinTransferDate(transferBetweenStartDatePicker.getDate())"/>
+ <cell columns='3' weightx='1'>
+ <JTextField id='projectReferenceField'
+ onKeyReleased='handler.setText(event, "projectReference")'/>
</cell>
+
<cell>
- <JLabel styleClass='between2ndPartLabel'/>
+ <JLabel id='localReferenceLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='transferBetweenEndDatePicker'
- onActionPerformed="model.setMaxTransferDate(transferBetweenEndDatePicker.getDate())"/>
+ <cell columns='1' weightx='1'>
+ <JTextField id='localReferenceField'
+ onKeyReleased='handler.setText(event, "localReference")'/>
</cell>
- <cell anchor='west'>
- <JLabel id='transferByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='transferByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
</row>
-
+
<row>
- <cell anchor='west'>
- <JLabel id='archivedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='archivedBetweenStartDatePicker'
- onActionPerformed="model.setMinArchivedDate(archivedBetweenStartDatePicker.getDate())"/>
- </cell>
<cell>
- <JLabel styleClass='between2ndPartLabel'/>
+ <JLabel id='gammeLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='archivedBetweenEndDatePicker'
- onActionPerformed="model.setMaxArchivedDate(archivedBetweenEndDatePicker.getDate())"/>
+ <cell columns='3' weightx='1'>
+ <JComboBox id='gammeComboBox' genericType="Range"/>
</cell>
- <cell anchor='west'>
- <JLabel id='archivedByLabel'/>
+ <cell>
+ <JLabel id='objectLabel'/>
</cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='archivedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
+ <cell columns='1' weightx='1'>
+ <JTextField id='objectField'
+ onKeyReleased='handler.setText(event, "demandObject")'/>
</cell>
</row>
<row>
- <cell anchor='west'>
- <JLabel id='printedBetweenLabel'/>
+ <cell>
+ <JLabel id='docTypeLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='printedBetweenStartDatePicker'
- onActionPerformed="model.setMinPrintingDate(printedBetweenStartDatePicker.getDate())"/>
+ <cell columns='3' weightx='1'>
+ <JComboBox id='docTypeComboBox' genericType="DemandType" />
</cell>
+
<cell>
- <JLabel styleClass='between2ndPartLabel'/>
+ <JLabel id='bodyLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='printedBetweenEndDatePicker'
- onActionPerformed="model.setMaxPrintingDate(printedBetweenEndDatePicker.getDate())"/>
+ <cell columns='1' weightx='1'>
+ <JTextField id='bodyField'
+ onKeyReleased='handler.setText(event, "body")'/>
</cell>
-
- <cell anchor='west'>
- <JLabel id='printedByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='printedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
</row>
<row>
- <cell anchor='west'>
- <JLabel id='repliedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='repliedBetweenStartDatePicker'
- onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
- </cell>
<cell>
- <JLabel styleClass='between2ndPartLabel'/>
+ <JLabel id='clientLabel'/>
</cell>
- <cell weightx='1'>
- <JXDatePicker id='repliedBetweenEndDatePicker'
- onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
+ <cell columns='3' weightx='1'>
+ <JTextField id='clientField'
+ onKeyReleased='handler.setText(event, "clientCode")'/>
</cell>
- <cell anchor='west'>
- <JLabel id='repliedByLabel'/>
+ <cell>
+ <JLabel id='messageLabel'/>
</cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='repliedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
+ <cell columns='1' weightx='1'>
+ <JTextField id='messageField'
+ onKeyReleased='handler.setText(event, "message")'/>
</cell>
</row>
@@ -229,105 +187,172 @@
</cell>
<cell>
- <JLabel id='gammeLabel'/>
+ <JLabel id='statusLabel'/>
</cell>
- <cell columns='3' weightx='1'>
- <JComboBox id='gammeComboBox' genericType="Range" />
+ <cell weightx='1'>
+ <JComboBox id='statusComboBox' genericType="DemandStatus"/>
</cell>
</row>
<row>
+ <cell fill="none" columns="6" anchor="east">
+ <JToggleButton id="showAdvancedSearchButton"/>
+ </cell>
+ </row>
+
+ <row>
<cell>
- <JLabel id='objectLabel'/>
+ <JLabel id='takenByLabel' styleClass="advancedSearch"/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='objectField'
- onKeyReleased='handler.setText(event, "demandObject")'/>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='takenByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
</cell>
<cell>
- <JLabel id='docTypeLabel'/>
+ <JLabel id='ediCodeNumberLabel' styleClass="advancedSearch"/>
</cell>
<cell columns='3' weightx='1'>
- <JComboBox id='docTypeComboBox' genericType="DemandType"/>
+ <JTextField id='ediCodeNumberField' styleClass="advancedSearch"
+ onKeyReleased='handler.setText(event, "ediCodeNumber")'/>
</cell>
</row>
<row>
+ <cell anchor='west'>
+ <JLabel id='modifiedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='modifiedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinModificationDate(modifiedBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
- <JLabel id='ediCodeNumberLabel'/>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='ediCodeNumberField'
- onKeyReleased='handler.setText(event, "ediCodeNumber")'/>
+ <cell weightx='1'>
+ <JXDatePicker id='modifiedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxModificationDate(modifiedBetweenEndDatePicker.getDate())"/>
</cell>
+ <cell anchor='west'>
+ <JLabel id='modifiedByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='modifiedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell anchor='west'>
+ <JLabel id='transferBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='transferBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinTransferDate(transferBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
- <JLabel id='projectReferenceLabel'/>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
</cell>
- <cell columns="3" weightx='1'>
- <JTextField id='projectReferenceField'
- onKeyReleased='handler.setText(event, "projectReference")'/>
+ <cell weightx='1'>
+ <JXDatePicker id='transferBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxTransferDate(transferBetweenEndDatePicker.getDate())"/>
</cell>
+ <cell anchor='west'>
+ <JLabel id='transferByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='transferByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
</row>
<row>
- <cell>
- <JLabel id='priorityLabel'/>
+ <cell anchor='west'>
+ <JLabel id='archivedBetweenLabel' styleClass="advancedSearch"/>
</cell>
<cell weightx='1'>
- <JComboBox id='priorityComboBox' genericType="Priority"/>
+ <JXDatePicker id='archivedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinArchivedDate(archivedBetweenStartDatePicker.getDate())"/>
</cell>
-
<cell>
- <JLabel id='statusLabel'/>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
</cell>
<cell weightx='1'>
- <JComboBox id='statusComboBox' genericType="DemandStatus"/>
+ <JXDatePicker id='archivedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxArchivedDate(archivedBetweenEndDatePicker.getDate())"/>
</cell>
- <cell>
- <JLabel id='waitingStateLabel'/>
+ <cell anchor='west'>
+ <JLabel id='archivedByLabel' styleClass="advancedSearch"/>
</cell>
<cell columns='3' weightx='2'>
- <JComboBox id='waitingStateComboBox' genericType="WaitingState"/>
+ <BeanFilterableComboBox id='archivedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
</cell>
</row>
<row>
+ <cell anchor='west'>
+ <JLabel id='printedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='printedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinPrintingDate(printedBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
- <JLabel id='messageLabel'/>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='messageField'
- onKeyReleased='handler.setText(event, "message")'/>
+ <cell weightx='1'>
+ <JXDatePicker id='printedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxPrintingDate(printedBetweenEndDatePicker.getDate())"/>
</cell>
- <cell>
- <JLabel id='clientLabel'/>
+ <cell anchor='west'>
+ <JLabel id='printedByLabel' styleClass="advancedSearch"/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='clientField'
- onKeyReleased='handler.setText(event, "clientCode")'/>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='printedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
</cell>
</row>
<row>
+ <cell anchor='west'>
+ <JLabel id='repliedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
- <JLabel id='bodyLabel'/>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='bodyField'
- onKeyReleased='handler.setText(event, "body")'/>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
</cell>
- <cell>
- <JLabel id='localReferenceLabel'/>
+ <cell anchor='west'>
+ <JLabel id='repliedByLabel' styleClass="advancedSearch"/>
</cell>
- <cell columns='3' weightx='1'>
- <JTextField id='localReferenceField'
- onKeyReleased='handler.setText(event, "localReference")'/>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='repliedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+
</cell>
</row>
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-09-26 17:17:17 UTC (rev 646)
@@ -40,10 +40,14 @@
_selectOnFocus: {true};
}
-.between2ndPartLabel {
+.between2ndPartLabel, .between2ndPartLabel_advancedSearch {
text: "faxtomail.search.between2ndPart.label";
}
+.advancedSearch, .between2ndPartLabel_advancedSearch {
+ visible: { showAdvancedSearchButton.isSelected() };
+}
+
#goToFolderMenu {
actionIcon: list;
text: "faxtomail.search.action.gotoFolder";
@@ -202,7 +206,7 @@
}
#ediCodeNumberLabel {
- text: "faxtomail.demande.ediCodeNumber.label";
+ text: "faxtomail.demande.ediError.label";
}
#ediCodeNumberField {
@@ -237,6 +241,14 @@
text: { model.getLocalReference() };
}
+#commandNbLabel {
+ text: "faxtomail.demande.commandNb.label";
+}
+
+#commandNbField {
+ text: { model.getCommandNb() };
+}
+
#messageLabel {
text: "faxtomail.demande.comment.label";
}
@@ -270,6 +282,12 @@
selected: { model.isAddGroupDemands() };
}
+#showAdvancedSearchButton {
+ text: { showAdvancedSearchButton.isSelected() ? "faxtomail.search.hideAdvancedSearch.label" : "faxtomail.search.showAdvancedSearch.label" };
+ actionIcon: "expand";
+ selectedIcon: { JAXXWidgetUtil.createActionIcon("collapse") };
+}
+
#searchButton {
text: "faxtomail.search.button.label";
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-09-26 17:17:17 UTC (rev 646)
@@ -37,6 +37,7 @@
com.franciaflex.faxtomail.persistence.entities.FaxToMailUser
jaxx.runtime.swing.editor.bean.BeanFilterableComboBox
+ jaxx.runtime.swing.JAXXWidgetUtil
org.jdesktop.swingx.JXDatePicker
org.jdesktop.swingx.JXTable
@@ -72,284 +73,306 @@
<JPanel layout='{new BorderLayout()}'>
<JScrollPane id='searchScrollPane' constraints='BorderLayout.CENTER'>
- <Table fill='both'>
+ <Table fill='horizontal'>
- <row>
- <cell anchor='west'>
- <JLabel id='receivedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='receivedBetweenStartDatePicker'
- onActionPerformed="model.setMinReceptionDate(receivedBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='receivedBetweenEndDatePicker'
- onActionPerformed="model.setMaxReceptionDate(receivedBetweenEndDatePicker.getDate())"/>
- </cell>
+ <row>
+ <cell anchor='west'>
+ <JLabel id='receivedBetweenLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='receivedBetweenStartDatePicker'
+ onActionPerformed="model.setMinReceptionDate(receivedBetweenStartDatePicker.getDate())"/>
+ </cell>
- <cell>
- <JLabel id='takenByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='takenByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='receivedBetweenEndDatePicker'
+ onActionPerformed="model.setMaxReceptionDate(receivedBetweenEndDatePicker.getDate())"/>
+ </cell>
- <row>
- <cell anchor='west'>
- <JLabel id='modifiedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='modifiedBetweenStartDatePicker'
- onActionPerformed="model.setMinModificationDate(modifiedBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='modifiedBetweenEndDatePicker'
- onActionPerformed="model.setMaxModificationDate(modifiedBetweenEndDatePicker.getDate())"/>
- </cell>
+ <cell>
+ <JLabel id='priorityLabel'/>
+ </cell>
+ <cell weightx='2'>
+ <JComboBox id='priorityComboBox' genericType="Priority"/>
+ </cell>
+ </row>
- <cell anchor='west'>
- <JLabel id='modifiedByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='modifiedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
+ <row>
+ <cell>
+ <JLabel id='commandNbLabel'/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JTextField id='commandNbField'
+ onKeyReleased='handler.setText(event, "commandNb")'/>
+ </cell>
- <row>
- <cell anchor='west'>
- <JLabel id='transferBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='transferBetweenStartDatePicker'
- onActionPerformed="model.setMinTransferDate(transferBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='transferBetweenEndDatePicker'
- onActionPerformed="model.setMaxTransferDate(transferBetweenEndDatePicker.getDate())"/>
- </cell>
+ <cell>
+ <JLabel id='waitingStateLabel'/>
+ </cell>
+ <cell columns='1' weightx='1'>
+ <JComboBox id='waitingStateComboBox' genericType="WaitingState"/>
+ </cell>
+ </row>
- <cell anchor='west'>
- <JLabel id='transferByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='transferByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
-
- <row>
- <cell anchor='west'>
- <JLabel id='archivedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='archivedBetweenStartDatePicker'
- onActionPerformed="model.setMinArchivedDate(archivedBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='archivedBetweenEndDatePicker'
- onActionPerformed="model.setMaxArchivedDate(archivedBetweenEndDatePicker.getDate())"/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='projectReferenceLabel'/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JTextField id='projectReferenceField'
+ onKeyReleased='handler.setText(event, "projectReference")'/>
+ </cell>
- <cell anchor='west'>
- <JLabel id='archivedByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='archivedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
+ <cell>
+ <JLabel id='localReferenceLabel'/>
+ </cell>
+ <cell columns='1' weightx='1'>
+ <JTextField id='localReferenceField'
+ onKeyReleased='handler.setText(event, "localReference")'/>
+ </cell>
- <row>
- <cell anchor='west'>
- <JLabel id='printedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='printedBetweenStartDatePicker'
- onActionPerformed="model.setMinPrintingDate(printedBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='printedBetweenEndDatePicker'
- onActionPerformed="model.setMaxPrintingDate(printedBetweenEndDatePicker.getDate())"/>
- </cell>
-
- <cell anchor='west'>
- <JLabel id='printedByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='printedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
+ </row>
- <row>
- <cell anchor='west'>
- <JLabel id='repliedBetweenLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='repliedBetweenStartDatePicker'
- onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
- </cell>
- <cell>
- <JLabel styleClass='between2ndPartLabel'/>
- </cell>
- <cell weightx='1'>
- <JXDatePicker id='repliedBetweenEndDatePicker'
- onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='gammeLabel'/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JComboBox id='gammeComboBox' genericType="Range"/>
+ </cell>
- <cell anchor='west'>
- <JLabel id='repliedByLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <BeanFilterableComboBox id='repliedByComboBox'
- constructorParams='this'
- genericType="FaxToMailUser"/>
- </cell>
- </row>
+ <cell>
+ <JLabel id='objectLabel'/>
+ </cell>
+ <cell columns='1' weightx='1'>
+ <JTextField id='objectField'
+ onKeyReleased='handler.setText(event, "demandObject")'/>
+ </cell>
+ </row>
- <row>
- <cell>
- <JLabel id='senderLabel'/>
- </cell>
- <cell columns='3' weightx="1">
- <JTextField id='senderField'
- onKeyReleased='handler.setText(event, "sender")'/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='docTypeLabel'/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JComboBox id='docTypeComboBox' genericType="DemandType" />
+ </cell>
- <cell>
- <JLabel id='gammeLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JComboBox id='gammeComboBox' genericType="Range"/>
- </cell>
- </row>
+ <cell>
+ <JLabel id='bodyLabel'/>
+ </cell>
+ <cell columns='1' weightx='1'>
+ <JTextField id='bodyField'
+ onKeyReleased='handler.setText(event, "body")'/>
+ </cell>
+ </row>
- <row>
- <cell>
- <JLabel id='objectLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='objectField'
- onKeyReleased='handler.setText(event, "demandObject")'/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='clientLabel'/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JTextField id='clientField'
+ onKeyReleased='handler.setText(event, "clientCode")'/>
+ </cell>
- <cell>
- <JLabel id='docTypeLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JComboBox id='docTypeComboBox' genericType="DemandType" />
- </cell>
- </row>
+ <cell>
+ <JLabel id='messageLabel'/>
+ </cell>
+ <cell columns='1' weightx='1'>
+ <JTextField id='messageField'
+ onKeyReleased='handler.setText(event, "message")'/>
+ </cell>
+ </row>
- <row>
- <cell>
- <JLabel id='ediCodeNumberLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='ediCodeNumberField'
- onKeyReleased='handler.setText(event, "ediCodeNumber")'/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='senderLabel'/>
+ </cell>
+ <cell columns='3' weightx="1">
+ <JTextField id='senderField'
+ onKeyReleased='handler.setText(event, "sender")'/>
+ </cell>
- <cell>
- <JLabel id='projectReferenceLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='projectReferenceField'
- onKeyReleased='handler.setText(event, "projectReference")'/>
- </cell>
+ <cell>
+ <JLabel id='statusLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JComboBox id='statusComboBox' genericType="DemandStatus"/>
+ </cell>
+ </row>
- </row>
+ <row>
+ <cell columns="5">
+ <JCheckBox id="addGroupedElementCheckbox"
+ onItemStateChanged='handler.setBoolean(event, "addGroupDemands")'/>
+ </cell>
+ <cell fill="none" anchor="east">
+ <JToggleButton id="showAdvancedSearchButton"/>
+ </cell>
+ </row>
- <row>
- <cell>
- <JLabel id='priorityLabel'/>
- </cell>
- <cell weightx='1'>
- <JComboBox id='priorityComboBox' genericType="Priority"/>
- </cell>
+ <row>
+ <cell>
+ <JLabel id='takenByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='takenByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
- <cell>
- <JLabel id='statusLabel'/>
- </cell>
- <cell weightx='1'>
- <JComboBox id='statusComboBox' genericType="DemandStatus"/>
- </cell>
+ <cell>
+ <JLabel id='ediCodeNumberLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='1'>
+ <JTextField id='ediCodeNumberField' styleClass="advancedSearch"
+ onKeyReleased='handler.setText(event, "ediCodeNumber")'/>
+ </cell>
+ </row>
- <cell>
- <JLabel id='waitingStateLabel'/>
- </cell>
- <cell columns='3' weightx='2'>
- <JComboBox id='waitingStateComboBox' genericType="WaitingState"/>
- </cell>
- </row>
+ <row>
+ <cell anchor='west'>
+ <JLabel id='modifiedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='modifiedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinModificationDate(modifiedBetweenStartDatePicker.getDate())"/>
+ </cell>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='modifiedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxModificationDate(modifiedBetweenEndDatePicker.getDate())"/>
+ </cell>
- <row>
- <cell>
- <JLabel id='messageLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='messageField'
- onKeyReleased='handler.setText(event, "message")'/>
- </cell>
+ <cell anchor='west'>
+ <JLabel id='modifiedByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='modifiedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
- <cell>
- <JLabel id='clientLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='clientField'
- onKeyReleased='handler.setText(event, "clientCode")'/>
- </cell>
- </row>
+ <row>
+ <cell anchor='west'>
+ <JLabel id='transferBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='transferBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinTransferDate(transferBetweenStartDatePicker.getDate())"/>
+ </cell>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='transferBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxTransferDate(transferBetweenEndDatePicker.getDate())"/>
+ </cell>
- <row>
- <cell>
- <JLabel id='bodyLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='bodyField'
- onKeyReleased='handler.setText(event, "body")'/>
- </cell>
+ <cell anchor='west'>
+ <JLabel id='transferByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='transferByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
- <cell>
- <JLabel id='localReferenceLabel'/>
- </cell>
- <cell columns='3' weightx='1'>
- <JTextField id='localReferenceField'
- onKeyReleased='handler.setText(event, "localReference")'/>
- </cell>
- </row>
+ <row>
+ <cell anchor='west'>
+ <JLabel id='archivedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='archivedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinArchivedDate(archivedBetweenStartDatePicker.getDate())"/>
+ </cell>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='archivedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxArchivedDate(archivedBetweenEndDatePicker.getDate())"/>
+ </cell>
- <row>
- <cell columns="6">
- <JCheckBox id="addGroupedElementCheckbox"
- onItemStateChanged='handler.setBoolean(event, "addGroupDemands")'/>
- </cell>
- </row>
+ <cell anchor='west'>
+ <JLabel id='archivedByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='archivedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
- </Table>
+ <row>
+ <cell anchor='west'>
+ <JLabel id='printedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='printedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinPrintingDate(printedBetweenStartDatePicker.getDate())"/>
+ </cell>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='printedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxPrintingDate(printedBetweenEndDatePicker.getDate())"/>
+ </cell>
+
+ <cell anchor='west'>
+ <JLabel id='printedByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='printedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell anchor='west'>
+ <JLabel id='repliedBetweenLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenStartDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
+ </cell>
+ <cell>
+ <JLabel styleClass='between2ndPartLabel_advancedSearch'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenEndDatePicker' styleClass="advancedSearch"
+ onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
+ </cell>
+
+ <cell anchor='west'>
+ <JLabel id='repliedByLabel' styleClass="advancedSearch"/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='repliedByComboBox'
+ styleClass="advancedSearch"
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+
+ </cell>
+ </row>
+
+ </Table>
+
</JScrollPane>
<JPanel constraints='BorderLayout.SOUTH'>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -73,9 +73,9 @@
public SearchUIModel() {
super(fromBeanBinder, toBeanBinder);
+ setAddGroupDemands(true);
}
-
public void setSender(String sender) {
Object oldValue = getSender();
editObject.setSender(sender);
@@ -222,6 +222,16 @@
return editObject.getProjectReference();
}
+ public String getCommandNb() {
+ return editObject.getCommandNb();
+ }
+
+ public void setCommandNb(String commandNb) {
+ Object oldValue = getCommandNb();
+ editObject.setCommandNb(commandNb);
+ firePropertyChanged(SearchFilter.PROPERTY_COMMAND_NB, oldValue, commandNb);
+ }
+
public String getLocalReference() {
return editObject.getLocalReference();
}
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -43,6 +43,9 @@
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
+import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.EmailGroup;
+import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupCellRenderer;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
@@ -175,6 +178,12 @@
RepliesCellRenderer.newRender(getDecorator(Reply.class, null)),
DemandeTableModel.COLUMN_IDENTIFIERS.get(columnName)).setSortable(sortable);
+ } else if (MailField.GROUP.equals(columnName)) {
+ addColumnToModel(columnModel,
+ null,
+ DemandGroupCellRenderer.newRender(),
+ DemandeTableModel.COLUMN_IDENTIFIERS.get(columnName)).setSortable(sortable);
+
} else {
TableCellRenderer tableCellRenderer;
switch (columnName) {
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -38,6 +38,7 @@
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
import javax.swing.AbstractAction;
@@ -51,8 +52,10 @@
import javax.swing.WindowConstants;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
+import javax.swing.table.TableColumnModel;
import javax.swing.text.JTextComponent;
+import com.google.common.collect.Lists;
import jaxx.runtime.JAXXUtil;
import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.editor.bean.BeanUIUtil;
@@ -60,11 +63,15 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jdesktop.swingx.autocomplete.ComboBoxCellEditor;
+import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
+import org.jdesktop.swingx.table.TableColumnExt;
import org.nuiton.decorator.Decorator;
import org.nuiton.jaxx.application.ApplicationDataUtil;
import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler;
import org.nuiton.jaxx.application.swing.ApplicationUI;
import org.nuiton.jaxx.application.swing.action.AbstractApplicationAction;
+import org.nuiton.jaxx.application.swing.table.ColumnIdentifier;
import org.nuiton.jaxx.application.swing.util.Cancelable;
import org.nuiton.jaxx.application.swing.util.CloseableUI;
import org.nuiton.util.beans.BeanUtil;
@@ -460,4 +467,30 @@
return enabled;
}
+
+ protected <R, B> TableColumnExt addComboDataColumnToModel(TableColumnModel model,
+ ColumnIdentifier<R> identifier,
+ Decorator<B> decorator,
+ List<B> data) {
+ JComboBox comboBox = new JComboBox();
+ comboBox.setMaximumRowCount(20);
+ comboBox.setRenderer(newListCellRender(decorator));
+
+ List<B> dataToList = Lists.newArrayList(data);
+
+ // add a null value at first position
+ if (!dataToList.isEmpty() && dataToList.get(0) != null) {
+ dataToList.add(0, null);
+ }
+ SwingUtil.fillComboBox(comboBox, dataToList, null);
+
+ ObjectToStringConverter converter = BeanUIUtil.newDecoratedObjectToStringConverter(decorator);
+ BeanUIUtil.decorate(comboBox, converter);
+ ComboBoxCellEditor editor = new ComboBoxCellEditor(comboBox);
+
+ return addColumnToModel(model,
+ editor,
+ newTableCellRender(decorator),
+ identifier);
+ }
}
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-09-26 17:17:17 UTC (rev 646)
@@ -163,6 +163,12 @@
n("faxtomail.demandeList.table.header.attachment"),
n("faxtomail.demandeList.table.header.attachment.tip")));
+ put(MailField.GROUP,
+ ColumnIdentifier.<Email>newId(
+ DemandeUIModel.PROPERTY_GROUPED_DEMANDES,
+ n("faxtomail.demandeList.table.header.emailGroup"),
+ n("faxtomail.demandeList.table.header.emailGroup.tip")));
+
put(MailField.LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
ColumnIdentifier.<Email>newId(
Email.PROPERTY_LAST_ATTACHMENT_OPENER,
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-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-09-26 17:17:17 UTC (rev 646)
@@ -27,7 +27,7 @@
faxtomail.action.transmit.tip=Déplacer l'élément
faxtomail.alert.alreadyLockedBy.message=L'élément est déjà verrouillé par %s, vous ne pouvez pas l'ouvrir.
faxtomail.alert.alreadyLockedBy.title=Document déjà verrouillé
-faxtomail.alert.alreadyTakenBy.help=Voulez-vous le prendre ?<ul><li><strong>Annuler</strong> pour ne retourner à la liste</li><li><strong>Non</strong> pour visualiser l'élément en lecture seule</li><li><strong>Oui</strong> pour le prendre</li></ul>
+faxtomail.alert.alreadyTakenBy.help=Voulez-vous le prendre ?<ul><li><strong>Annuler</strong> pour retourner à la liste</li><li><strong>Non</strong> pour visualiser l'élément en lecture seule</li><li><strong>Oui</strong> pour le prendre</li></ul>
faxtomail.alert.alreadyTakenBy.message=L'élément est déjà pris par %s.
faxtomail.alert.alreadyTakenBy.title=Document déjà pris
faxtomail.alert.archiveConfirmation.message=<html>Êtes vous sûr de vouloir archiver cet élément ?<br/>L'archivage est définitif.</html>
@@ -81,9 +81,11 @@
faxtomail.common.on.label=le
faxtomail.demand.title=Détail
faxtomail.demandGroup.action.tip=Éléments groupés avec l'élément courant
+faxtomail.demandGroup.empty=Aucun élément groupé
faxtomail.demandGroup.text=Groupe (%s)
faxtomail.demandGroup.title=Groupe
-faxtomail.demandReplies.action.forward.tip=
+faxtomail.demandGroupCellRenderer.text=(%s)
+faxtomail.demandReplies.action.forward.tip=Transmettre la réponse
faxtomail.demandReplies.action.open.tip=Visualiser la réponse
faxtomail.demandReplies.action.tip=Réponses envoyées
faxtomail.demandReplies.empty=Aucune réponse envoyée
@@ -102,12 +104,12 @@
faxtomail.demande.client.label=Code client
faxtomail.demande.clientBrand.label=Marque
faxtomail.demande.clientCode.label=Client
+faxtomail.demande.commandNb.label=Numéro de commande/devis
faxtomail.demande.comment.label=Message
faxtomail.demande.companyReference.label=Notre référence
faxtomail.demande.demandStatus.label=Statut
faxtomail.demande.demandType.label=Type
faxtomail.demande.docType.label=Type
-faxtomail.demande.ediCodeNumber.label=Code EDI
faxtomail.demande.ediError.label=Retour EDI
faxtomail.demande.fax.label=Fax
faxtomail.demande.firstOpened.label=Première ouverture
@@ -175,6 +177,8 @@
faxtomail.demandeList.table.header.companyReference.tip=Notre référence
faxtomail.demandeList.table.header.ediCodeNumber=Retour EDI
faxtomail.demandeList.table.header.ediCodeNumber.tip=Retour EDI
+faxtomail.demandeList.table.header.emailGroup=Groupe
+faxtomail.demandeList.table.header.emailGroup.tip=Éléments groupés
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
@@ -232,6 +236,11 @@
faxtomail.pdfEditor.button.addVLine.tip=Ajouter une ligne verticale
faxtomail.pdfEditor.button.nextPage=Page suivante
faxtomail.pdfEditor.button.previousPage=Page précédente
+faxtomail.pdfEditor.button.print=Imprimer
+faxtomail.pdfEditor.button.rotateAntiClockwise=Rotation sens anti-horaire
+faxtomail.pdfEditor.button.rotateClockwise=Rotation sens horaire
+faxtomail.pdfEditor.button.zoomIn=Agrandir
+faxtomail.pdfEditor.button.zoomOut=Réduire
faxtomail.pdfEditor.convertToPdf.error=Erreur lors de la conversion en PDF
faxtomail.pdfEditor.readPdf.error=Erreur lors de la lecture du PDF
faxtomail.print.success.message=%s fichiers ont été imprimés
@@ -275,13 +284,15 @@
faxtomail.search.archivedBetween.label=Archivé entre le
faxtomail.search.between2ndPart.label=et le
faxtomail.search.button.label=Rechercher
+faxtomail.search.hideAdvancedSearch.label=Cacher la recherche avancée
faxtomail.search.modifiedBetween.label=Modifié entre le
faxtomail.search.modifiedBy.label=Modifié par
faxtomail.search.printedBetween.label=Imprimé entre le
faxtomail.search.receivedBetween.label=Reçu entre le
faxtomail.search.repliedBetween.label=Réponse entre le
+faxtomail.search.showAdvancedSearch.label=Afficher la recherche avancée
faxtomail.search.title=Recherche
-faxtomail.search.transferBetween.label=Transmit entre le
+faxtomail.search.transferBetween.label=Transmis entre le
faxtomail.searchToGroup.action.cancel=Annuler
faxtomail.searchToGroup.action.cancel.tip=Fermer la fenêtre sans grouper l'élément
faxtomail.searchToGroup.action.group=Grouper
Added: trunk/faxtomail-ui-swing/src/main/resources/icons/action-collapse.png
===================================================================
(Binary files differ)
Property changes on: trunk/faxtomail-ui-swing/src/main/resources/icons/action-collapse.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/faxtomail-ui-swing/src/main/resources/icons/action-expand.png
===================================================================
(Binary files differ)
Property changes on: trunk/faxtomail-ui-swing/src/main/resources/icons/action-expand.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties 2014-09-25 16:05:06 UTC (rev 645)
+++ trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties 2014-09-26 17:17:17 UTC (rev 646)
@@ -17,6 +17,7 @@
com.franciaflex.faxtomail.persistence.entities.MailField.DEMAND_TYPE=Type de demande
com.franciaflex.faxtomail.persistence.entities.MailField.EDI_RETURN=Retour EDI
com.franciaflex.faxtomail.persistence.entities.MailField.FAX=Fax
+com.franciaflex.faxtomail.persistence.entities.MailField.GROUP=Groupe
com.franciaflex.faxtomail.persistence.entities.MailField.LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER=Dernier à ouvrir une PJ
com.franciaflex.faxtomail.persistence.entities.MailField.MAIL_FOLDER=Dossier
com.franciaflex.faxtomail.persistence.entities.MailField.OBJECT=Objet
1
0
r645 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions
by kmorin@users.forge.codelutin.com 25 Sep '14
by kmorin@users.forge.codelutin.com 25 Sep '14
25 Sep '14
Author: kmorin
Date: 2014-09-25 18:05:06 +0200 (Thu, 25 Sep 2014)
New Revision: 645
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/645
Log:
fixes #5860 Erreur quand on enregistre un ?\195?\169l?\195?\169ment apr?\195?\168s une erreur de client non trouv?\195?\169 et des nouvelles lignes dans le tableau de gammes
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAction.java
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAction.java 2014-09-24 16:00:33 UTC (rev 644)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAction.java 2014-09-25 16:05:06 UTC (rev 645)
@@ -28,6 +28,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
@@ -139,6 +140,11 @@
// BeanMonitor monitor = getHandler().getMonitor();
// String previousClientCode = (String) monitor.getOriginalValues().get(DemandeUIModel.PROPERTY_CLIENT_CODE);
model.setClientCode(null);
+
+ // reset the range rows of the model
+ BeanMonitor monitor = getHandler().getMonitor();
+ List<RangeRow> rangeRows = (List<RangeRow>) monitor.getOriginalValues().get(Email.PROPERTY_RANGE_ROW);
+ model.setRangeRow(rangeRows);
}
}
}
1
0