branch feature/9094_always_open_demand_in_edition updated (2d536bc -> 6b1dcef)
This is an automated email from the git hooks/post-receive script. New change to branch feature/9094_always_open_demand_in_edition in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from 2d536bc refs #9094 affichage d'un message de warning et ouverture en edition new 667f866 refs #9094 ajout de la conf mustTakeToEditDemand dans les dossiers new a026aa0 refs #9094 gestion de la conf mustTakeToEditDemand dans la partie admin new 6b1dcef refs #9094 prise en compte de la conf mustTakeToEditDemand dans la partie cliente The 3 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 6b1dcefd2a3be79c814353652716e43b1d0a38e9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:38 2017 +0100 refs #9094 prise en compte de la conf mustTakeToEditDemand dans la partie cliente commit a026aa098fc91302fcea4c8de0a14880711de1e3 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:22 2017 +0100 refs #9094 gestion de la conf mustTakeToEditDemand dans la partie admin commit 667f86636e3ed94c9335644c089beb9f59cce800 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:03 2017 +0100 refs #9094 ajout de la conf mustTakeToEditDemand dans les dossiers Summary of changes: faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 35417 -> 35474 bytes .../h2/V2_4_170316_2__add_mustTakeToEditDemand.sql | 4 ++++ .../V2_4_170316_2__add_mustTakeToEditDemand.sql | 6 ++++++ .../ui/swing/actions/ShowDemandeAction.java | 23 +++++++++++--------- .../actions/OpenGroupedDemandAction.java | 24 ++++++++++++--------- .../WEB-INF/content/admin/configuration-input.jsp | 17 +++++++++++++++ .../src/main/webapp/js/configuration.js | 4 ++++ 7 files changed, 58 insertions(+), 20 deletions(-) create mode 100644 faxtomail-service/src/main/resources/db/migration/h2/V2_4_170316_2__add_mustTakeToEditDemand.sql create mode 100644 faxtomail-service/src/main/resources/db/migration/sqlserver/V2_4_170316_2__add_mustTakeToEditDemand.sql -- 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/9094_always_open_demand_in_edition in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 667f86636e3ed94c9335644c089beb9f59cce800 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:03 2017 +0100 refs #9094 ajout de la conf mustTakeToEditDemand dans les dossiers --- faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 35417 -> 35474 bytes .../h2/V2_4_170316_2__add_mustTakeToEditDemand.sql | 4 ++++ .../V2_4_170316_2__add_mustTakeToEditDemand.sql | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/faxtomail-persistence/src/main/xmi/faxtomail.zargo b/faxtomail-persistence/src/main/xmi/faxtomail.zargo index f17aeea..320a7fe 100644 Binary files a/faxtomail-persistence/src/main/xmi/faxtomail.zargo and b/faxtomail-persistence/src/main/xmi/faxtomail.zargo differ diff --git a/faxtomail-service/src/main/resources/db/migration/h2/V2_4_170316_2__add_mustTakeToEditDemand.sql b/faxtomail-service/src/main/resources/db/migration/h2/V2_4_170316_2__add_mustTakeToEditDemand.sql new file mode 100644 index 0000000..3a70d7a --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/h2/V2_4_170316_2__add_mustTakeToEditDemand.sql @@ -0,0 +1,4 @@ +-- add mustTakeToEditDemand + +alter table mailfolder add mustTakeToEditDemand boolean; +update mailfolder set mustTakeToEditDemand = 't' where parent is null; \ No newline at end of file diff --git a/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_4_170316_2__add_mustTakeToEditDemand.sql b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_4_170316_2__add_mustTakeToEditDemand.sql new file mode 100644 index 0000000..18cb799 --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_4_170316_2__add_mustTakeToEditDemand.sql @@ -0,0 +1,6 @@ +-- add mustTakeToEditDemand + +alter table mailfolder add mustTakeToEditDemand bit; +GO +update mailfolder set mustTakeToEditDemand = 1 where parent is null; +GO \ No newline at end of file -- 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/9094_always_open_demand_in_edition in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit a026aa098fc91302fcea4c8de0a14880711de1e3 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:22 2017 +0100 refs #9094 gestion de la conf mustTakeToEditDemand dans la partie admin --- .../WEB-INF/content/admin/configuration-input.jsp | 17 +++++++++++++++++ faxtomail-ui-web/src/main/webapp/js/configuration.js | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp index 0255c2c..8baa452 100644 --- a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp +++ b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp @@ -549,6 +549,23 @@ </label> </div> + <div class="form-group"> + <label class="control-label">Forcer à prendre l'élément pour l'éditer ?</label><br /> + <label class="radio-inline"> + <input type="radio" + ng-model="selectedMailFolder.mustTakeToEditDemand" ng-value="true"> oui + </label> + <label class="radio-inline"> + <input type="radio" + ng-model="selectedMailFolder.mustTakeToEditDemand" ng-value="false"> non + </label> + <label class="radio-inline" ng-if="selectedMailFolder.$parent"> + <input type="radio" + ng-model="selectedMailFolder.mustTakeToEditDemand" ng-value="undefined"> hériter du dossier parent + ({{parentScopeValues.mustTakeToEditDemand ? 'Oui' : 'Non'}}) + </label> + </div> + <div class="form-group" ng-if="selectedMailFolder.$parent"> <label><input type="radio" ng-model="selectedMailFolder.useCurrentLevelNbElementToDisplay" ng-value="false" /> Hériter du nombre d'éléments à afficher à l'utilisateur :</label> diff --git a/faxtomail-ui-web/src/main/webapp/js/configuration.js b/faxtomail-ui-web/src/main/webapp/js/configuration.js index d6610ec..9eaaefc 100644 --- a/faxtomail-ui-web/src/main/webapp/js/configuration.js +++ b/faxtomail-ui-web/src/main/webapp/js/configuration.js @@ -782,6 +782,7 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo $scope.selectedMailFolder.printActionEqualTakeOnlyIfNotTaken = $scope.selectedMailFolder.printActionEqualTakeOnlyIfNotTaken || false; $scope.selectedMailFolder.lockedDemandsOpenableInReadOnly = $scope.selectedMailFolder.lockedDemandsOpenableInReadOnly || false; $scope.selectedMailFolder.canViewOriginalAttachments = $scope.selectedMailFolder.canViewOriginalAttachments || false; + $scope.selectedMailFolder.mustTakeToEditDemand = $scope.selectedMailFolder.mustTakeToEditDemand || false; $scope.selectedMailFolder.ediTransfer = $scope.selectedMailFolder.ediTransfer|| false; } @@ -878,6 +879,9 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo if (angular.isUndefined($scope.parentScopeValues.canViewOriginalAttachments)) { $scope.parentScopeValues.canViewOriginalAttachments = folder.canViewOriginalAttachments; } + if (angular.isUndefined($scope.parentScopeValues.mustTakeToEditDemand)) { + $scope.parentScopeValues.mustTakeToEditDemand = folder.mustTakeToEditDemand; + } if (angular.isUndefined($scope.parentScopeValues.ediTransfer)) { $scope.parentScopeValues.ediTransfer = folder.ediTransfer; } -- 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/9094_always_open_demand_in_edition in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 6b1dcefd2a3be79c814353652716e43b1d0a38e9 Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 16 11:55:38 2017 +0100 refs #9094 prise en compte de la conf mustTakeToEditDemand dans la partie cliente --- .../ui/swing/actions/ShowDemandeAction.java | 23 ++++++++++++--------- .../actions/OpenGroupedDemandAction.java | 24 +++++++++++++--------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java index 73820f9..b375c0b 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java @@ -89,16 +89,12 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { FaxToMailUser takenBy = email.getTakenBy(); - // todo KMORIN 201703015 check in the folder conf - if (true) { - takeEmail = false; - JOptionPane.showConfirmDialog(getHandler().getTopestUI(), - t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)), - t("faxtomail.alert.alreadyTakenBy.title"), - JOptionPane.DEFAULT_OPTION, - JOptionPane.WARNING_MESSAGE); - - } else { + MailFolder folderWithMustTakeToEditDemand = email.getMailFolder(); + while (folderWithMustTakeToEditDemand.getParent() != null + && folderWithMustTakeToEditDemand.getMustTakeToEditDemand() == null) { + folderWithMustTakeToEditDemand = folderWithMustTakeToEditDemand.getParent(); + } + if (BooleanUtils.isTrue(folderWithMustTakeToEditDemand.getMustTakeToEditDemand())) { // si le mail est pris par quelqu'un d'autre, le prend-on ou pas ? if (takenBy != null && !currentUser.equals(takenBy)) { String htmlMessage = String.format( @@ -133,6 +129,13 @@ public class ShowDemandeAction extends AbstractMainUIFaxToMailAction { } } } + } else { + takeEmail = false; + JOptionPane.showConfirmDialog(getHandler().getTopestUI(), + t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)), + t("faxtomail.alert.alreadyTakenBy.title"), + JOptionPane.DEFAULT_OPTION, + JOptionPane.WARNING_MESSAGE); } } // le mail est locké, soit on rejette, soit on ouvre en lecture seule, en fonction de la conf du dossier diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/actions/OpenGroupedDemandAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/actions/OpenGroupedDemandAction.java index 5dba28f..375b3cb 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/actions/OpenGroupedDemandAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/actions/OpenGroupedDemandAction.java @@ -37,6 +37,7 @@ import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; import com.franciaflex.faxtomail.ui.swing.content.demande.DemandesUI; import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupUI; import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupUIHandler; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler; @@ -84,16 +85,12 @@ public class OpenGroupedDemandAction extends AbstractFaxToMailAction<DemandeUIMo FaxToMailUser takenBy = email.getTakenBy(); - // todo KMORIN 201703015 check in the folder conf - if (true) { - takeEmail = false; - JOptionPane.showConfirmDialog(getHandler().getTopestUI(), - t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)), - t("faxtomail.alert.alreadyTakenBy.title"), - JOptionPane.DEFAULT_OPTION, - JOptionPane.WARNING_MESSAGE); - - } else { + MailFolder folderWithMustTakeToEditDemand = email.getMailFolder(); + while (folderWithMustTakeToEditDemand.getParent() != null + && folderWithMustTakeToEditDemand.getMustTakeToEditDemand() == null) { + folderWithMustTakeToEditDemand = folderWithMustTakeToEditDemand.getParent(); + } + if (BooleanUtils.isTrue(folderWithMustTakeToEditDemand.getMustTakeToEditDemand())) { // si le mail est pris par quelqu'un d'autre, le prend-on ou pas ? if (takenBy != null && !currentUser.equals(takenBy)) { String htmlMessage = String.format( @@ -127,6 +124,13 @@ public class OpenGroupedDemandAction extends AbstractFaxToMailAction<DemandeUIMo } } } + } else { + takeEmail = false; + JOptionPane.showConfirmDialog(getHandler().getTopestUI(), + t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)), + t("faxtomail.alert.alreadyTakenBy.title"), + JOptionPane.DEFAULT_OPTION, + JOptionPane.WARNING_MESSAGE); } } // le mail est locké, on ne fait rien -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm