Author: echatellier Date: 2014-05-26 18:18:45 +0200 (Mon, 26 May 2014) New Revision: 100 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/100 Log: refs #4662: D?\195?\169but d'interface pour la mise en avant des dossiers par groupes ldap Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-05-26 16:05:15 UTC (rev 99) +++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-05-26 16:18:45 UTC (rev 100) @@ -426,7 +426,21 @@ </div> <div id="tabs-ldap" class="tab-pane" ng-controller="ConfigurationLdapController"> - Comming soon ... + <table id='table-snapshot' class="table table-bordered"> + <caption>Dossiers mis en avant</caption> + <thead> + <tr> + <th>Dossier</th> + <th ng-repeat="ldapGroup in ldapGroups">{{ldapGroup}}</th> + </tr> + </thead> + <tbody ng-repeat="mailFolder in flatMailFolders()"> + <th>{{mailFolder.name}}</th> + <td ng-repeat="ldapGroup in ldapGroups"> + <input type="checkbox" /> + </td> + </tbody> + </table> </div> <nav class="navbar navbar-default navbar-fixed-bottom"> Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-05-26 16:05:15 UTC (rev 99) +++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-05-26 16:18:45 UTC (rev 100) @@ -12,6 +12,23 @@ $scope.etatAttenteFields = ConfigurationData.etatAttenteFields; //{Array} les etats d'attentes disponibles $scope.etatAttentes = ConfigurationData.etatAttentes; + + // method privée recursive pour retourner l'ensemble des dossiers + var recursiveAddMailFolder = function(result, mailFolders) { + if (mailFolders) { + angular.forEach(mailFolders, function(mailFolder) { + result.push(mailFolder); + recursiveAddMailFolder(result, mailFolder.children); + }); + } + }; + + // Retourne l'ensemble de l'arbre des dossiers "à plat" + $scope.flatMailFolders = function() { + var flatMailFolders = []; + recursiveAddMailFolder(flatMailFolders, $scope.mailFolders); + return flatMailFolders; + }; }]); /** @@ -216,22 +233,6 @@ return mailFilters; }; - var recursiveAddMailFolder = function(result, mailFolders) { - if (mailFolders) { - angular.forEach(mailFolders, function(mailFolder) { - result.push(mailFolder); - recursiveAddMailFolder(result, mailFolder.children); - }); - } - }; - - // FIXME second binding sur une methode, pas top - $scope.flatMailFolders = function() { - var flatMailFolders = []; - recursiveAddMailFolder(flatMailFolders, $scope.mailFolders); - return flatMailFolders; - }; - // add new filter action $scope.addNewFilter = function() { var filter = {expression: $scope.selectedFilter, fmMailFolder: $scope.selectedFolder}; @@ -277,5 +278,6 @@ */ FaxToMailModule.controller('ConfigurationLdapController', ['$scope', '$http', 'ConfigurationData', function($scope, $http, ConfigurationData) { - + // {Array} Liste des groupes ldap + $scope.ldapGroups = ["Group1", "Group2", "Group3", "Group4", "Group5"]; }]); \ No newline at end of file