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
September 2014
- 2 participants
- 59 discussions
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
r644 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history faxtomail-ui-swing/src/main/resources/i18n
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 18:00:33 +0200 (Wed, 24 Sep 2014)
New Revision: 644
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/644
Log:
- correction de la recherche par personne ayant archiv?\195?\169
- copie de l'historique dans le presse-papier pour que l'utilisateur le colle dans le mail. Si l'historique est trop long, il est coup?\195?\169 dans le mail.
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-24 13:47:37 UTC (rev 643)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-24 16:00:33 UTC (rev 644)
@@ -182,8 +182,8 @@
// history maxArchivedDate && transferBy
if (searchFilter.getMaxArchivedDate() != null || searchFilter.getArchivedBy() != null) {
query.append(" AND EXISTS (FROM " + History.class.getName() + " H WHERE H in elements(E." + Email.PROPERTY_HISTORY + ")");
- query.append(" AND H." + History.PROPERTY_TYPE + " = :transmissionType");
- args.put("transmissionType", HistoryType.TRANSMISSION);
+ query.append(" AND H." + History.PROPERTY_TYPE + " = :archivedType");
+ args.put("archivedType", HistoryType.ARCHIVED);
if (searchFilter.getMaxArchivedDate() != null) {
Date date = DateUtils.ceiling(searchFilter.getMaxArchivedDate(), Calendar.DAY_OF_MONTH);
query.append(" AND H." + History.PROPERTY_MODIFICATION_DATE + " <= :" + SearchFilter.PROPERTY_MAX_ARCHIVED_DATE);
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-24 13:47:37 UTC (rev 643)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-09-24 16:00:33 UTC (rev 644)
@@ -43,6 +43,8 @@
import javax.swing.*;
import java.awt.*;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -144,7 +146,15 @@
historyAsString.append(" ").append(decorateUser(history.getFaxToMailUser(), true));
historyAsString.append("\n");
}
- FaxToMailUIUtil.email(t("faxtomail.demande.history.send.subject", getModel().getTitle()), historyAsString.toString());
+
+ StringSelection stringSelection = new StringSelection(historyAsString.toString());
+ Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
+ clpbrd.setContents (stringSelection, null);
+
+ FaxToMailUIUtil.email(t("faxtomail.demande.history.send.subject", getModel().getTitle()),
+ t("faxtomail.demande.history.send.body"));
+
+ closeEditor();
}
};
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-24 13:47:37 UTC (rev 643)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-09-24 16:00:33 UTC (rev 644)
@@ -115,6 +115,7 @@
faxtomail.demande.group.button.label=Grouper
faxtomail.demande.group.successful=Groupement réussi
faxtomail.demande.history.action.send.tip=Envoyer l'historique par email
+faxtomail.demande.history.send.body=L'historique de l'élément a été copié dans le presse-papier. Vous pouvez le coller dans cet email en appuyant sur les touches Ctrl+V ou ou en cliquant sur le menu "Édition -> Coller"
faxtomail.demande.history.send.subject=Historique de %s
faxtomail.demande.lastAttachmentOpening.label=Dernière ouverture de pièce-jointe
faxtomail.demande.lastModified.label=Dernière modification
1
0
r643 - trunk/faxtomail-ui-web/src/main/resources/i18n
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 15:47:37 +0200 (Wed, 24 Sep 2014)
New Revision: 643
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/643
Log:
modif traduction
Modified:
trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties
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-24 13:26:13 UTC (rev 642)
+++ trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties 2014-09-24 13:47:37 UTC (rev 643)
@@ -11,7 +11,7 @@
com.franciaflex.faxtomail.persistence.entities.MailField.CLIENT=Client
com.franciaflex.faxtomail.persistence.entities.MailField.CLIENT_BRAND=Marque
com.franciaflex.faxtomail.persistence.entities.MailField.CLIENT_CODE=Code client
-com.franciaflex.faxtomail.persistence.entities.MailField.COMMENT=Commentaire
+com.franciaflex.faxtomail.persistence.entities.MailField.COMMENT=Message
com.franciaflex.faxtomail.persistence.entities.MailField.COMPANY_REFERENCE=Notre référence
com.franciaflex.faxtomail.persistence.entities.MailField.DEMAND_STATUS=Statut de demande
com.franciaflex.faxtomail.persistence.entities.MailField.DEMAND_TYPE=Type de demande
1
0
r642 - in trunk: faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 15:26:13 +0200 (Wed, 24 Sep 2014)
New Revision: 642
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/642
Log:
- ne pas g?\195?\169n?\195?\169rer la version text plain du mail en pdf s'il existe une version html
- retourner ?\195?\160 la page 1 quand on filtre
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java
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-24 12:43:29 UTC (rev 641)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-24 13:26:13 UTC (rev 642)
@@ -274,6 +274,8 @@
protected void executeFilter() {
FaxToMailUIContext context = handler.getContext();
+ handler.getModel().resetPaginationParameter();
+
LoadFolderEmailsAction loadFolderEmailsAction =
context.getActionFactory().createLogicAction(handler, LoadFolderEmailsAction.class);
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-09-24 12:43:29 UTC (rev 641)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-09-24 13:26:13 UTC (rev 642)
@@ -465,6 +465,14 @@
}
Attachment attachment = convertHTMLToPdf(attachments, htmlContent, t("faxtomail.email.content.attachment.htmlfileName"));
if (attachment != null) {
+ //remove text plain attachement if exists, to avoid having twice the mail content in the attachments
+ String plainTextFileName = t("faxtomail.email.content.attachment.plainfileName") + ".pdf";
+ for (Attachment a : attachments) {
+ if (plainTextFileName.equals(a.getOriginalFileName())) {
+ attachments.remove(a);
+ break;
+ }
+ }
attachments.add(attachment);
}
}
1
0
r641 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 14:43:29 +0200 (Wed, 24 Sep 2014)
New Revision: 641
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/641
Log:
try to use portrait
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java
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-24 12:35:48 UTC (rev 640)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-09-24 12:43:29 UTC (rev 641)
@@ -506,6 +506,8 @@
// 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);
1
0
r640 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 14:35:48 +0200 (Wed, 24 Sep 2014)
New Revision: 640
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/640
Log:
- filtre sur les quantit?\195?\169s plut?\195?\180t que sur les gammes
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-09-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -48,9 +48,9 @@
public static final String PROPERTY_RECEPTION_DATES = "receptionDates";
public static final String PROPERTY_RECIPIENTS = "recipients";
public static final String PROPERTY_DEMAND_STATUS = "demandStatus";
- public static final String PROPERTY_PRODUCT_RANGES = "productsRanges";
- public static final String PROPERTY_SAV_RANGES = "savRanges";
- public static final String PROPERTY_QUOTATION_RANGES = "quotationRanges";
+ public static final String PROPERTY_PRODUCT_QUANTITIES = "productsQuantities";
+ public static final String PROPERTY_SAV_QUANTITIES = "savQuantities";
+ public static final String PROPERTY_QUOTATION_QUANTITIES = "quotationQuantities";
public static final String PROPERTY_TAKEN_BYS = "takenBys";
public static final String PROPERTY_COMMENTS = "comments";
public static final String PROPERTY_EDI_CODE_NUMBERS = "ediCodeNumbers";
@@ -82,11 +82,11 @@
protected Set<DemandStatus> demandStatus;
- protected Set<Range> productsRanges;
+ protected Set<Long> productsQuantities;
- protected Set<Range> savRanges;
+ protected Set<Long> savQuantities;
- protected Set<Range> quotationRanges;
+ protected Set<Long> quotationQuantities;
protected Set<FaxToMailUser> takenBys;
@@ -206,31 +206,31 @@
firePropertyChange(PROPERTY_DEMAND_STATUS, null, demandStatus);
}
- public Set<Range> getProductsRanges() {
- return productsRanges;
+ public Set<Long> getProductsQuantities() {
+ return productsQuantities;
}
- public void setProductsRanges(Set<Range> productsRanges) {
- this.productsRanges = productsRanges;
- firePropertyChange(PROPERTY_PRODUCT_RANGES, null, productsRanges);
+ public void setProductsQuantities(Set<Long> productsQuantities) {
+ this.productsQuantities = productsQuantities;
+ firePropertyChange(PROPERTY_PRODUCT_QUANTITIES, null, productsQuantities);
}
- public Set<Range> getSavRanges() {
- return savRanges;
+ public Set<Long> getSavQuantities() {
+ return savQuantities;
}
- public void setSavRanges(Set<Range> savRanges) {
- this.savRanges = savRanges;
- firePropertyChange(PROPERTY_SAV_RANGES, null, savRanges);
+ public void setSavQuantities(Set<Long> savQuantities) {
+ this.savQuantities = savQuantities;
+ firePropertyChange(PROPERTY_SAV_QUANTITIES, null, savQuantities);
}
- public Set<Range> getQuotationRanges() {
- return quotationRanges;
+ public Set<Long> getQuotationQuantities() {
+ return quotationQuantities;
}
- public void setQuotationRanges(Set<Range> quotationRanges) {
- this.quotationRanges = quotationRanges;
- firePropertyChange(PROPERTY_QUOTATION_RANGES, null, quotationRanges);
+ public void setQuotationQuantities(Set<Long> quotationQuantities) {
+ this.quotationQuantities = quotationQuantities;
+ firePropertyChange(PROPERTY_QUOTATION_QUANTITIES, null, quotationQuantities);
}
public Set<FaxToMailUser> getTakenBys() {
@@ -282,7 +282,7 @@
setClientCodes(null);
setWaitingStates(null);
setDemandStatus(null);
- setQuotationRanges(null);
+ setQuotationQuantities(null);
setPriorities(null);
setClientBrands(null);
setComments(null);
@@ -294,10 +294,10 @@
setLocalReferences(null);
setReferences(null);
setProjectReferences(null);
- setProductsRanges(null);
+ setProductsQuantities(null);
setReceptionDates(null);
setRecipients(null);
- setSavRanges(null);
+ setSavQuantities(null);
setSenders(null);
}
}
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-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -706,48 +706,36 @@
query.append(")");
}
- Set<Range> productRanges = emailFilter.getProductsRanges();
- if (CollectionUtils.isNotEmpty(productRanges)) {
- query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_RANGE + " IN (:" + EmailFilter.PROPERTY_PRODUCT_RANGES + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_PRODUCT_QUANTITY + " > 0 )");
+ Set<Long> savQuantities = emailFilter.getSavQuantities();
+ if (CollectionUtils.isNotEmpty(savQuantities)) {
+ query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))"
+ + " AND (select sum(RR." + RangeRow.PROPERTY_SAV_QUANTITY + ") " +
+ "FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
+ query.append(") IN (:" + EmailFilter.PROPERTY_SAV_QUANTITIES + ")");
- if (productRanges.contains(null)) {
+ if (savQuantities.contains(null) || savQuantities.contains(0L)) {
query.append(" OR NOT EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))");
}
query.append("))");
- args.put(EmailFilter.PROPERTY_PRODUCT_RANGES, productRanges);
+ args.put(EmailFilter.PROPERTY_SAV_QUANTITIES, savQuantities);
}
- Set<Range> savRanges = emailFilter.getSavRanges();
- if (CollectionUtils.isNotEmpty(savRanges)) {
- query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_RANGE + " IN (:" + EmailFilter.PROPERTY_SAV_RANGES + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_SAV_QUANTITY + " > 0 )");
+ Set<Long> quotationQuantities = emailFilter.getQuotationQuantities();
+ if (CollectionUtils.isNotEmpty(quotationQuantities)) {
+ query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))"
+ + " AND (select sum(RR." + RangeRow.PROPERTY_QUOTATION_QUANTITY + ") " +
+ "FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
+ query.append(") IN (:" + EmailFilter.PROPERTY_QUOTATION_QUANTITIES + ")");
- if (savRanges.contains(null)) {
+ if (quotationQuantities.contains(null) || quotationQuantities.contains(0L)) {
query.append(" OR NOT EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))");
}
query.append("))");
- args.put(EmailFilter.PROPERTY_SAV_RANGES, savRanges);
+ args.put(EmailFilter.PROPERTY_QUOTATION_QUANTITIES, quotationQuantities);
}
- Set<Range> quotationRanges = emailFilter.getQuotationRanges();
- if (CollectionUtils.isNotEmpty(quotationRanges)) {
- query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_RANGE + " IN (:" + EmailFilter.PROPERTY_QUOTATION_RANGES + ")");
- query.append(" AND RR." + RangeRow.PROPERTY_QUOTATION_QUANTITY + " > 0 )");
-
- if (quotationRanges.contains(null)) {
- query.append(" OR NOT EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))");
- }
- query.append("))");
-
- args.put(EmailFilter.PROPERTY_QUOTATION_RANGES, quotationRanges);
- }
-
Set<String> projectReferences = emailFilter.getProjectReferences();
if (projectReferences != null) {
query.append(" AND (E." + Email.PROPERTY_PROJECT_REFERENCE + " in (:" + EmailFilter.PROPERTY_PROJECT_REFERENCES + ")");
@@ -922,14 +910,19 @@
return result;
}
- public Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition) {
+ public Set<Object> getDistinctValues(MailFolder folder, String[] properties, boolean sum) {
Map<String, Object> args = new HashMap<>();
String folderAndStatusCondition = " WHERE email." + Email.PROPERTY_MAIL_FOLDER + " = :folder" +
" AND email." + Email.PROPERTY_DEMAND_STATUS + " != :archiveStatus";
args.put("folder", folder);
args.put("archiveStatus", DemandStatus.ARCHIVED);
- String propertyList = StringUtils.join(properties, ", ");
+ String propertyList;
+ if (sum) {
+ propertyList = "sum(" + StringUtils.join(properties, "), sum(") + ")";
+ } else {
+ propertyList = StringUtils.join(properties, ", ");
+ }
String query = "SELECT DISTINCT " + propertyList +
" FROM " + Email.class.getName() + " AS email";
@@ -947,8 +940,8 @@
}
query += folderAndStatusCondition;
- if (StringUtils.isNotBlank(condition)) {
- query += " AND " + condition;
+ if (sum) {
+ query += " group by email." + Email.PROPERTY_TOPIA_ID;
}
List<Object> queryResults = findAll(query, args);
@@ -999,7 +992,11 @@
// TODO echatellier 20140918 : on ajoute null dans tous les cas car les requetes precendente
// sont trop lente juste pour savoir si on a vraiment besoin de savoir si l'on doit vraiment
// avoir des valeurs nulles
- if (!result.contains("")) {
+ if (sum && result.contains(null)) {
+ result.remove(null);
+ result.add(0L);
+
+ } else if (!result.contains("")) {
result.add(null);
}
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-09-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -73,7 +73,7 @@
void transmitPendingDemandsToEdi();
- Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition);
+ Set<Object> getDistinctValues(MailFolder folder, String[] properties, boolean sum);
PaginationResult<Email> getEmailForFolder(MailFolder folder, FaxToMailUser currentUser, EmailFilter filter, PaginationParameter page);
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-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -614,11 +614,11 @@
}
@Override
- public Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition) {
+ public Set<Object> getDistinctValues(MailFolder folder, String[] properties, boolean sum) {
Set<Object> result = null;
if (folder.isFolderReadable()) {
EmailTopiaDao dao = getPersistenceContext().getEmailDao();
- result = dao.getDistinctValues(folder, properties, condition);
+ result = dao.getDistinctValues(folder, properties, sum);
}
return result;
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java 2014-09-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SaveDemandeAndExitAction.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -37,8 +37,8 @@
}
@Override
- public void doAction() throws Exception {
- super.doAction();
+ public void postSuccessAction() {
+ super.postSuccessAction();
getActionEngine().runInternalAction(getContext().getMainUI().getHandler(), GoToPreviousScreenAction.class);
}
}
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-24 09:23:49 UTC (rev 639)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-24 12:35:48 UTC (rev 640)
@@ -141,15 +141,15 @@
break;
case DemandeUIModel.PROPERTY_PF_NB:
- emailFilter.setProductsRanges(!filtered ? null : new HashSet<Range>((Collection) items));
+ emailFilter.setProductsQuantities(!filtered ? null : new HashSet<Long>((Collection) items));
break;
case DemandeUIModel.PROPERTY_SAV_NB:
- emailFilter.setSavRanges(!filtered ? null : new HashSet<Range>((Collection) items));
+ emailFilter.setSavQuantities(!filtered ? null : new HashSet<Long>((Collection) items));
break;
case DemandeUIModel.PROPERTY_QUOTATION_NB:
- emailFilter.setQuotationRanges(!filtered ? null : new HashSet<Range>((Collection) items));
+ emailFilter.setQuotationQuantities(!filtered ? null : new HashSet<Long>((Collection) items));
break;
case Email.PROPERTY_LAST_ATTACHMENT_OPENER:
@@ -183,7 +183,7 @@
Set<Object> result = new HashSet<>();
- String condition = null;
+ boolean sum = false;
String[] properties;
switch (property) {
case DemandeUIModel.PROPERTY_CLIENT_CODE:
@@ -200,18 +200,18 @@
break;
case DemandeUIModel.PROPERTY_PF_NB:
- condition = "rangeRow." + RangeRow.PROPERTY_PRODUCT_QUANTITY + " > 0";
- properties = new String[] { "rangeRow." + RangeRow.PROPERTY_RANGE };
+ properties = new String[] { "rangeRow." + RangeRow.PROPERTY_PRODUCT_QUANTITY };
+ sum = true;
break;
case DemandeUIModel.PROPERTY_SAV_NB:
- condition = "rangeRow." + RangeRow.PROPERTY_SAV_QUANTITY + " > 0";
- properties = new String[] { "rangeRow." + RangeRow.PROPERTY_RANGE };
+ properties = new String[] { "rangeRow." + RangeRow.PROPERTY_SAV_QUANTITY };
+ sum = true;
break;
case DemandeUIModel.PROPERTY_QUOTATION_NB:
- condition = "rangeRow." + RangeRow.PROPERTY_QUOTATION_QUANTITY + " > 0";
- properties = new String[] { "rangeRow." + RangeRow.PROPERTY_RANGE };
+ properties = new String[] { "rangeRow." + RangeRow.PROPERTY_QUOTATION_QUANTITY };
+ sum = true;
break;
case Email.PROPERTY_ATTACHMENT:
@@ -224,7 +224,7 @@
result.addAll(emailService.getDistinctValues(selectedFolder,
properties,
- condition));
+ sum));
if (Email.PROPERTY_RECEPTION_DATE.equals(property)) {
Set<Object> filteredDates = new HashSet<>();
1
0
r639 - trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 11:23:49 +0200 (Wed, 24 Sep 2014)
New Revision: 639
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/639
Log:
correction de la recherche avec ?\195?\169l?\195?\169ments group?\195?\169s
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
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-24 08:31:35 UTC (rev 638)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-24 09:23:49 UTC (rev 639)
@@ -371,7 +371,19 @@
}
// add same fecth liste as emailService#getEmailForFolder()
- String hqlForFetchStep1 = "select E." + TopiaEntity.PROPERTY_TOPIA_ID + " FROM " + Email.class.getName() + " E " + query.toString();
+ String hqlForFetchStep1 = "select E." + TopiaEntity.PROPERTY_TOPIA_ID + " FROM " + Email.class.getName() + " E "
+ + "WHERE E." + TopiaEntity.PROPERTY_TOPIA_ID + " IN ("
+ + "select E." + TopiaEntity.PROPERTY_TOPIA_ID + " FROM " + Email.class.getName() + " E "
+ + query.toString() + ") ";
+
+ if (searchFilter.isAddGroupDemands()) {
+ hqlForFetchStep1 += "OR E." + TopiaEntity.PROPERTY_TOPIA_ID + " IN ("
+ + "select E2." + TopiaEntity.PROPERTY_TOPIA_ID + " FROM " + Email.class.getName() + " E "
+ + "LEFT OUTER JOIN E." + Email.PROPERTY_EMAIL_GROUP + " AS G "
+ + "LEFT OUTER JOIN G." + EmailGroup.PROPERTY_EMAIL + " AS E2 "
+ + query.toString() + ")";
+ }
+
String hqlForFetchStep2 = "select distinct E FROM " + Email.class.getName() + " E " + addAllFecthes(
Email.PROPERTY_PRIORITY,
Email.PROPERTY_DEMAND_TYPE,
@@ -987,7 +999,9 @@
// TODO echatellier 20140918 : on ajoute null dans tous les cas car les requetes precendente
// sont trop lente juste pour savoir si on a vraiment besoin de savoir si l'on doit vraiment
// avoir des valeurs nulles
- result.add(null);
+ if (!result.contains("")) {
+ result.add(null);
+ }
return result;
}
1
0
r638 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: content/print content/reply content/search content/transmit util
by kmorin@users.forge.codelutin.com 24 Sep '14
by kmorin@users.forge.codelutin.com 24 Sep '14
24 Sep '14
Author: kmorin
Date: 2014-09-24 10:31:35 +0200 (Wed, 24 Sep 2014)
New Revision: 638
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/638
Log:
- correction des fen?\195?\170tres qui s'affichent par dessus l'application quand on quitte une frame modale
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java
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/SearchToGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/transmit/MailFolderChooserUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-09-23 19:21:15 UTC (rev 637)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-09-24 08:31:35 UTC (rev 638)
@@ -24,6 +24,7 @@
* #L%
*/
+import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@@ -150,6 +151,11 @@
return ui.getAttachmentPanel();
}
+ @Override
+ public Component getTopestUI() {
+ return getUI();
+ }
+
public void print() {
Multimap<DemandeUIModel, AttachmentFile> attachmentToPrints = HashMultimap.create();
attachmentToPrints.putAll(getModel().getDemand(), getModel().getAttachmentsToPrint());
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-23 19:21:15 UTC (rev 637)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-09-24 08:31:35 UTC (rev 638)
@@ -219,6 +219,11 @@
return getUI().getMessage();
}
+ @Override
+ public Component getTopestUI() {
+ return getUI();
+ }
+
public void removeAttachment(ReplyAttachmentModel attachment) {
ReplyFormUIModel model = getModel();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-09-23 19:21:15 UTC (rev 637)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-09-24 08:31:35 UTC (rev 638)
@@ -313,6 +313,11 @@
closeFrame();
}
+ @Override
+ public Component getTopestUI() {
+ return getUI();
+ }
+
public void group(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
group();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/transmit/MailFolderChooserUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/transmit/MailFolderChooserUIHandler.java 2014-09-23 19:21:15 UTC (rev 637)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/transmit/MailFolderChooserUIHandler.java 2014-09-24 08:31:35 UTC (rev 638)
@@ -24,6 +24,7 @@
* #L%
*/
+import java.awt.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
@@ -136,4 +137,8 @@
return ui.getNavigationTree();
}
+ @Override
+ public Component getTopestUI() {
+ return getUI();
+ }
}
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-23 19:21:15 UTC (rev 637)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-09-24 08:31:35 UTC (rev 638)
@@ -320,6 +320,7 @@
public void windowClosed(WindowEvent e) {
parentContainer.setEnabled(true);
parentContainer.setFocusableWindowState(true);
+ parentContainer.toFront();
Component ui = (Component) e.getSource();
if (log.isDebugEnabled()) {
1
0
r637 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search
by kmorin@users.forge.codelutin.com 23 Sep '14
by kmorin@users.forge.codelutin.com 23 Sep '14
23 Sep '14
Author: kmorin
Date: 2014-09-23 21:21:15 +0200 (Tue, 23 Sep 2014)
New Revision: 637
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/637
Log:
- relance la recherche quand on revient d'un ?\195?\169l?\195?\169ment
- am?\195?\169lioration de la r?\195?\169cup?\195?\169ration des valeurs distinctes pour le filtre
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.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/search/SearchUIHandler.java
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-23 16:30:37 UTC (rev 636)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-09-23 19:21:15 UTC (rev 637)
@@ -910,22 +910,29 @@
return result;
}
- public Set<Object> getDistinctValues(MailFolder folder, String property, String condition) {
+ public Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition) {
Map<String, Object> args = new HashMap<>();
String folderAndStatusCondition = " WHERE email." + Email.PROPERTY_MAIL_FOLDER + " = :folder" +
" AND email." + Email.PROPERTY_DEMAND_STATUS + " != :archiveStatus";
args.put("folder", folder);
args.put("archiveStatus", DemandStatus.ARCHIVED);
- String query = "SELECT DISTINCT " + property +
+ String propertyList = StringUtils.join(properties, ", ");
+ String query = "SELECT DISTINCT " + propertyList +
" FROM " + Email.class.getName() + " AS email";
- if (property.startsWith("client.")) {
- query += " LEFT OUTER JOIN email." + Email.PROPERTY_CLIENT + " AS client";
-
- } else if (property.startsWith("rangeRow.")) {
- query += " LEFT OUTER JOIN email." + Email.PROPERTY_RANGE_ROW + " AS rangeRow";
+ for (String property : properties) {
+ if (property.startsWith("client.")) {
+ query += " LEFT OUTER JOIN email." + Email.PROPERTY_CLIENT + " AS client";
+ break;
+ }
}
+ for (String property : properties) {
+ if (property.startsWith("rangeRow.")) {
+ query += " LEFT OUTER JOIN email." + Email.PROPERTY_RANGE_ROW + " AS rangeRow";
+ break;
+ }
+ }
query += folderAndStatusCondition;
if (StringUtils.isNotBlank(condition)) {
@@ -933,8 +940,19 @@
}
List<Object> queryResults = findAll(query, args);
- Set<Object> result = new HashSet<>(queryResults);
+ Set<Object> result = new HashSet<>();
+ if (properties.length == 1) {
+ result.addAll(queryResults);
+ } else {
+ for (Object o1 : queryResults) {
+ Object[] objects = (Object[]) o1;
+ for (Object o2 : objects) {
+ result.add(o2);
+ }
+ }
+ }
+
// check if the property is sometimes null
/*if (property.startsWith("rangeRow.")) {
query = "FROM " + Email.class.getName() + " AS email" +
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-09-23 16:30:37 UTC (rev 636)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-09-23 19:21:15 UTC (rev 637)
@@ -73,7 +73,7 @@
void transmitPendingDemandsToEdi();
- Set<Object> getDistinctValues(MailFolder folder, String property, String condition);
+ Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition);
PaginationResult<Email> getEmailForFolder(MailFolder folder, FaxToMailUser currentUser, EmailFilter filter, PaginationParameter page);
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-23 16:30:37 UTC (rev 636)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-09-23 19:21:15 UTC (rev 637)
@@ -614,11 +614,11 @@
}
@Override
- public Set<Object> getDistinctValues(MailFolder folder, String property, String condition) {
+ public Set<Object> getDistinctValues(MailFolder folder, String[] properties, String condition) {
Set<Object> result = null;
if (folder.isFolderReadable()) {
EmailTopiaDao dao = getPersistenceContext().getEmailDao();
- result = dao.getDistinctValues(folder, property, condition);
+ result = dao.getDistinctValues(folder, properties, condition);
}
return result;
}
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-23 16:30:37 UTC (rev 636)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListTableFilter.java 2014-09-23 19:21:15 UTC (rev 637)
@@ -222,11 +222,9 @@
properties = new String[] { "email." + property };
}
- for (String prop : properties) {
- result.addAll(emailService.getDistinctValues(selectedFolder,
- prop,
- condition));
- }
+ result.addAll(emailService.getDistinctValues(selectedFolder,
+ properties,
+ condition));
if (Email.PROPERTY_RECEPTION_DATE.equals(property)) {
Set<Object> filteredDates = new HashSet<>();
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-23 16:30:37 UTC (rev 636)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-09-23 19:21:15 UTC (rev 637)
@@ -37,11 +37,13 @@
import javax.swing.ListSelectionModel;
import com.franciaflex.faxtomail.persistence.entities.SearchFilter;
+import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
+import org.nuiton.jaxx.application.swing.action.ApplicationActionEngine;
import org.nuiton.jaxx.application.swing.table.AbstractApplicationTableModel;
import org.nuiton.jaxx.application.swing.util.CloseableUI;
@@ -213,15 +215,20 @@
}
protected void runSearchAction() {
+ FaxToMailUIContext context = getContext();
try {
SearchAction searchAction = new SearchAction(this);
- getContext().getActionEngine().runAction(searchAction);
+ if (context.isActionInProgress(null)) {
+ context.getActionEngine().runFullInternalAction(searchAction);
+ } else {
+ context.getActionEngine().runAction(searchAction);
+ }
} catch (Exception e) {
if (log.isErrorEnabled()) {
log.error("error while searching", e);
}
- getContext().getErrorHelper().showErrorDialog(t("faxtomail.search.action.error"));
+ context.getErrorHelper().showErrorDialog(t("faxtomail.search.action.error"));
}
}
1
0