Author: kmorin Date: 2014-05-12 22:23:24 +0200 (Mon, 12 May 2014) New Revision: 68 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/68 Log: - add column to display the replies - merge the search fields reference and command number Added: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.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/EmailTopiaDao.java trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java 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/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/SearchToGroupUIHandler.java 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/SearchUIHandler.java 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 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-12 20:23:24 UTC (rev 68) @@ -41,7 +41,7 @@ public static final String PROPERTY_SENDER = "sender"; //public static final String PROPERTY_RECIPIENT = "recipient"; - public static final String PROPERTY_SUBJECT = "subject"; + public static final String PROPERTY_DEMAND_OBJECT = "demandObject"; public static final String PROPERTY_MESSAGE = "message"; public static final String PROPERTY_BODY = "body"; public static final String PROPERTY_ETAT_ATTENTE = "etatAttente"; @@ -53,7 +53,7 @@ public static final String PROPERTY_EDI_CODE_NUMBER = "ediCodeNumber"; public static final String PROPERTY_PROJECT_REFERENCE = "projectReference"; public static final String PROPERTY_LOCAL_REFERENCE = "localReference"; - public static final String PROPERTY_COMMAND_NUMBER = "commandNumber"; +// public static final String PROPERTY_COMMAND_NUMBER = "commandNumber"; public static final String PROPERTY_MODIFIED_BY = "modifiedBy"; public static final String PROPERTY_PRINTING_BY = "printingBy"; public static final String PROPERTY_ARCHIVED_BY = "archivedBy"; @@ -74,7 +74,7 @@ //protected String recipient; - protected String subject; + protected String demandObject; protected String message; @@ -92,7 +92,7 @@ protected String ediCodeNumber; - protected String commandNumber; +// protected String commandNumber; protected String projectReference; @@ -150,14 +150,14 @@ firePropertyChange(PROPERTY_RECIPIENT, oldValue, recipient); }*/ - public String getSubject() { - return subject; + public String getDemandObject() { + return demandObject; } - public void setSubject(String subject) { - String oldValue = this.subject; - this.subject = subject; - firePropertyChange(PROPERTY_SUBJECT, oldValue, subject); + public void setDemandObject(String demandObject) { + String oldValue = this.demandObject; + this.demandObject = demandObject; + firePropertyChange(PROPERTY_DEMAND_OBJECT, oldValue, demandObject); } public List<EtatAttente> getEtatAttente() { @@ -335,16 +335,16 @@ firePropertyChange(PROPERTY_GAMME, null, gamme); } - public String getCommandNumber() { - return commandNumber; - } +// public String getCommandNumber() { +// return commandNumber; +// } +// +// public void setCommandNumber(String commandNumber) { +// String oldValue = this.commandNumber; +// this.commandNumber = commandNumber; +// firePropertyChange(PROPERTY_COMMAND_NUMBER, oldValue, commandNumber); +// } - public void setCommandNumber(String commandNumber) { - String oldValue = this.commandNumber; - this.commandNumber = commandNumber; - firePropertyChange(PROPERTY_COMMAND_NUMBER, oldValue, commandNumber); - } - public String getLocalReference() { return localReference; } 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-12 20:23:24 UTC (rev 68) @@ -204,9 +204,9 @@ } // email subject - if (StringUtils.isNotBlank(emailFilter.getSubject())) { - query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_SUBJECT + ")"); - args.put(EmailFilter.PROPERTY_SUBJECT, "%" + emailFilter.getSubject() + "%"); + if (StringUtils.isNotBlank(emailFilter.getDemandObject())) { + query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_DEMAND_OBJECT + ")"); + args.put(EmailFilter.PROPERTY_DEMAND_OBJECT, "%" + emailFilter.getDemandObject() + "%"); } // email demand type @@ -233,12 +233,6 @@ args.put(EmailFilter.PROPERTY_PROJECT_REFERENCE, "%" + emailFilter.getProjectReference() + "%"); } - // email localReference - if (StringUtils.isNotBlank(emailFilter.getLocalReference())) { - query.append(" AND lower(E." + Email.PROPERTY_COMPANY_REFERENCE + ") LIKE lower(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + ")"); - args.put(EmailFilter.PROPERTY_LOCAL_REFERENCE, "%" + emailFilter.getLocalReference() + "%"); - } - // email priority List<Priority> priority = emailFilter.getPriority(); if (CollectionUtils.isNotEmpty(priority)) { @@ -306,11 +300,12 @@ // args.put(EmailFilter.PROPERTY_BODY, "%" + emailFilter.getBody() + "%"); // } - // email commandNumber - if (StringUtils.isNotBlank(emailFilter.getCommandNumber())) { - 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(:" + EmailFilter.PROPERTY_COMMAND_NUMBER + ")"); - args.put(EmailFilter.PROPERTY_COMMAND_NUMBER, "%" + emailFilter.getCommandNumber() + "%"); + // email localReference + if (StringUtils.isNotBlank(emailFilter.getLocalReference())) { + 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(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + "))"); + query.append(" OR lower(E." + Email.PROPERTY_COMPANY_REFERENCE + ") LIKE lower(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + ")"); + args.put(EmailFilter.PROPERTY_LOCAL_REFERENCE, "%" + emailFilter.getLocalReference() + "%"); query.append(")"); } Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java =================================================================== --- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java 2014-05-12 20:23:24 UTC (rev 68) @@ -125,6 +125,7 @@ }); registerMultiJXPathDecorator(HasLabel.class, "${label}$s", SEPARATOR, " - "); registerMultiJXPathDecorator(Attachment.class, "${originalFile}$s", SEPARATOR, " - "); + registerMultiJXPathDecorator(Reply.class, "${sentDate}$s#${subject}$s", SEPARATOR, " - "); registerMultiJXPathDecorator(FaxToMailUser.class, "${trigraph}$s#${firstName}$s#${lastName}$s", SEPARATOR, " "); } }; Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java =================================================================== --- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-05-12 20:23:24 UTC (rev 68) @@ -247,19 +247,20 @@ // companies CompanyTopiaDao companyTopiaDao = getPersistenceContext().getCompanyDao(); ConfigurationTopiaDao configurationTopiaDao = getPersistenceContext().getConfigurationDao(); - Configuration configuration = configurationTopiaDao.create(Configuration.PROPERTY_TABLE_COLUMNS, - Email.PROPERTY_PRIORITY + "," + - Email.PROPERTY_DEMAND_TYPE + "," + - Email.PROPERTY_OBJECT + "," + - "clientCode," + - Email.PROPERTY_SENDER + "," + - Email.PROPERTY_RECEPTION_DATE + "," + - Email.PROPERTY_DEMAND_STATUS + "," + - "pfNb,savNb," + - Email.PROPERTY_TAKEN_BY + "," + - "lastAttachmentOpeningUser," + - Email.PROPERTY_ATTACHMENT - ); +// Configuration configuration = configurationTopiaDao.create(Configuration.PROPERTY_TABLE_COLUMNS, +// Email.PROPERTY_PRIORITY + "," + +// Email.PROPERTY_DEMAND_TYPE + "," + +// Email.PROPERTY_OBJECT + "," + +// "clientCode," + +// Email.PROPERTY_SENDER + "," + +// Email.PROPERTY_RECEPTION_DATE + "," + +// Email.PROPERTY_DEMAND_STATUS + "," + +// "pfNb,savNb," + +// Email.PROPERTY_TAKEN_BY + "," + +// "lastAttachmentOpeningUser," + +// Email.PROPERTY_ATTACHMENT +// ); + Configuration configuration = configurationTopiaDao.create(); Company fx = companyTopiaDao.create(Company.PROPERTY_NAME, "Franciaflex", Company.PROPERTY_CONFIGURATION, configuration, Company.PROPERTY_MAIL_FOLDER, folders.values()); Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java =================================================================== --- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 20:23:24 UTC (rev 68) @@ -76,7 +76,7 @@ Assert.assertEquals(18, emails.size()); // client code filter + subject filter - filter.setSubject("ARENO"); + filter.setDemandObject("ARENO"); emails = service.search(filter); Assert.assertEquals(2, emails.size()); @@ -102,7 +102,7 @@ filter.setDemandStatus(Collections.singletonList(DemandStatus.ARCHIVED)); filter.setGamme(Collections.singletonList(referentielService.getAllRange().get(0))); filter.setPriority(referentielService.getAllPriority()); - filter.setCommandNumber("test"); +// filter.setCommandNumber("test"); filter.setEtatAttente(Collections.singletonList(referentielService.getAllEtatAttente().get(0))); filter.setEdiCodeNumber("test"); filter.setLocalReference("test"); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-05-12 20:23:24 UTC (rev 68) @@ -53,11 +53,16 @@ List<Email> emails = getContext().getEmailService().search(emailFilter); List<DemandeUIModel> result = new ArrayList<>(); - for (Email mail : emails) { + for (Email email : emails) { DemandeUIModel demand = new DemandeUIModel(); - demand.fromEntity(mail); + demand.fromEntity(email); demand.setValid(handler.isDemandeValid(demand)); result.add(demand); + + if (model.isShowGroupesDemandsInResults()) { + demand.setGroupedDemandes(email.getEmailGroup()); + result.addAll(demand.getGroupedDemandes()); + } } model.setResults(result); } 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -275,7 +275,7 @@ @Override protected String[] getEditableTableProperties() { - return new String[] { Email.PROPERTY_PRIORITY, Email.PROPERTY_ATTACHMENT }; + return new String[] { Email.PROPERTY_PRIORITY, Email.PROPERTY_ATTACHMENT, Email.PROPERTY_REPLIES }; } @Override Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-12 20:23:24 UTC (rev 68) @@ -74,7 +74,8 @@ </BeanValidator> <JToolBar id='topToolBar'> - <ButtonDemandReplies id="demandRepliesButton"/> + <ButtonDemandReplies id="demandRepliesButton" + constructorParams="model"/> <ButtonHistory id="historyButton"/> <ButtonAttachment id="attachmentsButton" constructorParams="model"/> 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-12 20:23:24 UTC (rev 68) @@ -683,6 +683,12 @@ return groupedDemandes.size(); } + public void addAllReplies(Collection<Reply> replies) { + Object oldValue = new ArrayList<Reply>(getReplies()); + editObject.addAllReplies(replies); + firePropertyChange(Email.PROPERTY_REPLIES, oldValue, getAttachment()); + } + public void addReplies(Reply reply) { Object oldValue = null; if (getReplies() != null) { @@ -692,6 +698,12 @@ firePropertyChange(Email.PROPERTY_REPLIES, null, getReplies()); } + public void removeReply(Reply reply) { + Object oldValue = new ArrayList<Reply>(getReplies()); + editObject.removeReplies(reply); + firePropertyChange(Email.PROPERTY_REPLIES, oldValue, getReplies()); + } + public void setReplies(Collection<Reply> replies) { Object oldValue = null; if (getReplies() != null) { Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-05-12 20:23:24 UTC (rev 68) @@ -48,7 +48,6 @@ #printButton { text: "faxtomail.demande.print.button.label"; actionIcon: print; - enabled: { model.getCurrentDemand().isValid() && model.getCurrentDemand().isEditable() }; } #archiveButton { @@ -59,11 +58,11 @@ #replyButton { text: "faxtomail.demande.reply.button.label"; actionIcon: reply; - enabled: { model.getCurrentDemand().isEditable() }; + enabled: { model.getCurrentDemand().isEditable() || model.getCurrentDemand().getArchiveDate() != null }; } #groupButton { text: "faxtomail.demande.group.button.label"; actionIcon: group; - enabled: { model.getCurrentDemand().isEditable() }; + enabled: { model.getCurrentDemand().isEditable() || model.getCurrentDemand().getArchiveDate() != null }; } \ No newline at end of file Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -38,6 +38,9 @@ import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler; import com.franciaflex.faxtomail.ui.swing.util.CloseableUI; import jaxx.runtime.validator.swing.SwingValidator; +import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler; +import org.nuiton.jaxx.application.swing.ApplicationUI; +import org.nuiton.jaxx.application.swing.tab.CustomTab; import org.nuiton.jaxx.application.swing.tab.DelegateTabContainerHandler; import org.nuiton.jaxx.application.swing.tab.TabContainerHandler; import org.nuiton.jaxx.application.swing.tab.TabContentModel; @@ -149,19 +152,33 @@ */ @Override public TabHandler getTabHandler(int index) { - TabHandler tabHandler = delegateTabHandler.getTabHandler(index); + TabHandler tabHandler = null; + JTabbedPane tabPanel = getTabPanel(); + if (index >= 0 && index < tabPanel.getTabCount()) { + Component tab = tabPanel.getComponentAt(index); + if (ApplicationUI.class.isInstance(tab)) { + ApplicationUI tuttiTab = (ApplicationUI) tabPanel.getComponentAt(index); + AbstractApplicationUIHandler handler = tuttiTab.getHandler(); + if (TabHandler.class.isInstance(handler)) { + tabHandler = (TabHandler) handler; + } + } + } return tabHandler; } @Override public void setCustomTab(int index, TabContentModel model) { - delegateTabHandler.setCustomTab(index, model); + JTabbedPane tabPanel = getTabPanel(); + tabPanel.setTabComponentAt(index, new CustomTab(model, this)); } @Override public boolean removeTab(int i) { - boolean remove = delegateTabHandler.removeTab(i); + TabHandler tabHandler = getTabHandler(i); + boolean remove = tabHandler.onRemoveTab(); if (remove) { + getTabPanel().removeTabAt(i); getModel().removeDemand(i); } return remove; @@ -170,10 +187,7 @@ @Override protected void initUI(DemandesUI ui) { super.initUI(ui); - - JTabbedPane tabPanel = getTabPanel(); - delegateTabHandler = new DelegateTabContainerHandler(tabPanel, this); - delegateTabHandler.init(); + init(); } @Override @@ -183,12 +197,37 @@ @Override public void init() { - delegateTabHandler.init(); + getTabPanel().setModel(new DefaultSingleSelectionModel() { + + private static final long serialVersionUID = 1L; + + @Override + public void setSelectedIndex(int index) { + int currentIndex = getTabPanel().getSelectedIndex(); + boolean mustChangeTab = onTabChanged(currentIndex, index); + + if (mustChangeTab) { + super.setSelectedIndex(index); + } + } + + }); } @Override public boolean onTabChanged(int currentIndex, int newIndex) { - boolean change = delegateTabHandler.onTabChanged(currentIndex, newIndex); + boolean change = true; + if (currentIndex != newIndex) { + TabHandler handler = getTabHandler(currentIndex); + if (handler != null) { + change = handler.onHideTab(currentIndex, newIndex); + } + + handler = getTabHandler(newIndex); + if (handler != null) { + handler.onShowTab(currentIndex, newIndex); + } + } if (change) { getModel().setCurrentIndex(newIndex); } @@ -265,13 +304,16 @@ ReplyFormUI dialogContent = new ReplyFormUI(ui); ReplyFormUIModel model = dialogContent.getModel(); + DemandeUIModel currentDemand = getModel().getCurrentDemand(); + model.setOriginalDemand(currentDemand); + + model.setTo(currentDemand.getSender()); DemandeUI demandeUI = (DemandeUI) getTabPanel().getSelectedComponent(); - model.setTo(demandeUI.getModel().getSender()); SaveAndOpenDialogAction action = new SaveAndOpenDialogAction(demandeUI.getHandler(), false, dialogContent, - t("faxtomail.reply.title", demandeUI.getModel().getObject()), + t("faxtomail.reply.title", currentDemand.getObject()), new Dimension(800, 600)); getContext().getActionFactory().createUIAction(null, action).actionPerformed(null); 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -24,6 +24,9 @@ * #L% */ +import com.franciaflex.faxtomail.persistence.entities.Email; +import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; +import com.franciaflex.faxtomail.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction; import com.franciaflex.faxtomail.ui.swing.content.MainUI; @@ -37,6 +40,7 @@ import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.decorator.HighlighterFactory; +import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler; import javax.swing.*; import javax.swing.event.TableModelEvent; @@ -52,6 +56,8 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import static org.nuiton.i18n.I18n.t; + /** * @author Kevin Morin (Code Lutin) * @since x.x @@ -149,6 +155,42 @@ demande.setCloseable(true); // context.setCurrentEmail(demande); // context.getActionEngine().runAction(new ShowDemandeAction(context.getMainUI().getHandler())); + + FaxToMailUser takenBy = demande.getTakenBy(); + FaxToMailUser currentUser = getContext().getCurrentUser(); + + //TODO kmorin 20140512 put this in an action + if (demande.getArchiveDate() != null) { + demande.setEditable(false); + + } else if (takenBy != null && !currentUser.equals(takenBy)) { + String htmlMessage = String.format( + AbstractApplicationUIHandler.CONFIRMATION_FORMAT, + t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)), + t("faxtomail.alert.alreadyTakenBy.help")); + + int result = JOptionPane.showConfirmDialog(getTopestUI(), + htmlMessage, + t("faxtomail.alert.alreadyTakenBy.title"), + JOptionPane.YES_NO_CANCEL_OPTION, + JOptionPane.QUESTION_MESSAGE); + + switch (result) { + case JOptionPane.CANCEL_OPTION: + return; + + case JOptionPane.NO_OPTION: + demande.setEditable(false); + break; + + case JOptionPane.YES_OPTION: + Email email = getContext().getEmailService().takeEmail(demande.getTopiaId(), currentUser); + demande.fromEntity(email); + demande.setEditable(true); + break; + } + } + MainUIHandler mainUIHandler = context.getMainUI().getHandler(); DemandesUI parentContainer = (DemandesUI) mainUIHandler.getCurrentBody(); parentContainer.getModel().addDemand(demande); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-12 20:23:24 UTC (rev 68) @@ -24,15 +24,20 @@ * #L% */ +import com.franciaflex.faxtomail.persistence.entities.Attachment; import com.franciaflex.faxtomail.persistence.entities.Email; +import com.franciaflex.faxtomail.persistence.entities.Reply; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; +import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentModelAware; import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupUI; import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupButton; +import org.apache.commons.collections4.CollectionUtils; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.Collection; +import java.util.List; import static org.nuiton.i18n.I18n.t; @@ -44,23 +49,55 @@ */ public class ButtonDemandReplies extends AbstractToolbarPopupButton<DemandRepliesUI> { - public ButtonDemandReplies() { +// protected DemandeUIModel currentDemand; + + protected String textKey; + + private PropertyChangeListener listener = new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + Collection<Reply> replies = (Collection<Reply>) evt.getNewValue(); + setText(getButtonText(replies)); +// +// if (currentDemand != null) { +// List<Reply> oldValue = (List<Reply>) evt.getOldValue(); +// Collection<Reply> toAdd = CollectionUtils.subtract(replies, oldValue); +// currentDemand.addAllReplies(toAdd); +// +// Collection<Reply> toRemove = CollectionUtils.subtract(oldValue, replies); +// for (Reply reply : toRemove) { +// currentDemand.removeReply(reply); +// } +// } + } + }; + + public ButtonDemandReplies(DemandeUIModel model) { + this("faxtomail.demandReplies.text", model); + } + + public ButtonDemandReplies(String textKey, DemandeUIModel model) { + this.textKey = textKey; setToolTipText(t("faxtomail.demandReplies.action.tip")); - int replyNb = popup.getModel().sizeReplies(); - setText(t("faxtomail.demandReplies.text", replyNb)); + init(model); + } - popup.getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - Collection<String> replies = (Collection<String>) evt.getNewValue(); - if (replies != null) { - int size = replies.size(); - setText(t("faxtomail.demandReplies.text", size)); - } - } - }); + public String getButtonText(Collection<Reply> replies) { + int attachmentNb = CollectionUtils.size(replies); + return t(textKey, attachmentNb); } + public void init(DemandeUIModel model) { + if (popup.getModel() != null) { + popup.getModel().removePropertyChangeListener(Email.PROPERTY_REPLIES, listener); + } + popup.setModel(model); + if (model != null) { + popup.getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, listener); + setText(getButtonText(model != null ? model.getReplies() : null)); + } + } + @Override protected String getActionIcon() { return "reply"; @@ -71,4 +108,8 @@ return new DemandRepliesUI(FaxToMailUIContext.getApplicationContext()); } + public DemandeUIModel getBean() { + return popup.getModel(); + } + } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css 2014-05-12 20:23:24 UTC (rev 68) @@ -31,12 +31,12 @@ #noReplyLabel { text: "faxtomail.demandReplies.empty"; - visible: { model.getReplies().isEmpty() }; + visible: { getModel().getReplies().isEmpty() }; border: { javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3) }; font-style: italic; } #replies { editable: true; - visible: { !model.getReplies().isEmpty() }; + visible: { !getModel().getReplies().isEmpty() }; } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx 2014-05-12 20:23:24 UTC (rev 68) @@ -33,7 +33,7 @@ </import> <DemandeUIModel id='model' - initializer='getContextValue(DemandeUIModel.class)'/> + javaBean='null'/> <JXTitledPanel id='body'> <JScrollPane id='demandRepliesBodyScrollPane'> Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java 2014-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -77,35 +77,54 @@ private final static Log log = LogFactory.getLog(DemandRepliesUIHandler.class); - @Override - public void beforeInit(DemandRepliesUI ui) { - super.beforeInit(ui); +// @Override +// public void beforeInit(DemandRepliesUI ui) { +// super.beforeInit(ui); +// +// DemandeUIModel currentEmail = getContext().getCurrentEmail(); +// this.ui.setContextValue(currentEmail); +// } - DemandeUIModel currentEmail = getContext().getCurrentEmail(); - this.ui.setContextValue(currentEmail); - } - @Override public void afterInit(DemandRepliesUI ui) { super.afterInit(ui); initTable(ui.getReplies()); - getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, new PropertyChangeListener() { + final PropertyChangeListener listener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { - AbstractTableModel tableModel = (AbstractTableModel) getUI().getReplies().getModel(); - tableModel.fireTableDataChanged(); + updateTable(); } + }; + getUI().addPropertyChangeListener(DemandRepliesUI.PROPERTY_MODEL, new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + DemandeUIModel oldModel = (DemandeUIModel) evt.getOldValue(); + if (oldModel != null) { + oldModel.removePropertyChangeListener(Email.PROPERTY_REPLIES, listener); + } + DemandeUIModel newModel = (DemandeUIModel) evt.getNewValue(); + if (newModel != null) { + newModel.addPropertyChangeListener(Email.PROPERTY_REPLIES, listener); + } + updateTable(); + } }); } + protected void updateTable() { + AbstractTableModel tableModel = (AbstractTableModel) getUI().getReplies().getModel(); + tableModel.fireTableDataChanged(); + } + protected void initTable(JXTable table) { TableModel demandRepliesTableModel = new AbstractTableModel() { @Override public int getRowCount() { - return getModel().sizeReplies(); + DemandeUIModel model = getModel(); + return model == null ? 0 : model.sizeReplies(); } @Override @@ -115,7 +134,8 @@ @Override public Object getValueAt(int rowIndex, int columnIndex) { - return Iterables.get(getModel().getReplies(), rowIndex); + DemandeUIModel model = getModel(); + return model == null ? null : Iterables.get(model.getReplies(), rowIndex); } @Override Copied: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java (from rev 61, trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java) =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java (rev 0) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java 2014-05-12 20:23:24 UTC (rev 68) @@ -0,0 +1,140 @@ +package com.franciaflex.faxtomail.ui.swing.content.demande.replies; + +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * 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.Attachment; +import com.franciaflex.faxtomail.persistence.entities.HistoryType; +import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; +import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentEditorUIModel; +import com.franciaflex.faxtomail.ui.swing.content.attachment.ButtonAttachment; +import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; +import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailBeanUIModel; +import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI; +import com.google.common.base.Preconditions; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.nuiton.jaxx.application.swing.table.AbstractApplicationTableModel; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import javax.swing.event.CellEditorListener; +import javax.swing.event.ChangeEvent; +import javax.swing.table.TableCellEditor; +import java.awt.*; +import java.util.Date; +import java.util.EventObject; + +/** + * To edit attachments from a table cell. + * + * @author tchemit <chemit@codelutin.com> + * @author kmorin <morin@codelutin.com> + * @since 1.0.2 + */ +public class RepliesCellEditor extends AbstractCellEditor implements TableCellEditor { + + private static final long serialVersionUID = 1L; + + /** Logger. */ + private static final Log log = LogFactory.getLog(RepliesCellEditor.class); + + public static TableCellEditor newEditor(FaxToMailUI ui) { + + return new RepliesCellEditor(FaxToMailUIContext.getApplicationContext()); + } + + protected final ButtonDemandReplies editorButton; + + protected FaxToMailUIContext context; + + public RepliesCellEditor(FaxToMailUIContext context) { + this.context = context; + + this.editorButton = new ButtonDemandReplies("faxtomail.demandRepliesCellRenderer.text", null); + this.editorButton.setBorder(new LineBorder(Color.BLACK)); + addCellEditorListener(new CellEditorListener() { + @Override + public void editingStopped(ChangeEvent e) { + editorButton.setSelected(false); + } + + @Override + public void editingCanceled(ChangeEvent e) { + editorButton.setSelected(false); + } + }); + } + + @Override + public Component getTableCellEditorComponent(JTable table, + Object value, + boolean isSelected, + int row, + int column) { + AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel> tableModel = + (AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel>) table.getModel(); + + int modelRow = table.convertRowIndexToModel(row); + final DemandeUIModel model = (DemandeUIModel) tableModel.getEntry(modelRow); + editorButton.init(model); + + return editorButton; + } + + @Override + public boolean shouldSelectCell(EventObject anEvent) { + return true; + } + + @Override + public Object getCellEditorValue() { + + DemandeUIModel model = editorButton.getBean(); + Preconditions.checkNotNull(model, "No model found in editor."); + + Object result = model.getReplies(); + if (log.isDebugEnabled()) { + log.debug("editor value: " + result); + } + + return result; + } + + @Override + public boolean stopCellEditing() { + boolean b = super.stopCellEditing(); + if (b) { + editorButton.init(null); + } + return b; + } + + @Override + public void cancelCellEditing() { + editorButton.init(null); + super.cancelCellEditing(); + } + +} Copied: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java (from rev 61, trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellRenderer.java) =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java (rev 0) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java 2014-05-12 20:23:24 UTC (rev 68) @@ -0,0 +1,123 @@ +package com.franciaflex.faxtomail.ui.swing.content.demande.replies; + +/* + * #%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.Attachment; +import com.franciaflex.faxtomail.persistence.entities.Reply; +import jaxx.runtime.SwingUtil; +import org.apache.commons.collections.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@codelutin.com> + * @author tchemit <chemit@codelutin.com> + * @since 1.0.2 + */ +public class RepliesCellRenderer extends DefaultTableCellRenderer { + + public static final String TEXT_PATTERN = "<html><body>%s</body></html>"; + + private static final long serialVersionUID = 1L; + + private final String noneText; + + private final Decorator<Reply> decorator; + +// private Font defaulfFont; +// +// private Font selectedFont; + + public static RepliesCellRenderer newRender(Decorator<Reply> decorator) { + return new RepliesCellRenderer(decorator); + } + + protected RepliesCellRenderer(Decorator<Reply> decorator) { + setHorizontalAlignment(CENTER); + setIcon(SwingUtil.createActionIcon("reply")); + this.noneText = n("faxtomail.demandReplies.empty"); + this.decorator = decorator; + } + + @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<Reply> replies = (List<Reply>) value; + + String toolTipTextValue; + + if (CollectionUtils.isEmpty(replies)) { + + // use HTML to show the tooltip in italic + toolTipTextValue = "<i>" + t(noneText) + "</i>"; + + + } else { + + StringBuilder sb = new StringBuilder(); + for (Reply reply : replies) { + sb.append("<br/>").append(decorator.toString(reply)); + } + // use html to display the tooltip on several lines + toolTipTextValue = sb.substring(5); + } + String textValue = t("faxtomail.demandRepliesCellRenderer.text", replies != null ? replies.size() : 0); + boolean editable = table.isCellEditable(row, column); + toolTipTextValue = String.format(TEXT_PATTERN, toolTipTextValue); + setEnabled(editable); + setText(textValue); + setToolTipText(toolTipTextValue); +// setBackground(null); +// setForeground(Color.BLACK); + +// if (isSelected) { +// setFont(selectedFont); +// } else { +// setFont(defaulfFont); +// } + + return this; + } +} 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -25,27 +25,15 @@ */ import com.franciaflex.faxtomail.persistence.entities.Attachment; -import com.franciaflex.faxtomail.persistence.entities.Company; -import com.franciaflex.faxtomail.persistence.entities.EtatAttente; -import com.franciaflex.faxtomail.persistence.entities.MailFolder; import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler; import com.franciaflex.faxtomail.ui.swing.util.Cancelable; -import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil; -import com.franciaflex.faxtomail.ui.swing.util.FolderTreeNode; import jaxx.runtime.validator.swing.SwingValidator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.swing.*; -import javax.swing.event.TreeSelectionEvent; -import javax.swing.event.TreeSelectionListener; -import javax.swing.tree.DefaultMutableTreeNode; -import javax.swing.tree.DefaultTreeCellRenderer; -import java.awt.*; -import java.util.Collection; -import java.util.HashSet; -import java.util.Map; +import java.io.File; import static org.nuiton.i18n.I18n.t; @@ -69,8 +57,15 @@ attachmentPanel.add(checkBox); for (Attachment attachment : model.getAttachment()) { - checkBox = new JCheckBox(attachment.getOriginalFile().getName(), true); + File originalFile = attachment.getOriginalFile(); + checkBox = new JCheckBox(originalFile.getName(), true); attachmentPanel.add(checkBox); + + File file = attachment.getEditedFile(); + if (file != null) { + checkBox = new JCheckBox(file.getName(), true); + attachmentPanel.add(checkBox); + } } } 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -73,36 +73,67 @@ super.beforeInit(ui); ReplyFormUIModel model = new ReplyFormUIModel(); + // TODO kmorin 20140512 make it configurable model.setMaxAttachmentLength(10485760); - DemandeUIModel currentEmail = getContext().getCurrentEmail(); - model.setOriginalDemand(currentEmail); + this.ui.setContextValue(model); + } - List<DemandeUIModel> models = new ArrayList<DemandeUIModel>(); - models.add(currentEmail); - models.addAll(currentEmail.getGroupedDemandes()); + @Override + public void afterInit(ReplyFormUI replyFormUI) { + initUI(ui); - for (DemandeUIModel demandeUIModel : models) { - for (Attachment attachment : demandeUIModel.getAttachment()) { - model.addAvailableAttachment(attachment.getOriginalFile()); - File file = attachment.getEditedFile(); - if (file != null) { - model.addAvailableAttachment(file); + JEditorPane editor = ui.getMessage(); + editor.setCaretPosition(0); + + ReplyFormUIModel model = getModel(); + model.addPropertyChangeListener(ReplyFormUIModel.PROPERTY_ORIGINAL_DEMAND, new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + DemandeUIModel demand = (DemandeUIModel) evt.getNewValue(); + ReplyFormUIModel model = (ReplyFormUIModel) evt.getSource(); + + List<DemandeUIModel> models = new ArrayList<DemandeUIModel>(); + models.add(demand); + models.addAll(demand.getGroupedDemandes()); + + for (DemandeUIModel demandeUIModel : models) { + for (Attachment attachment : demandeUIModel.getAttachment()) { + model.addAvailableAttachment(attachment.getOriginalFile()); + File file = attachment.getEditedFile(); + if (file != null) { + model.addAvailableAttachment(file); + } + } } - } - } - model.setFrom(currentEmail.getRecipient()); + model.setFrom(demand.getRecipient()); - model.setSubject(t("faxtomail.reply.subject", currentEmail.getSubject())); + model.setSubject(t("faxtomail.reply.subject", demand.getSubject())); - String plainContent = JAXXUtil.getStringValue(currentEmail.getPlainContent()); - String quotedReply = t("faxtomail.reply.message", - decorate(currentEmail.getReceptionDate()), - currentEmail.getSender(), - plainContent.replaceAll("\n", "\n> ")); - model.setMessage(quotedReply); + String plainContent = JAXXUtil.getStringValue(demand.getPlainContent()); + String quotedReply = t("faxtomail.reply.message", + decorate(demand.getReceptionDate()), + demand.getSender(), + plainContent.replaceAll("\n", "\n> ")); + model.setMessage(quotedReply); + MailFolder folder = demand.getMailFolder(); + Collection<String> folderReplyAdresses; + do { + folderReplyAdresses = folder.getReplyAdresses(); + folder = folder.getParent(); + } while (CollectionUtils.isEmpty(folderReplyAdresses) && folder != null); + + List<String> replyToAddresses = Lists.newArrayList(demand.getRecipient()); + if (folderReplyAdresses != null) { + replyToAddresses.addAll(folderReplyAdresses); + } + + ui.getFromComboBox().setModel(newComboModel(replyToAddresses.toArray())); + } + }); + model.addPropertyChangeListener(ReplyFormUIModel.PROPERTY_ATTACHMENT, new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { @@ -117,33 +148,6 @@ } }); - this.ui.setContextValue(model); - } - - @Override - public void afterInit(ReplyFormUI replyFormUI) { - initUI(ui); - - JEditorPane editor = ui.getMessage(); - editor.setCaretPosition(0); - - ReplyFormUIModel model = getModel(); - - DemandeUIModel originalDemand = model.getOriginalDemand(); - MailFolder folder = originalDemand.getMailFolder(); - Collection<String> folderReplyAdresses; - do { - folderReplyAdresses = folder.getReplyAdresses(); - folder = folder.getParent(); - } while (CollectionUtils.isEmpty(folderReplyAdresses) && folder != null); - - List<String> replyToAddresses = Lists.newArrayList(originalDemand.getRecipient()); - if (folderReplyAdresses != null) { - replyToAddresses.addAll(folderReplyAdresses); - } - - ui.getFromComboBox().setModel(newComboModel(replyToAddresses.toArray())); - JComboBox addAttachmentFile = ui.getAddAttachmentFile(); addAttachmentFile.setRenderer(new DecoratorListCellRenderer(getDecorator(File.class, null))); addAttachmentFile.setEditor(new FileComboBoxEditor()); 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-12 20:23:24 UTC (rev 68) @@ -144,12 +144,12 @@ selectedItem: { model.getPrintingBy() }; } -#subjectLabel { - text: "faxtomail.demande.subject.label"; +#objectLabel { + text: "faxtomail.demande.object.label"; } -#subjectField { - text: {model.getSubject()}; +#objectField { + text: {model.getDemandObject()}; } #senderLabel { 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-12 20:23:24 UTC (rev 68) @@ -202,21 +202,20 @@ </cell> <cell> - <JLabel id='clientLabel'/> + <JLabel id='gammeLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='clientField' - onKeyReleased='handler.setText(event, "clientCode")'/> + <JComboBox id='gammeComboBox'/> </cell> </row> <row> <cell> - <JLabel id='subjectLabel'/> + <JLabel id='objectLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='subjectField' - onKeyReleased='handler.setText(event, "subject")'/> + <JTextField id='objectField' + onKeyReleased='handler.setText(event, "demandObject")'/> </cell> <cell> @@ -239,18 +238,11 @@ <cell> <JLabel id='projectReferenceLabel'/> </cell> - <cell weightx='1'> + <cell columns="3" weightx='1'> <JTextField id='projectReferenceField' onKeyReleased='handler.setText(event, "projectReference")'/> </cell> - - <cell> - <JLabel id='localReferenceLabel'/> - </cell> - <cell weightx='1'> - <JTextField id='localReferenceField' - onKeyReleased='handler.setText(event, "localReference")'/> - </cell> + </row> <row> @@ -286,10 +278,11 @@ </cell> <cell> - <JLabel id='gammeLabel'/> + <JLabel id='clientLabel'/> </cell> <cell columns='3' weightx='1'> - <JComboBox id='gammeComboBox'/> + <JTextField id='clientField' + onKeyReleased='handler.setText(event, "clientCode")'/> </cell> </row> @@ -303,11 +296,11 @@ </cell> <cell> - <JLabel id='commandNumberLabel'/> + <JLabel id='localReferenceLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='commandNumberField' - onKeyReleased='handler.setText(event, "commandNumber")'/> + <JTextField id='localReferenceField' + onKeyReleased='handler.setText(event, "localReference")'/> </cell> </row> 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -81,16 +81,16 @@ SearchUIModel searchUIModel = getContext().getSearch(); if (searchUIModel == null) { searchUIModel = new SearchUIModel(); - searchUIModel.setTakenBy(getContext().getCurrentUser()); - searchUIModel.setModifiedBy(getContext().getCurrentUser()); +// searchUIModel.setTakenBy(getContext().getCurrentUser()); +// searchUIModel.setModifiedBy(getContext().getCurrentUser()); Date now = new Date(); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, -2); Date twoMonthsAgo = cal.getTime(); - searchUIModel.setMaxModificationDate(now); - searchUIModel.setMinModificationDate(twoMonthsAgo); +// searchUIModel.setMaxModificationDate(now); +// searchUIModel.setMinModificationDate(twoMonthsAgo); searchUIModel.setMaxReceptionDate(now); searchUIModel.setMinReceptionDate(twoMonthsAgo); //searchUIModel.setMaxPrintingDate(now); @@ -151,7 +151,7 @@ referentielService.getAllRange(), model.getGamme(), EmailFilter.PROPERTY_GAMME, - true); + false); final JXTable dataTable = getUI().getDataTable(); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-12 20:23:24 UTC (rev 68) @@ -149,12 +149,12 @@ selectedItem: { model.getPrintingBy() }; } -#subjectLabel { - text: "faxtomail.demande.subject.label"; +#objectLabel { + text: "faxtomail.demande.object.label"; } -#subjectField { - text: {model.getSubject()}; +#objectField { + text: {model.getDemandObject()}; } #senderLabel { @@ -273,6 +273,10 @@ } */ +#addGroupedElementCheckbox { + text: "faxtomail.search.addGroupedElement.label"; +} + #searchButton { text: "faxtomail.search.button.label"; _applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.SearchAction.class }; 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-12 20:23:24 UTC (rev 68) @@ -213,21 +213,20 @@ </cell> <cell> - <JLabel id='clientLabel'/> + <JLabel id='gammeLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='clientField' - onKeyReleased='handler.setText(event, "clientCode")'/> + <JComboBox id='gammeComboBox'/> </cell> </row> <row> <cell> - <JLabel id='subjectLabel'/> + <JLabel id='objectLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='subjectField' - onKeyReleased='handler.setText(event, "subject")'/> + <JTextField id='objectField' + onKeyReleased='handler.setText(event, "demandObject")'/> </cell> <cell> @@ -250,18 +249,11 @@ <cell> <JLabel id='projectReferenceLabel'/> </cell> - <cell weightx='1'> + <cell columns='3' weightx='1'> <JTextField id='projectReferenceField' onKeyReleased='handler.setText(event, "projectReference")'/> </cell> - - <cell> - <JLabel id='localReferenceLabel'/> - </cell> - <cell weightx='1'> - <JTextField id='localReferenceField' - onKeyReleased='handler.setText(event, "localReference")'/> - </cell> + </row> <row> @@ -297,10 +289,11 @@ </cell> <cell> - <JLabel id='gammeLabel'/> + <JLabel id='clientLabel'/> </cell> <cell columns='3' weightx='1'> - <JComboBox id='gammeComboBox'/> + <JTextField id='clientField' + onKeyReleased='handler.setText(event, "clientCode")'/> </cell> </row> @@ -314,14 +307,21 @@ </cell> <cell> - <JLabel id='commandNumberLabel'/> + <JLabel id='localReferenceLabel'/> </cell> <cell columns='3' weightx='1'> - <JTextField id='commandNumberField' - onKeyReleased='handler.setText(event, "commandNumber")'/> + <JTextField id='localReferenceField' + onKeyReleased='handler.setText(event, "localReference")'/> </cell> </row> + <row> + <cell columns="6"> + <JCheckBox id="addGroupedElementCheckbox" + onItemStateChanged='handler.setBoolean(event, "showGroupesDemandsInResults")'/> + </cell> + </row> + </Table> </JScrollPane> 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -85,16 +85,16 @@ SearchUIModel searchUIModel = getContext().getSearch(); if (searchUIModel == null) { searchUIModel = new SearchUIModel(); - searchUIModel.setTakenBy(getContext().getCurrentUser()); - searchUIModel.setModifiedBy(getContext().getCurrentUser()); +// searchUIModel.setTakenBy(getContext().getCurrentUser()); +// searchUIModel.setModifiedBy(getContext().getCurrentUser()); Date now = new Date(); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, -2); Date twoMonthsAgo = cal.getTime(); - searchUIModel.setMaxModificationDate(now); - searchUIModel.setMinModificationDate(twoMonthsAgo); +// searchUIModel.setMaxModificationDate(now); +// searchUIModel.setMinModificationDate(twoMonthsAgo); searchUIModel.setMaxReceptionDate(now); searchUIModel.setMinReceptionDate(twoMonthsAgo); //searchUIModel.setMaxPrintingDate(now); @@ -152,7 +152,7 @@ referentielService.getAllRange(), model.getGamme(), EmailFilter.PROPERTY_GAMME, - true); + false); final JXTable dataTable = getUI().getDataTable(); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); @@ -245,7 +245,7 @@ @Override protected String[] getEditableTableProperties() { - return new String[] { Email.PROPERTY_ATTACHMENT }; + return new String[] { Email.PROPERTY_ATTACHMENT, Email.PROPERTY_REPLIES }; } } 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-12 20:23:24 UTC (rev 68) @@ -58,6 +58,7 @@ protected boolean menuEnabled; protected boolean groupEnabled; + protected boolean showGroupesDemandsInResults; protected static Binder<SearchUIModel, EmailFilter> toBeanBinder = BinderFactory.newBinder(SearchUIModel.class, @@ -91,14 +92,14 @@ return editObject.getRecipient(); }*/ - public void setSubject(String subject) { - Object oldValue = getSubject(); - editObject.setSubject(subject); - firePropertyChanged(EmailFilter.PROPERTY_SUBJECT, oldValue, subject); + public void setDemandObject(String demandObject) { + Object oldValue = getDemandObject(); + editObject.setDemandObject(demandObject); + firePropertyChanged(EmailFilter.PROPERTY_DEMAND_OBJECT, oldValue, demandObject); } - public String getSubject() { - return editObject.getSubject(); + public String getDemandObject() { + return editObject.getDemandObject(); } public void setClientCode(String clientCode) { @@ -130,17 +131,17 @@ public String getBody() { return editObject.getBody(); } - - public void setCommandNumber(String commandNumber) { - Object oldValue = getCommandNumber(); - editObject.setCommandNumber(commandNumber); - firePropertyChanged(EmailFilter.PROPERTY_COMMAND_NUMBER, oldValue, commandNumber); - } +// +// public void setCommandNumber(String commandNumber) { +// Object oldValue = getCommandNumber(); +// editObject.setCommandNumber(commandNumber); +// firePropertyChanged(EmailFilter.PROPERTY_COMMAND_NUMBER, oldValue, commandNumber); +// } +// +// public String getCommandNumber() { +// return editObject.getCommandNumber(); +// } - public String getCommandNumber() { - return editObject.getCommandNumber(); - } - public void setEtatAttente(List<EtatAttente> etatAttente) { editObject.setEtatAttente(etatAttente); firePropertyChanged(EmailFilter.PROPERTY_ETAT_ATTENTE, null, etatAttente); @@ -396,6 +397,14 @@ firePropertyChanged(PROPERTY_GROUP_ENABLED, oldValue, groupEnabled); } + public boolean isShowGroupesDemandsInResults() { + return showGroupesDemandsInResults; + } + + public void setShowGroupesDemandsInResults(boolean showGroupesDemandsInResults) { + this.showGroupesDemandsInResults = showGroupesDemandsInResults; + } + @Override protected EmailFilter newEntity() { return new EmailFilter(); 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -33,11 +33,14 @@ import com.franciaflex.faxtomail.persistence.entities.HistoryType; import com.franciaflex.faxtomail.persistence.entities.Priority; import com.franciaflex.faxtomail.persistence.entities.RangeRow; +import com.franciaflex.faxtomail.persistence.entities.Reply; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction; import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentCellEditor; import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentCellRenderer; +import com.franciaflex.faxtomail.ui.swing.content.demande.replies.RepliesCellEditor; +import com.franciaflex.faxtomail.ui.swing.content.demande.replies.RepliesCellRenderer; import com.google.common.base.Function; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; @@ -102,6 +105,7 @@ DemandeUIModel.PROPERTY_SAV_NB, Email.PROPERTY_TAKEN_BY, DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER, + Email.PROPERTY_REPLIES, Email.PROPERTY_ATTACHMENT }, ','); } @@ -120,6 +124,12 @@ AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)), DemandeTableModel.COLUMN_IDENTIFIERS.get(columnName)).setSortable(sortable); + } else if (Email.PROPERTY_REPLIES.equals(columnName)) { + addColumnToModel(columnModel, + RepliesCellEditor.newEditor(ui), + RepliesCellRenderer.newRender(getDecorator(Reply.class, null)), + 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-05-12 20:23:24 UTC (rev 68) @@ -189,9 +189,11 @@ @Override public void propertyChange(PropertyChangeEvent evt) { + Object newValue = evt.getNewValue(); + Object oldValue = evt.getOldValue(); if (!excludeProperties.contains(evt.getPropertyName()) //check that the new value and old value are not both null - && evt.getNewValue() != evt.getOldValue()) { + && newValue != oldValue) { ((AbstractFaxToMailBeanUIModel) evt.getSource()).setModify(true); } } 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-12 20:23:24 UTC (rev 68) @@ -143,6 +143,12 @@ n("faxtomail.demandeList.table.header.savNb"), n("faxtomail.demandeList.table.header.savNb.tip"))); + put(Email.PROPERTY_REPLIES, + ColumnIdentifier.<Email>newId( + Email.PROPERTY_REPLIES, + n("faxtomail.demandeList.table.header.replies"), + n("faxtomail.demandeList.table.header.replies.tip"))); + put(Email.PROPERTY_ATTACHMENT, ColumnIdentifier.<Email>newId( Email.PROPERTY_ATTACHMENT, 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-05-12 16:38:45 UTC (rev 67) +++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-12 20:23:24 UTC (rev 68) @@ -49,7 +49,7 @@ faxtomail.chooseMailFolder.message=Choisissez le dossier où transférer l'élément \: faxtomail.chooseMailFolder.title=Dossier de destination faxtomail.common.by.label=par -faxtomail.common.none.label=Aucun +faxtomail.common.none.label=Sans faxtomail.common.on.label=le faxtomail.config.application= faxtomail.config.title= @@ -63,6 +63,7 @@ faxtomail.demandReplies.empty=Aucune réponse envoyée faxtomail.demandReplies.text=Réponses (%s) faxtomail.demandReplies.title=Réponses envoyées +faxtomail.demandRepliesCellRenderer.text=(%s) faxtomail.demande.archive.button.label=Archiver faxtomail.demande.archivedBy.label=Archivé par faxtomail.demande.askCancelEditBeforeLeaving.cancelSave=L'élément n'est pas valide et ne peut être sauvé. @@ -89,7 +90,7 @@ faxtomail.demande.group.successful=Groupement réussi avec l'élément %s faxtomail.demande.lastAttachmentOpening.label=Dernière ouverture de pièce-jointe faxtomail.demande.lastModified.label=Dernière modification -faxtomail.demande.localReference.label=Notre référence +faxtomail.demande.localReference.label=Référence faxtomail.demande.mailBody.label=Corps du mail faxtomail.demande.mailFolder.label=Dossier faxtomail.demande.object.label=Objet @@ -109,8 +110,8 @@ faxtomail.demande.subject.label=Sujet \: faxtomail.demande.takenBy.label=Pris par faxtomail.demande.toRecipients.label=À \: -faxtomail.demande.transferBy.label=Transmit par -faxtomail.demande.transmit.button.label=Transmettre +faxtomail.demande.transferBy.label=Déplacé par +faxtomail.demande.transmit.button.label=Déplacer faxtomail.demandeList.action.archive=Archiver faxtomail.demandeList.action.archive.tip=Archiver l'élément faxtomail.demandeList.action.attachment=Ajouter une pièce-jointe @@ -151,6 +152,8 @@ faxtomail.demandeList.table.header.receptionDate.tip=Date de réception faxtomail.demandeList.table.header.recipient=Destinataire faxtomail.demandeList.table.header.recipient.tip=Addresse email ou numéro de fax du destinataire +faxtomail.demandeList.table.header.replies=Réponses +faxtomail.demandeList.table.header.replies.tip=Réponses envoyées faxtomail.demandeList.table.header.savNb=Qté SAV faxtomail.demandeList.table.header.savNb.tip=Quantité de SAV faxtomail.demandeList.table.header.sender=Émetteur @@ -222,22 +225,15 @@ faxtomail.reply.title=Réponse à \: %s faxtomail.search.action.gotoFolder=Aller au dossier faxtomail.search.action.gotoFolder.tip=Aller au dossier +faxtomail.search.addGroupedElement.label=Ajouter les éléments groupés aux résultats faxtomail.search.archivedBetween.label=Archivé entre le faxtomail.search.between2ndPart.label=et le faxtomail.search.button.label=Rechercher -faxtomail.search.chantier.label=Chantier -faxtomail.search.clientAccount.label=Compte client -faxtomail.search.comment.label=Commentaire -faxtomail.search.docType.label=Type document 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.ref.label=Référence faxtomail.search.resultNb=Nombre de résultats \: %s -faxtomail.search.sender.label=Émetteur -faxtomail.search.status.label=Statut -faxtomail.search.subject.label=Objet faxtomail.search.title=Recherche faxtomail.search.transferBetween.label=Transmit entre le faxtomail.searchToGroup.action.cancel=Annuler