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>.