branch develop updated (77f666a -> 7fb9863)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See http://git.codelutin.com/faxtomail.git from 77f666a fixes #6753 Les emails trop larges sont tronqués new 7fb9863 fixes #6802 Les dossiers d'archive sont affichés dans l'arbre quand le droit de lecture leur est directement appliqué fixes #6803 Ne pas permettre d'aller au dossier des éléments archivés depuis la recherche 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 7fb98631ba50addd6401f70f964c76948d839772 Author: Kevin Morin <morin@codelutin.com> Date: Fri Mar 6 16:01:20 2015 +0100 fixes #6802 Les dossiers d'archive sont affichés dans l'arbre quand le droit de lecture leur est directement appliqué fixes #6803 Ne pas permettre d'aller au dossier des éléments archivés depuis la recherche Summary of changes: .../persistence/entities/MailFolderTopiaDao.java | 4 ++-- .../faxtomail/ui/swing/content/MainUIHandler.java | 14 +++++++++++--- .../ui/swing/content/search/SearchUIHandler.java | 15 +++++++++++++-- .../WEB-INF/content/admin/configuration-input.jsp | 18 ++++++++++++++++++ 4 files changed, 44 insertions(+), 7 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 develop in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit 7fb98631ba50addd6401f70f964c76948d839772 Author: Kevin Morin <morin@codelutin.com> Date: Fri Mar 6 16:01:20 2015 +0100 fixes #6802 Les dossiers d'archive sont affichés dans l'arbre quand le droit de lecture leur est directement appliqué fixes #6803 Ne pas permettre d'aller au dossier des éléments archivés depuis la recherche --- .../persistence/entities/MailFolderTopiaDao.java | 4 ++-- .../faxtomail/ui/swing/content/MainUIHandler.java | 14 +++++++++++--- .../ui/swing/content/search/SearchUIHandler.java | 15 +++++++++++++-- .../WEB-INF/content/admin/configuration-input.jsp | 18 ++++++++++++++++++ 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailFolderTopiaDao.java b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailFolderTopiaDao.java index f5d751a..47738fa 100644 --- a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailFolderTopiaDao.java +++ b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailFolderTopiaDao.java @@ -55,7 +55,7 @@ public class MailFolderTopiaDao extends AbstractMailFolderTopiaDao<MailFolder> { } public Collection<MailFolder> getReadableFolders(FaxToMailUser user) { - String query = newFromClause("mf") + " where :user in elements(mf.readRightUsers) or exists (from mf.readRightGroups g where g in (:groups))"; + String query = newFromClause("mf") + " where (:user in elements(mf.readRightUsers) or exists (from mf.readRightGroups g where g in (:groups))) and mf.archiveFolder = false"; HashMap<String, Object> map = Maps.newHashMap(); map.put("user", user); map.put("groups", user.getUserGroups()); @@ -64,7 +64,7 @@ public class MailFolderTopiaDao extends AbstractMailFolderTopiaDao<MailFolder> { } public Collection<MailFolder> getMoveableFolders(FaxToMailUser user) { - String query = newFromClause("mf") + " where :user in elements(mf.moveRightUsers) or exists (from mf.moveRightGroups g where g in (:groups))"; + String query = newFromClause("mf") + " where (:user in elements(mf.moveRightUsers) or exists (from mf.moveRightGroups g where g in (:groups))) and mf.archiveFolder = false"; HashMap<String, Object> map = Maps.newHashMap(); map.put("user", user); map.put("groups", user.getUserGroups()); diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java index 65295ef..52137d3 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java @@ -174,12 +174,18 @@ public class MainUIHandler extends AbstractFaxToMailUIHandler<FaxToMailUIContext getContext().setScreen(FaxToMailScreen.LIST); - // affichage d'un message si l'utilisateur n'a aucun droit + // désactivation de l'onglet gestion des fax si aucun dossier + // l'utilisateur a peut etre seulement les droits sur les archives DemandeListUI demandeListUI = (DemandeListUI) getCurrentBody(); if (CollectionUtils.isEmpty(demandeListUI.getModel().getFolders())) { - JOptionPane.showMessageDialog(demandeListUI, t("faxtomail.demandeList.noRigthsFound"), - t("faxtomail.demandeList.title"), JOptionPane.ERROR_MESSAGE); +// JOptionPane.showMessageDialog(demandeListUI, t("faxtomail.demandeList.noRigthsFound"), +// t("faxtomail.demandeList.title"), JOptionPane.ERROR_MESSAGE); + + getUI().getDemandListButton().setVisible(false); + getContext().setScreen(FaxToMailScreen.SEARCH); } + + } @Override @@ -375,6 +381,8 @@ public class MainUIHandler extends AbstractFaxToMailUIHandler<FaxToMailUIContext default: case LIST: + ui.getDemandListButton().setVisible(true); + // cf #6426, if a Nimbus ClassCastException, then retry to create the ui // TODO remove this when we use the ng actions try { diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java index 009c962..595d300 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java @@ -327,10 +327,21 @@ public class SearchUIHandler extends AbstractFaxToMailDemandListHandler<SearchUI protected void beforeOpenPopup(int rowIndex, int columnIndex) { super.beforeOpenPopup(rowIndex, columnIndex); - int selectedRowCount = getUI().getDataTable().getSelectedRowCount(); + JXTable dataTable = getUI().getDataTable(); + int selectedRowCount = dataTable.getSelectedRowCount(); + + boolean menuEnabled = selectedRowCount == 1; + + if (menuEnabled) { + DemandeTableModel dataTableModel = (DemandeTableModel) dataTable.getModel(); + rowIndex = dataTable.convertRowIndexToModel(rowIndex); + DemandeUIModel selectedEmail = dataTableModel.getEntry(rowIndex); + menuEnabled = selectedEmail.getArchiveDate() == null; + } SearchUIModel model = getModel(); - model.setMenuEnabled(selectedRowCount == 1); + + model.setMenuEnabled(menuEnabled); } public void goToMenu() { 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 376364a..8cf7073 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 @@ -909,6 +909,24 @@ </tr> </thead> <tbody> + <tr ng-repeat="group in parentScopeValues.rightGroups" class="parentInfos"> + <td> + <span class="fa fa-users"></span> {{group.completeName}} + </td> + <td> + <label><input type="checkbox" ng-checked="parentScopeValues.readRightGroups.containsByTopiaId(group)" disabled> Lecture</label> + </td> + </tr> + <tr ng-repeat="user in parentScopeValues.rightUsers" class="parentInfos"> + <td> + <span class="fa fa-user"></span> {{user.firstName}} {{user.lastName}} + </td> + <td> + <label><input type="checkbox" ng-checked="parentScopeValues.readRightUsers.containsByTopiaId(user)" disabled> Lecture</label> + </td> + </tr> + </tbody> + <tbody> <tr ng-repeat="group in selectedMailFolder.rightGroups"> <td> <span class="fa fa-users"></span> {{group.completeName}} -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm