branch develop updated (c0811eb -> f51476e)
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 c0811eb [jgitflow-maven-plugin]Updating develop poms back to pre merge state new ae907e6 fixes #9033 Administration : Filtre des mails mal ordonnés new f51476e fixes #9031 Administration :Liste déroulante des groupes et utilisateurs non filtrable The 2 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 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 commit ae907e62ce27143702e13067203ad80f15fcc0bc Author: Kevin Morin <morin@codelutin.com> Date: Tue Feb 7 18:19:30 2017 +0100 fixes #9033 Administration : Filtre des mails mal ordonnés Summary of changes: .../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 + .../src/main/webapp/js/configuration.js | 19 ++- 6 files changed, 115 insertions(+), 73 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 https://gitlab.nuiton.org/codelutin/faxtomail.git commit ae907e62ce27143702e13067203ad80f15fcc0bc Author: Kevin Morin <morin@codelutin.com> Date: Tue Feb 7 18:19:30 2017 +0100 fixes #9033 Administration : Filtre des mails mal ordonnés --- faxtomail-ui-web/src/main/webapp/js/configuration.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/faxtomail-ui-web/src/main/webapp/js/configuration.js b/faxtomail-ui-web/src/main/webapp/js/configuration.js index f74d34a..1bbc0c0 100644 --- a/faxtomail-ui-web/src/main/webapp/js/configuration.js +++ b/faxtomail-ui-web/src/main/webapp/js/configuration.js @@ -1355,7 +1355,24 @@ ConfigurationModule.controller('ConfigurationFilterController', ['$scope', '$win if ($scope.mailFilters.indexOfBy('expression', $scope.newFilter) != -1) { $window.alert("Ce filtre existe déjà !"); } else { - $scope.mailFilters.push($scope.newFilter); + // add the filter in the end of the root folder filters + var indexToInsert = null; + do { + var indexOfNextRootMailFolder = $scope.mailFolders.indexOf(rootMailFolder) + 1; + if (indexOfNextRootMailFolder < $scope.mailFolders.length) { + var nextFolderId = $scope.mailFolders[indexOfNextRootMailFolder].topiaId; + if ($scope.rootFolderMailFilters.hasOwnProperty(nextFolderId)) { + indexToInsert = $scope.mailFilters.indexOf($scope.rootFolderMailFilters[nextFolderId][0]); + } + } + } while (indexToInsert == null && indexOfNextRootMailFolder < $scope.mailFolders.length); + + if (indexToInsert != null) { + $scope.mailFilters.splice(indexToInsert, 0, $scope.newFilter); + } else { + $scope.mailFilters.push($scope.newFilter); + } + if (!$scope.rootFolderMailFilters.hasOwnProperty(rootMailFolder.topiaId)) { $scope.rootFolderMailFilters[rootMailFolder.topiaId] = []; } -- 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 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>.
participants (1)
-
codelutin.com scm