This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit f6f5d22dcb2b67cf77a7ac7dc2e5404da9e95c5a Author: Kevin Morin <morin@codelutin.com> Date: Mon Apr 18 14:54:06 2016 +0200 prise en compte des demandes creees manuellement (fixes #8258) --- .../demande/actions/SaveAndOpenReplyFormAction.java | 3 +-- .../ui/swing/content/reply/ReplyFormUIHandler.java | 20 ++++++++++++-------- .../i18n/faxtomail-ui-swing_fr_FR.properties | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/SaveAndOpenReplyFormAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/SaveAndOpenReplyFormAction.java index 2c94e47..13d52b4 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/SaveAndOpenReplyFormAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/SaveAndOpenReplyFormAction.java @@ -65,7 +65,7 @@ public class SaveAndOpenReplyFormAction extends SaveAndOpenModalFrameAction<Repl DemandeUIModel currentDemand = getModel(); SigningForDomain signingForDomain = null; - if (!currentDemand.isFax()) { + if (!currentDemand.isFax() && currentDemand.getRecipient() != null) { signingForDomain = getContext().newServiceContext().getConfigurationService().getSigningForEmailAddress(currentDemand.getRecipient()).orNull(); } model.setSigning(signingForDomain); @@ -74,7 +74,6 @@ public class SaveAndOpenReplyFormAction extends SaveAndOpenModalFrameAction<Repl String sender = JAXXUtil.getStringValue(currentDemand.getSender()); if (currentDemand.isFax()) { -// MailFolder selectedFolder = getContext().getCurrentMailFolder(); sender = FaxToMailServiceUtils.addFaxDomainToFaxNumber(sender, currentDemand.getMailFolder()); } model.setTo(sender); diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java index 192c948..cd29d89 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java @@ -87,12 +87,12 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo private static final String CONTENT_SEPARATOR = "<br/><br/>----------------<br/><br/>"; + // classe à mettre sur le div de la signature pour pouvoir la remplacer private String signingClass; protected AddAttachmentToReplyAction addAttachmentToReplyAction; protected SenderChangedAction senderChangedAction; - @Override public void beforeInit(ReplyFormUI ui) { super.beforeInit(ui); @@ -131,6 +131,7 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo List<DemandeUIModel> models = new ArrayList<>(); models.addAll(demand.getGroupedDemandes()); + // on crée les pj disponibles (versions éditées et non éditées) for (DemandeUIModel demandeUIModel : models) { // remove newline character (cf #6960) String prefix = StringUtils.remove(demandeUIModel.getTitle(), '\n'); @@ -165,14 +166,14 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo // sender combo MailFolder folder = demand.getMailFolder(); List<String> folderReplyAdresses = new ArrayList<>(); - List<String> folderReplyDomains = new ArrayList<>(); +// List<String> folderReplyDomains = new ArrayList<>(); while (folder != null) { folderReplyAdresses.addAll(folder.getReplyAddresses()); - folderReplyDomains.addAll(folder.getReplyDomains()); +// folderReplyDomains.addAll(folder.getReplyDomains()); folder = folder.getParent(); } - model.setSenderAllowedDomains(folderReplyDomains); - +// model.setSenderAllowedDomains(folderReplyDomains); + List<String> replyToAddresses = Lists.newArrayList(); String selectedItem = null; if (!demand.isFax() && recipient != null) { @@ -190,10 +191,11 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo model.setSenderAllowedAddresses(replyToAddresses); + // contacts initBeanFilterableComboBox(ui.getContactField(), getContext().getContactCache(), null); + // signatures signingClass = SIGNING_CLASS_PREFIX + new Date().getTime(); - signing = getSigningParagraph(createSigning(recipient)); } else { @@ -555,8 +557,10 @@ public class ReplyFormUIHandler extends AbstractFaxToMailUIHandler<ReplyFormUIMo protected String createSigning(String from) { FaxToMailUser currentUser = getContext().getCurrentUser(); - String signing = currentUser.getFirstName() + " " + currentUser.getLastName() - + "<br/>" + from + "<br/>"; + String signing = currentUser.getFirstName() + " " + currentUser.getLastName() + "<br/>"; + if (from != null) { + signing += from + "<br/>"; + } SigningForDomain signingForDomain = getModel().getSigning(); if (signingForDomain != null) { diff --git a/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties b/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties index f469c11..24c8a37 100644 --- a/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties +++ b/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties @@ -28,6 +28,7 @@ faxtomail.action.reloadFaxToMail=Recharger FaxToMail faxtomail.action.reply.tip=Envoyer la réponse faxtomail.action.save.tip=Enregistrer faxtomail.action.search.tip=Rechercher +faxtomail.action.senderChanged.tip=Changement d'expéditeur 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é -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.