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 f51476ed270a269575d1c18a640542e58c15d475 Author: Kevin Morin <morin@codelutin.com> Date: Tue Feb 7 18:19:58 2017 +0100 fixes #9031 Administration :Liste déroulante des groupes et utilisateurs non filtrable --- .../faxtomail/web/job/MailFilterJob.java | 32 ++--- faxtomail-ui-web/src/main/resources/log4j2.xml | 2 +- .../WEB-INF/content/admin/configuration-input.jsp | 129 ++++++++++++--------- faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml | 2 +- faxtomail-ui-web/src/main/webapp/css/faxtomail.css | 4 + 5 files changed, 97 insertions(+), 72 deletions(-) diff --git a/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java b/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java index c65fc6b..6877b59 100644 --- a/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java +++ b/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java @@ -317,7 +317,7 @@ public class MailFilterJob extends AbstractFaxToMailJob { } // find company of the filter folder - MailFolder filterFolder = filter.getMailFolder(); + final MailFolder filterFolder = filter.getMailFolder(); MailFolder withCompanyFolder = filterFolder; while (!withCompanyFolder.isUseCurrentLevelCompany() && withCompanyFolder.getParent() != null) { withCompanyFolder = withCompanyFolder.getParent(); @@ -385,19 +385,7 @@ public class MailFilterJob extends AbstractFaxToMailJob { email.setMatchingClients(clients); modifiedProperties.add(Email.PROPERTY_OBJECT); - MailFolder mailFolder = null; - if (!filter.isFilterFolderPriority() && client != null) { - FaxToMailUser personInCharge = client.getPersonInCharge(); - if (personInCharge != null) { - mailFolder = mailFolderService.getFolderForFaxToMailUser(personInCharge); - } - } - - if (mailFolder == null) { - // to default folder - mailFolder = filterFolder; - } - + MailFolder mailFolder = getMailFolderForFilter(filter, client); email.setMailFolder(mailFolder); modifiedProperties.add(Email.PROPERTY_MAIL_FOLDER); @@ -542,6 +530,22 @@ public class MailFilterJob extends AbstractFaxToMailJob { } } + private MailFolder getMailFolderForFilter(final MailFilter filter, final Client client) { + MailFolder mailFolder = null; + if (!filter.isFilterFolderPriority() && client != null) { + FaxToMailUser personInCharge = client.getPersonInCharge(); + if (personInCharge != null) { + mailFolder = mailFolderService.getFolderForFaxToMailUser(personInCharge); + } + } + + if (mailFolder == null) { + // to default folder + mailFolder = filter.getMailFolder(); + } + return mailFolder; + } + /** * Supprime le mail sur le serveur (si nécéssaire). * diff --git a/faxtomail-ui-web/src/main/resources/log4j2.xml b/faxtomail-ui-web/src/main/resources/log4j2.xml index 21135da..d036632 100644 --- a/faxtomail-ui-web/src/main/resources/log4j2.xml +++ b/faxtomail-ui-web/src/main/resources/log4j2.xml @@ -44,7 +44,7 @@ </Appenders> <Loggers> - <Logger name="com.franciaflex.faxtomail" level="debug"/> + <Logger name="com.franciaflex.faxtomail" level="info"/> <!-- annoying errors --> <Logger name="com.opensymphony.xwork2.interceptor.ParametersInterceptor" level="FATAL"/> 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 10c301a..e971d75 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 @@ -322,28 +322,32 @@ </table> <div class="form"> + <label for="newStampUserField" class="control-label">Nouvel utilisateur :</label> <div class="form-group"> - <label for="newStampUserField" class="control-label">Nouvel utilisateur :</label> - <select id="newStampUserField" ui-select2 - ng-model="newStampUser" - ng-options="user as user.firstName + ' ' + user.lastName for user in users|filter:filterByAlreadyInCollection(selectedStamp.users)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addStampUser()" ng-disabled="!newStampUser"> + <a class="btn btn-success btn-xs pull-right" ng-click="addStampUser()" ng-disabled="!newStampUser"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newStampUserField" ng-model="newStampUser" theme="bootstrap"> + <ui-select-match>{{$select.selected.firstName}} {{$select.selected.lastName}}</ui-select-match> + <ui-select-choices repeat="user in users | filter:filterByAlreadyInCollection(selectedStamp.users) | filter: $select.search"> + <div ng-bind-html="user.firstName + ' ' + user.lastName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> <div class="form"> + <label for="newStampGroupField" class="control-label">Nouveau groupe :</label> <div class="form-group"> - <label for="newStampGroupField" class="control-label">Nouveau groupe :</label> - <select id="newStampGroupField" ui-select2 - ng-model="newStampGroup" - ng-options="group as group.completeName for group in groups|filter:filterByAlreadyInCollection(selectedStamp.groups)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addStampGroup()" ng-disabled="!newStampGroup"> + <a class="btn btn-success btn-xs pull-right" ng-click="addStampGroup()" ng-disabled="!newStampGroup"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newStampGroupField" ng-model="newStampGroup" theme="bootstrap"> + <ui-select-match>{{$select.selected.completeName}}</ui-select-match> + <ui-select-choices repeat="group in groups | filter:filterByAlreadyInCollection(selectedStamp.groups) | filter: $select.search"> + <div ng-bind-html="group.completeName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> @@ -647,10 +651,9 @@ ng-disabled="!newAcknowledgementException"> <span class="glyphicon glyphicon-plus"></span> </a> - <ui-select ng-model="newAcknowledgementException " theme="bootstrap" + <ui-select ng-model="newAcknowledgementException" theme="bootstrap" name="newAcknowledgementException" - on-select="onSelectCallback($item, $model)" - style="max-width: 95%"> + on-select="onSelectCallback($item, $model)"> <ui-select-match placeholder="Tapez au moins deux caractères pour obtenir la liste des clients"> {{$select.selected.name}}, société : {{$select.selected.company}}, @@ -748,14 +751,17 @@ </table> <div class="form"> + <label for="newCustomerResponsibleField" class="control-label">Nouveau :</label> <div class="form-group"> - <label for="newCustomerResponsibleField" class="control-label">Nouveau :</label> - <select id="newCustomerResponsibleField" ui-select2 ng-model="newCustomerResponsible" - ng-options="user as user.firstName + ' ' + user.lastName for user in users|filter:filterByAlreadyInCollection(selectedMailFolder.customerResponsibles)"></select> - - <a class="btn btn-success btn-xs" ng-click="addCustomerResponsible()" ng-disabled="!newCustomerResponsible"> + <a class="btn btn-success btn-xs pull-right" ng-click="addCustomerResponsible()" ng-disabled="!newCustomerResponsible"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newCustomerResponsibleField" ng-model="newCustomerResponsible" theme="bootstrap"> + <ui-select-match>{{$select.selected.firstName}} {{$select.selected.lastName}}</ui-select-match> + <ui-select-choices repeat="user in users | filter:filterByAlreadyInCollection(selectedMailFolder.customerResponsibles) | filter: $select.search"> + <div ng-bind-html="user.firstName + ' ' + user.lastName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> </div> @@ -1148,28 +1154,32 @@ </tbody> </table> <div class="form"> + <label for="newRightUserField" class="control-label">Nouvel utilisateur :</label> <div class="form-group"> - <label for="newRightUserField" class="control-label">Nouvel utilisateur :</label> - <select id="newRightUserField" ui-select2 - ng-model="newRightUser" - ng-options="user as user.firstName + ' ' + user.lastName for user in users|filter:filterByAlreadyInCollection(selectedMailFolder.rightUsers)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addRightUser()" ng-disabled="!newRightUser"> + <a class="btn btn-success btn-xs pull-right" ng-click="addRightUser()" ng-disabled="!newRightUser"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newRightUserField" ng-model="newRightUser" theme="bootstrap"> + <ui-select-match>{{$select.selected.firstName}} {{$select.selected.lastName}}</ui-select-match> + <ui-select-choices repeat="user in users | filter:filterByAlreadyInCollection(selectedMailFolder.rightUsers) | filter: $select.search"> + <div ng-bind-html="user.firstName + ' ' + user.lastName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> <div class="form"> + <label for="newRightGroupField" class="control-label">Nouveau groupe :</label> <div class="form-group"> - <label for="newRightGroupField" class="control-label">Nouveau groupe :</label> - <select id="newRightGroupField" ui-select2 - ng-model="newRightGroup" - ng-options="group as group.completeName for group in groups|filter:filterByAlreadyInCollection(selectedMailFolder.rightGroups)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addRightGroup()" ng-disabled="!newRightGroup"> + <a class="btn btn-success btn-xs pull-right" ng-click="addRightGroup()" ng-disabled="!newRightGroup"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newRightGroupField" ng-model="newRightGroup" theme="bootstrap"> + <ui-select-match>{{$select.selected.completeName}}</ui-select-match> + <ui-select-choices repeat="group in groups | filter:filterByAlreadyInCollection(selectedMailFolder.rightGroups) | filter: $select.search"> + <div ng-bind-html="group.completeName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> </div> @@ -1248,28 +1258,32 @@ </tbody> </table> <div class="form"> + <label for="newRightUserField" class="control-label">Nouvel utilisateur :</label> <div class="form-group"> - <label for="newRightUserField" class="control-label">Nouvel utilisateur :</label> - <select id="newRightUserField" ui-select2 - ng-model="newRightUser" - ng-options="user as user.firstName + ' ' + user.lastName for user in users|filter:filterByAlreadyInCollection(selectedMailFolder.rightUsers)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addRightUser()" ng-disabled="!newRightUser"> + <a class="btn btn-success btn-xs pull-right" ng-click="addRightUser()" ng-disabled="!newRightUser"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newRightUserField" ng-model="newRightUser" theme="bootstrap"> + <ui-select-match>{{$select.selected.firstName}} {{$select.selected.lastName}}</ui-select-match> + <ui-select-choices repeat="user in users | filter:filterByAlreadyInCollection(selectedMailFolder.rightUsers) | filter: $select.search"> + <div ng-bind-html="user.firstName + ' ' + user.lastName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> <div class="form"> + <label for="newRightGroupField" class="control-label">Nouveau groupe :</label> <div class="form-group"> - <label for="newRightGroupField" class="control-label">Nouveau groupe :</label> - <select id="newRightGroupField" ui-select2 - ng-model="newRightGroup" - ng-options="group as group.completeName for group in groups|filter:filterByAlreadyInCollection(selectedMailFolder.rightGroups)"> - </select> - <a class="btn btn-success btn-xs" ng-click="addRightGroup()" ng-disabled="!newRightGroup"> + <a class="btn btn-success btn-xs pull-right" ng-click="addRightGroup()" ng-disabled="!newRightGroup"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newRightGroupField" ng-model="newRightGroup" theme="bootstrap"> + <ui-select-match>{{$select.selected.completeName}}</ui-select-match> + <ui-select-choices repeat="group in groups | filter:filterByAlreadyInCollection(selectedMailFolder.rightGroups) | filter: $select.search"> + <div ng-bind-html="group.completeName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> </div> @@ -1607,11 +1621,13 @@ <div class="form"> <div class="form-group required"> <label for="groupChefUserGroupField" class="control-label">Chef du groupe : </label> - <select id="groupChefUserGroupField" ui-select2 ng-required="selectedGroupChef" - ng-model="selectedGroupChef.userGroup" - ng-options="group as group.completeName for group in groups|filter:availableNewGroupChef"> - <option value=""></option> - </select> + <ui-select id="newRightGroupField" ng-model="selectedGroupChef.userGroup" + ng-required="true" theme="bootstrap"> + <ui-select-match>{{$select.selected.completeName}}</ui-select-match> + <ui-select-choices repeat="group in groups | filter:availableNewGroupChef | filter: $select.search"> + <div ng-bind-html="group.completeName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> @@ -1638,16 +1654,17 @@ </tbody> </table> <div class="form"> + <label for="newManagedGroupField" class="control-label">Nouveau groupe :</label> <div class="form-group"> - <label for="newManagedGroupField" class="control-label">Nouveau groupe :</label> - <select id="newManagedGroupField" ui-select2 - ng-model="newManagedGroup" - ng-options="group as group.completeName for group in groups|filter:filterByAlreadyInCollection(selectedGroupChef.managedGroups)"> - <option value=""></option> - </select> - <a class="btn btn-success btn-xs" ng-click="addManagedGroup()" ng-disabled="!newManagedGroup"> + <a class="btn btn-success btn-xs pull-right" ng-click="addManagedGroup()" ng-disabled="!newManagedGroup"> <span class="glyphicon glyphicon-plus"></span> </a> + <ui-select id="newManagedGroupField" ng-model="newManagedGroup" theme="bootstrap"> + <ui-select-match>{{$select.selected.completeName}}</ui-select-match> + <ui-select-choices repeat="group in groups | filter:filterByAlreadyInCollection(selectedGroupChef.managedGroups) | filter: $select.search"> + <div ng-bind-html="group.completeName | highlight: $select.search"></div> + </ui-select-choices> + </ui-select> </div> </div> </div> diff --git a/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml b/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml index 93681fa..ea9172c 100644 --- a/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml +++ b/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml @@ -86,9 +86,9 @@ </group> <group name='faxtomail-configuration'> + <group-ref>webjar-ui-select</group-ref> <group-ref>select2</group-ref> <group-ref>webjar-select2</group-ref> - <group-ref>webjar-ui-select</group-ref> <group-ref>webjar-angular-sanitize</group-ref> <group-ref>select2sortable</group-ref> <group-ref>webjar-angular-ui-sortable</group-ref> diff --git a/faxtomail-ui-web/src/main/webapp/css/faxtomail.css b/faxtomail-ui-web/src/main/webapp/css/faxtomail.css index 4ff1cfc..b0760d2 100644 --- a/faxtomail-ui-web/src/main/webapp/css/faxtomail.css +++ b/faxtomail-ui-web/src/main/webapp/css/faxtomail.css @@ -98,4 +98,8 @@ table tr.parentInfos td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; +} + +.ui-select-container.ui-select-bootstrap { + max-width: 95%; } \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.