branch feature/9526 updated (e6b98286 -> 031b8d52)
This is an automated email from the git hooks/post-receive script. New change to branch feature/9526 in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from e6b98286 refs #9526 : Pris par sur le clic droit des demandes sélectionnées - Fonctionne en multisélection new 031b8d52 refs #9526 : Pris par sur le clic droit des demandes sélectionnées Tout est ok excepté la modale trop grande... The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 031b8d5276f49d4c86d3bd44d29678c2db1ea0ea Author: Jean Couteau <jean.couteau@gmail.com> Date: Wed Dec 13 10:54:58 2017 +0100 refs #9526 : Pris par sur le clic droit des demandes sélectionnées Tout est ok excepté la modale trop grande... Summary of changes: .../demande/actions/OpenTakenByFormAction.java | 72 ++++------------------ .../i18n/faxtomail-ui-swing_fr_FR.properties | 6 -- 2 files changed, 11 insertions(+), 67 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/9526 in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 031b8d5276f49d4c86d3bd44d29678c2db1ea0ea Author: Jean Couteau <jean.couteau@gmail.com> Date: Wed Dec 13 10:54:58 2017 +0100 refs #9526 : Pris par sur le clic droit des demandes sélectionnées Tout est ok excepté la modale trop grande... --- .../demande/actions/OpenTakenByFormAction.java | 72 ++++------------------ .../i18n/faxtomail-ui-swing_fr_FR.properties | 6 -- 2 files changed, 11 insertions(+), 67 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java index eef3a1eb..933d11f7 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java @@ -38,49 +38,8 @@ public class OpenTakenByFormAction extends AbstractFaxToMailAction<DemandeListUI @Override public boolean prepareAction() throws Exception { - boolean result; - - demandsToTake = new ArrayList<>(); - List<DemandeUIModel> currentEmails = getModel().getSelectedEmails(); - - StringBuilder notTakableDemandTitles = new StringBuilder(); - for (DemandeUIModel demandeUIModel : currentEmails) { - // is the demand takable? - if (!demandeUIModel.isEditable() || - !handler.isActionEnabled(demandeUIModel, MailAction.TAKENBY)) { - notTakableDemandTitles.append("- ").append(demandeUIModel.getTitle()).append("<br/>"); - - } else { - demandsToTake.add(demandeUIModel); - } - } - - if (demandsToTake.isEmpty()) { - displayWarningMessage(t("faxtomail.alert.noDemandToTake.title"), - t("faxtomail.alert.noDemandToTake.message", notTakableDemandTitles)); - result = false; - - } else { - String message; - if (!(notTakableDemandTitles.length() == 0)) { - message = t("faxtomail.alert.takesWithNotTakableConfirmation.message", notTakableDemandTitles); - - } else if (demandsToTake.size() == 1) { - message = t("faxtomail.alert.takeConfirmation.message"); - - } else { - message = t("faxtomail.alert.takesConfirmation.message"); - } - int i = JOptionPane.showConfirmDialog(null, - message, - t("faxtomail.alert.takeConfirmation.title"), - JOptionPane.YES_NO_OPTION, - JOptionPane.QUESTION_MESSAGE); - - result = i == JOptionPane.YES_OPTION; - } - - return result; + demandsToTake = getModel().getSelectedEmails(); + return true; } @Override @@ -88,27 +47,18 @@ public class OpenTakenByFormAction extends AbstractFaxToMailAction<DemandeListUI DemandeUIModel demand = demandsToTake.get(0); - if (StringUtils.isNotBlank(demand.getTopiaId())) { - FaxToMailServiceContext serviceContext = getContext().newServiceContext(); - Email email = serviceContext.getEmailService().getFullEmailById(demand.getTopiaId(), getContext().getCurrentUser()); - demand.fromEntity(email); - - getContext().setCurrentEmail(demand); - - frameContent = new TakenByFormUI(getUI()); - TakenByFormUIModel model = frameContent.getModel(); - - model.setDemandsToTake(demandsToTake); + frameContent = new TakenByFormUI(getUI()); + TakenByFormUIModel model = frameContent.getModel(); - MailFolderService mailFolderService = getContext().newServiceContext().getMailFolderService(); + model.setDemandsToTake(demandsToTake); - MailFolder folder = demand.getMailFolder(); + MailFolder folder = demand.getMailFolder(); - List<FaxToMailUser> users = (List<FaxToMailUser>)mailFolderService.getUsersForFolder(folder.getTopiaId()); + MailFolderService mailFolderService = getContext().newServiceContext().getMailFolderService(); + List<FaxToMailUser> users = (List<FaxToMailUser>)mailFolderService.getUsersForFolder(folder.getTopiaId()); - model.setUsers(users); - frameContent.setContextValue(model); - } + model.setUsers(users); + frameContent.setContextValue(model); } @Override @@ -117,7 +67,7 @@ public class OpenTakenByFormAction extends AbstractFaxToMailAction<DemandeListUI frameContent.getTakenByComboBox().addItems(frameContent.getModel().getUsers()); frame = getHandler().openModalFrame(frameContent, t("faxtomail.takenby.modalTitle"), - new Dimension(800, 600)); + new Dimension(10, 10)); getContext().addPropertyChangeListener(FaxToMailUIContext.PROPERTY_BUSY, new PropertyChangeListener() { @Override 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 ce267f90..e5534d98 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 @@ -47,14 +47,8 @@ faxtomail.alert.groupConfirmation.message=<html>Êtes vous sûr de vouloir group faxtomail.alert.groupConfirmation.title=Confirmation du groupement faxtomail.alert.noDemandToArchive.message=<html>Les éléments suivants ne peuvent pas être archivés car ils ne sont pas valides \:<br/>%sIl n'y a pas d'autres éléments à archiver.</html> faxtomail.alert.noDemandToArchive.title=Aucun élément à archiver -faxtomail.alert.noDemandToTake.message= -faxtomail.alert.noDemandToTake.title= faxtomail.alert.noDemandToTransmit.message=<html>Les éléments suivants ne seront pas déplacés \:<br/>%sIl n'y a pas d'autres éléments à déplacer.</html> faxtomail.alert.noDemandToTransmit.title=Aucun élément à déplacer -faxtomail.alert.takeConfirmation.message= -faxtomail.alert.takeConfirmation.title= -faxtomail.alert.takesConfirmation.message= -faxtomail.alert.takesWithNotTakableConfirmation.message= faxtomail.alert.transmit.groupedDemandsInSameFolder.message=<html>L'élément %1$s a un ou plusieurs éléments groupés dans le même dossier \:<br/>%2$sVoulez-vous les déplacer aussi ?</html> faxtomail.alert.transmit.groupedDemandsInSameFolder.title=Déplacer les éléments groupés faxtomail.alert.userNotAuthorizedToReadEmail.message=Vous n'avez pas le droit de lire les éléments du dossier %s -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm