branch develop updated (d46a8e0 -> 71bcfa4)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from d46a8e0 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new ee7e1f9 refs #8916 Ajout des attributs des dossiers pour figer le nombre d'éléments par page new 859dfcd refs #8916 ajout de la configuration de dossier pour figer le nombre d'éléments par page new 71bcfa4 fixes #8916 prise en compte de la configuration du dossier pour figer ou non le nombre d'éléments à afficher 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 71bcfa4c877b5cd8dd19e2f2aea4ed1f4be9c383 Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:22:33 2017 +0100 fixes #8916 prise en compte de la configuration du dossier pour figer ou non le nombre d'éléments à afficher commit 859dfcd877ebe0cd03551a117107fe96d4013323 Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:21:38 2017 +0100 refs #8916 ajout de la configuration de dossier pour figer le nombre d'éléments par page commit ee7e1f95997579eb5ab47740038b25b62db8fdfb Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:20:52 2017 +0100 refs #8916 Ajout des attributs des dossiers pour figer le nombre d'éléments par page Summary of changes: faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 32715 -> 32870 bytes ...70106__add_nbelementtodisplay_in_mailfolder.sql | 5 +++ ...70106__add_nbelementtodisplay_in_mailfolder.sql | 6 ++++ .../ui/swing/content/demande/DemandeListUI.css | 4 +++ .../content/demande/DemandeListUIHandler.java | 35 ++++++++++++++++----- .../swing/content/demande/DemandeListUIModel.java | 13 ++++++++ .../WEB-INF/content/admin/configuration-input.jsp | 29 +++++++++++++++++ .../src/main/webapp/js/configuration.js | 6 ++++ 8 files changed, 90 insertions(+), 8 deletions(-) create mode 100644 faxtomail-service/src/main/resources/db/migration/h2/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql create mode 100644 faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.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 develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit ee7e1f95997579eb5ab47740038b25b62db8fdfb Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:20:52 2017 +0100 refs #8916 Ajout des attributs des dossiers pour figer le nombre d'éléments par page --- faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 32715 -> 32870 bytes ...170106__add_nbelementtodisplay_in_mailfolder.sql | 5 +++++ ...170106__add_nbelementtodisplay_in_mailfolder.sql | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/faxtomail-persistence/src/main/xmi/faxtomail.zargo b/faxtomail-persistence/src/main/xmi/faxtomail.zargo index 0d2edee..7ad8168 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_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql b/faxtomail-service/src/main/resources/db/migration/h2/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql new file mode 100644 index 0000000..1e8fd02 --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/h2/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql @@ -0,0 +1,5 @@ + +-- add mail folder level configuration +alter table mailfolder add useCurrentLevelNbElementToDisplay boolean; +alter table mailfolder add nbElementToDisplay integer; +update mailfolder set useCurrentLevelNbElementToDisplay = 'f'; \ No newline at end of file diff --git a/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql new file mode 100644 index 0000000..13a425e --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_0_170106__add_nbelementtodisplay_in_mailfolder.sql @@ -0,0 +1,6 @@ + +-- add mail folder level configuration +alter table mailfolder add useCurrentLevelNbElementToDisplay bit; +alter table mailfolder add nbElementToDisplay integer; +GO +update mailfolder set useCurrentLevelNbElementToDisplay = 0; \ 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 develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 859dfcd877ebe0cd03551a117107fe96d4013323 Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:21:38 2017 +0100 refs #8916 ajout de la configuration de dossier pour figer le nombre d'éléments par page --- .../WEB-INF/content/admin/configuration-input.jsp | 29 ++++++++++++++++++++++ .../src/main/webapp/js/configuration.js | 6 +++++ 2 files changed, 35 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 f54f55e..fc46124 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 @@ -507,6 +507,35 @@ <textarea class="form-control" ng-model="selectedMailFolder.rejectResponseMessage" ng-if="selectedMailFolder.useCurrentLevelRejectResponseMessage || !selectedMailFolder.$parent"></textarea> </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> + <select class="form-control" disabled + ng-model="parentScopeValues.nbElementToDisplay" + ng-if="!selectedMailFolder.useCurrentLevelNbElementToDisplay"> + <option value="">Laisser le choix à l'utilisateur</option> + <option value="50">50</option> + <option value="100">100</option> + <option value="150">150</option> + <option value="200">200</option> + <option value="250">250</option> + </select> + </div> + <div class="form-group"> + <label><input type="radio" ng-model="selectedMailFolder.useCurrentLevelNbElementToDisplay" ng-value="true" ng-if="selectedMailFolder.$parent" /> + Définir le nombre d'éléments à afficher à l'utilisateur :</label> + <select class="form-control" + ng-model="selectedMailFolder.nbElementToDisplay" + ng-if="selectedMailFolder.useCurrentLevelNbElementToDisplay || !selectedMailFolder.$parent"> + <option value="">Laisser le choix à l'utilisateur</option> + <option value="50">50</option> + <option value="100">100</option> + <option value="150">150</option> + <option value="200">200</option> + <option value="250">250</option> + </select> + </div> + <hr /> <div class="form-group"> diff --git a/faxtomail-ui-web/src/main/webapp/js/configuration.js b/faxtomail-ui-web/src/main/webapp/js/configuration.js index c21df34..31a2097 100644 --- a/faxtomail-ui-web/src/main/webapp/js/configuration.js +++ b/faxtomail-ui-web/src/main/webapp/js/configuration.js @@ -509,6 +509,7 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo useCurrentLevelRejectResponseMessage: true, useCurrentLevelRejectResponseMailAddress: true, useCurrentLevelCompany: true, + useCurrentLevelNbElementToDisplay: true, archiveFolder: false }; @@ -542,6 +543,7 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo useCurrentLevelRejectResponseMessage: false, useCurrentLevelRejectResponseMailAddress: false, useCurrentLevelCompany: false, + useCurrentLevelNbElementToDisplay: false, archiveFolder: false }; @@ -578,6 +580,7 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo useCurrentLevelRejectResponseMessage: false, useCurrentLevelRejectResponseMailAddress: false, useCurrentLevelCompany: false, + useCurrentLevelNbElementToDisplay: false, useCurrentLevelDemandType: false, useCurrentLevelRange: false, archiveFolder: true @@ -838,6 +841,9 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo if (angular.isUndefined($scope.parentScopeValues.rejectResponseMessage)) { $scope.parentScopeValues.rejectResponseMessage= folder.rejectResponseMessage; } + if (angular.isUndefined($scope.parentScopeValues.nbElementToDisplay)) { + $scope.parentScopeValues.nbElementToDisplay= folder.nbElementToDisplay; + } if (angular.isUndefined($scope.parentScopeValues.company)) { $scope.parentScopeValues.company = folder.company; } -- 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 develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 71bcfa4c877b5cd8dd19e2f2aea4ed1f4be9c383 Author: Kevin Morin <morin@codelutin.com> Date: Mon Jan 9 10:22:33 2017 +0100 fixes #8916 prise en compte de la configuration du dossier pour figer ou non le nombre d'éléments à afficher --- .../ui/swing/content/demande/DemandeListUI.css | 4 +++ .../content/demande/DemandeListUIHandler.java | 35 +++++++++++++++++----- .../swing/content/demande/DemandeListUIModel.java | 13 ++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css index 96786d0..d32c873 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css @@ -136,6 +136,10 @@ text: "faxtomail.demandeList.resultPerPage"; } +#resultPerPageCombo { + enabled: { model.isEnableChangeResultPerPage() }; +} + #pageNumberLabel { text: "faxtomail.demandeList.pages"; } diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java index 85bc56c..3953794 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java @@ -320,7 +320,7 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem // int combo box for result per page ui.getResultPerPageCombo().setModel(new PaginationComboModel()); int resultPerPage = getConfig().getResultPerPage(); - ui.getModel().setResultPerPage(resultPerPage); + getModel().setResultPerPage(resultPerPage); ui.getResultPerPageCombo().setSelectedItem(resultPerPage); ui.getResultPerPageCombo().addItemListener(new ItemListener() { @Override @@ -509,7 +509,8 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem } protected void loadFolderDemands(Map<MailFolder, FolderTreeNode> nodesByFolder) { - MailFolder folder = getModel().getSelectedFolder(); + DemandeListUIModel model = getModel(); + MailFolder folder = model.getSelectedFolder(); if (folder != null) { FolderTreeNode folderNode = nodesByFolder.get(folder); if (folderNode != null) { @@ -520,12 +521,30 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem folder = folder.getParent(); } - DemandeListUIModel model = getModel(); model.setComputeQuantitiesByRangeEnabled(readable); - model.setNewDemandEnabled(readable && folder != null && Boolean.TRUE.equals(folder.getAllowCreateDemandIntoFolder())); + model.setNewDemandEnabled(readable && Boolean.TRUE.equals(folder.getAllowCreateDemandIntoFolder())); } } + folder = model.getSelectedFolder(); + if (folder != null) { + while (!folder.isUseCurrentLevelNbElementToDisplay() + && folder.getParent() != null) { + folder = folder.getParent(); + } + + boolean enableChangeResultPerPage = folder.getNbElementToDisplay() == null; + model.setEnableChangeResultPerPage(enableChangeResultPerPage); + int resultPerPage; + if (!enableChangeResultPerPage) { + resultPerPage = folder.getNbElementToDisplay(); + } else { + resultPerPage = getConfig().getResultPerPage(); + } + model.setResultPerPage(resultPerPage); + ui.getResultPerPageCombo().setSelectedItem(resultPerPage); + } + tableFilter.executeFilter(); } @@ -540,12 +559,13 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem } public void updateResultPerPage(ItemEvent event) { - if (event.getStateChange() == ItemEvent.SELECTED) { + DemandeListUIModel model = getModel(); + if (event.getStateChange() == ItemEvent.SELECTED && model.isEnableChangeResultPerPage()) { int resultPerPage = (Integer)event.getItem(); - getModel().setResultPerPage(resultPerPage); + model.setResultPerPage(resultPerPage); getConfig().setResultPerPage(resultPerPage); getConfig().save(); - getModel().resetPaginationParameter(); + model.resetPaginationParameter(); runListAction(); } } @@ -664,7 +684,6 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem int selectedRowCount = getUI().getDataTable().getSelectedRowCount(); - DemandeListUIModel model = getModel(); model.setReplyEnabled(selectedRowCount == 1 diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java index 5469b49..3a58f60 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java @@ -55,6 +55,7 @@ public class DemandeListUIModel extends AbstractSerializableBean { public static final String PROPERTY_COMPUTE_QUANTITIES_BY_RANGE_ENABLED = "computeQuantitiesByRangeEnabled"; public static final String PROPERTY_NEW_DEMAND_ENABLED = "newDemandEnabled"; public static final String PROPERTY_RESULT_PER_PAGE = "resultPerPage"; + public static final String PROPERTY_ENABLE_CHANGE_RESULT_PER_PAGE = "enableChangeResultPerPage"; protected List<MailFolder> folders; @@ -64,6 +65,8 @@ public class DemandeListUIModel extends AbstractSerializableBean { protected int resultPerPage = 50; + protected boolean enableChangeResultPerPage = true; + protected PaginationParameter paginationParameter = PaginationParameter.of(0, resultPerPage, Email.PROPERTY_TOPIA_CREATE_DATE, false); protected PaginationResult<Email> paginationResult = PaginationResult.of(null, 0, paginationParameter); @@ -286,4 +289,14 @@ public class DemandeListUIModel extends AbstractSerializableBean { public int getResultPerPage() { return resultPerPage; } + + public boolean isEnableChangeResultPerPage() { + return enableChangeResultPerPage; + } + + public void setEnableChangeResultPerPage(boolean enableChangeResultPerPage) { + Object oldValue = isEnableChangeResultPerPage(); + this.enableChangeResultPerPage = enableChangeResultPerPage; + firePropertyChange(PROPERTY_ENABLE_CHANGE_RESULT_PER_PAGE, oldValue, enableChangeResultPerPage); + } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm