Faxtomail-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
June 2014
- 6 participants
- 194 discussions
r151 - in trunk/faxtomail-ui-web/src/main/webapp: WEB-INF/content/admin css js
by echatellier@users.forge.codelutin.com 08 Jun '14
by echatellier@users.forge.codelutin.com 08 Jun '14
08 Jun '14
Author: echatellier
Date: 2014-06-08 16:30:45 +0200 (Sun, 08 Jun 2014)
New Revision: 151
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/151
Log:
D?\195?\169but de gestion des valeurs par d?\195?\169faut des noeuds parents
Modified:
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp
trunk/faxtomail-ui-web/src/main/webapp/css/faxtomail.css
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-06-08 13:21:04 UTC (rev 150)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-08 14:30:45 UTC (rev 151)
@@ -252,9 +252,10 @@
<input type="radio"
ng-model="selectedMailFolder.allowMoveDemandIntoFolder" ng-value="false"> non
</label>
- <label class="radio-inline">
+ <label class="radio-inline" ng-if="selectedMailFolder.$parent">
<input type="radio"
- ng-model="selectedMailFolder.allowMoveDemandIntoFolder" ng-value="undefined"> valeur du noeud parent
+ ng-model="selectedMailFolder.allowMoveDemandIntoFolder" ng-value="undefined"> hériter du dossier parent
+ ({{parentScopeValues.allowMoveDemandIntoFolder ? 'Oui' : 'Non'}})
</label>
</div>
<div class="form-group">
@@ -267,9 +268,10 @@
<input type="radio"
ng-model="selectedMailFolder.allowCreateDemandIntoFolder" ng-value="false"> non
</label>
- <label class="radio-inline">
+ <label class="radio-inline" ng-if="selectedMailFolder.$parent">
<input type="radio"
- ng-model="selectedMailFolder.allowCreateDemandIntoFolder" ng-value="undefined"> valeur du noeud parent
+ ng-model="selectedMailFolder.allowCreateDemandIntoFolder" ng-value="undefined"> hériter du dossier parent
+ ({{parentScopeValues.allowCreateDemandIntoFolder ? 'Oui' : 'Non'}})
</label>
</div>
<div class="form-group">
@@ -282,9 +284,10 @@
<input type="radio"
ng-model="selectedMailFolder.printActionEqualTakeAction" ng-value="false"> non
</label>
- <label class="radio-inline">
+ <label class="radio-inline" ng-if="selectedMailFolder.$parent">
<input type="radio"
- ng-model="selectedMailFolder.printActionEqualTakeAction" ng-value="undefined"> valeur du noeud parent
+ ng-model="selectedMailFolder.printActionEqualTakeAction" ng-value="undefined"> hériter du dossier parent
+ ({{parentScopeValues.printActionEqualTakeAction ? 'Oui' : 'Non'}})
</label>
</div>
@@ -298,9 +301,10 @@
<input type="radio"
ng-model="selectedMailFolder.openAttachmentReportNoTaken" ng-value="false"> non
</label>
- <label class="radio-inline">
+ <label class="radio-inline" ng-if="selectedMailFolder.$parent">
<input type="radio"
- ng-model="selectedMailFolder.openAttachmentReportNoTaken" ng-value="undefined"> valeur du noeud parent
+ ng-model="selectedMailFolder.openAttachmentReportNoTaken" ng-value="undefined"> hériter du dossier parent
+ ({{parentScopeValues.openAttachmentReportNoTaken ? 'Oui' : 'Non'}})
</label>
</div>
@@ -314,9 +318,10 @@
<input type="radio"
ng-model="selectedMailFolder.rejectUnknownSender" ng-value="false"> non
</label>
- <label class="radio-inline">
+ <label class="radio-inline" ng-if="selectedMailFolder.$parent">
<input type="radio"
- ng-model="selectedMailFolder.rejectUnknownSender" ng-value="undefined"> valeur du noeud parent
+ ng-model="selectedMailFolder.rejectUnknownSender" ng-value="undefined"> hériter du dossier parent
+ ({{parentScopeValues.rejectUnknownSender ? 'Oui' : 'Non'}})
</label>
</div>
@@ -563,7 +568,7 @@
</div>
<!-- Droits -->
- <div class="panel panel-default" ng-controller="ConfigurationRigthsController">
+ <div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse4">
@@ -582,24 +587,24 @@
</tr>
</thead>
<tbody>
- <tr ng-repeat="user in parentsWriteRightUsers">
+ <tr ng-repeat="user in parentScopeValues.parentsWriteRightUsers" class="parentInfos">
<td>
- <span class="fa fa-user"></span> <em>{{user.firstName}} {{user.lastName}}</em>
+ <span class="fa fa-user"></span> {{user.firstName}} {{user.lastName}}
</td>
<td>
- <label><input type="checkbox"> Lecture</label>
- <label><input type="checkbox"> Écriture</label>
- <label><input type="checkbox"> Déplacement</label>
+ <label><input type="checkbox" disabled> Lecture</label>
+ <label><input type="checkbox" disabled> Écriture</label>
+ <label><input type="checkbox" disabled> Déplacement</label>
</td>
</tr>
- <tr ng-repeat="group in parentsWriteRightGroups">
+ <tr ng-repeat="group in parentScopeValues.parentsWriteRightGroups" class="parentInfos">
<td>
- <span class="fa fa-users"></span> <em>{{group.fullPath}}</em>
+ <span class="fa fa-users"></span> {{group.fullPath}}
</td>
<td>
- <label><input type="checkbox"> Lecture</label>
- <label><input type="checkbox"> Écriture</label>
- <label><input type="checkbox"> Déplacement</label>
+ <label><input type="checkbox" disabled> Lecture</label>
+ <label><input type="checkbox" disabled> Écriture</label>
+ <label><input type="checkbox" disabled> Déplacement</label>
</td>
</tr>
</tbody>
@@ -633,22 +638,28 @@
</tbody>
</table>
- <div class="form-group">
- Nouveau utilisateur :
- <select ng-model="newWriteRightUser" ng-options="user as user.firstName + ' ' + user.lastName for user in users"></select>
- <a class="btn btn-success btn-xs" ng-click="addWriteRightUser()" ng-disabled="!newWriteRightUser">
- <span class="glyphicon glyphicon-plus"></span>
- </a>
+ <div class="form-inline">
+ <div class="form-group">
+ <label for="newRightUserField" class="control-label">Nouveau utilisateur :</label>
+ <select id="newRightUserField" class="form-control"
+ ng-model="newWriteRightUser" ng-options="user as user.firstName + ' ' + user.lastName for user in users">
+ </select>
+ <a class="btn btn-success btn-xs" ng-click="addWriteRightUser()" ng-disabled="!newWriteRightUser">
+ <span class="glyphicon glyphicon-plus"></span>
+ </a>
+ </div>
</div>
- <div class="form-group">
- Nouveau groupe :
- <select ng-model="newWriteRightGroup" ng-options="group as group.fullPath for group in groups">
- <option></option>
- </select>
- <a class="btn btn-success btn-xs" ng-click="addWriteRightGroup()" ng-disabled="!newWriteRightGroup">
- <span class="glyphicon glyphicon-plus"></span>
- </a>
+ <div class="form-inline">
+ <div class="form-group">
+ <label for="newRightGroupField" class="control-label">Nouveau groupe :</label>
+ <select id="newRightGroupField" class="form-control"
+ ng-model="newWriteRightGroup" ng-options="group as group.fullPath for group in groups">
+ </select>
+ <a class="btn btn-success btn-xs" ng-click="addWriteRightGroup()" ng-disabled="!newWriteRightGroup">
+ <span class="glyphicon glyphicon-plus"></span>
+ </a>
+ </div>
</div>
</div>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/css/faxtomail.css
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/css/faxtomail.css 2014-06-08 13:21:04 UTC (rev 150)
+++ trunk/faxtomail-ui-web/src/main/webapp/css/faxtomail.css 2014-06-08 14:30:45 UTC (rev 151)
@@ -39,6 +39,11 @@
font-style: italic;
}
+table tr.parentInfos td {
+ background-color: #F5F5F5;
+ font-style: italic;
+}
+
.angular-ui-tree-handle {
background: #f8faff;
border: 1px solid #dae2ea;
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 13:21:04 UTC (rev 150)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 14:30:45 UTC (rev 151)
@@ -227,9 +227,9 @@
*/
ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
- //{Array} Users
+ //{Array} All application users
$scope.users = ConfigurationData.users;
- // {Array} Groups
+ // {Array} All application groups
$scope.groups = ConfigurationData.groups;
// {Object} selected mail folder
$scope.selectedMailFolder;
@@ -241,6 +241,8 @@
$scope.newReplyDomain;
// {Array} Colonnes selectionnées pour le dossier courant
$scope.folderTableColumns;
+ // {Object} Global parent wide configuration and values
+ $scope.parentScopeValues;
// creation d'un nouveau noeud racine
$scope.newRoot = function() {
@@ -321,6 +323,82 @@
});
};
+ // on doit faire ca par l'ordre des watch angular et ne pas l'appeler dans le edit
+ // sinon, les champs $ ne sont pas valués
+ $scope.$watch("selectedMailFolder", function(newValue, oldValue) {
+ if (newValue) {
+ // initialise default values pour le noeud racines
+ if (!$scope.selectedMailFolder.$parent) {
+ $scope.selectedMailFolder.allowCreateDemandIntoFolder = $scope.selectedMailFolder.allowCreateDemandIntoFolder || false;
+ $scope.selectedMailFolder.allowMoveDemandIntoFolder = $scope.selectedMailFolder.allowMoveDemandIntoFolder || false;
+ $scope.selectedMailFolder.openAttachmentReportNoTaken = $scope.selectedMailFolder.openAttachmentReportNoTaken || false;
+ $scope.selectedMailFolder.printActionEqualTakeAction = $scope.selectedMailFolder.printActionEqualTakeAction || false;
+ $scope.selectedMailFolder.refuseMail = $scope.selectedMailFolder.refuseMail || false;
+ $scope.selectedMailFolder.rejectUnknownSender = $scope.selectedMailFolder.rejectUnknownSender || false;
+ }
+
+ // initilaisation des valeurs du parent
+ $scope.parentScopeValues = {
+ parentsReadRightUsers: [],
+ parentsReadRightGroups: [],
+ parentsWriteRightUsers: [],
+ parentsWriteRightGroups: [],
+ parentsMoveRightUsers: [],
+ parentsMoveRightGroups: []
+ };
+ updateParentScopeValues($scope.selectedMailFolder.$parent);
+ }
+ });
+
+ var updateParentScopeValues = function(folder) {
+ if (folder) {
+ // take current folder first before parent values (warn about 'undefined' and 'false')
+ if (angular.isUndefined($scope.parentScopeValues.allowCreateDemandIntoFolder)) {
+ $scope.parentScopeValues.allowCreateDemandIntoFolder = folder.allowCreateDemandIntoFolder;
+ }
+ if (angular.isUndefined($scope.parentScopeValues.allowMoveDemandIntoFolder)) {
+ $scope.parentScopeValues.allowMoveDemandIntoFolder = folder.allowMoveDemandIntoFolder;
+ }
+ if (angular.isUndefined($scope.parentScopeValues.openAttachmentReportNoTaken)) {
+ $scope.parentScopeValues.openAttachmentReportNoTaken = folder.openAttachmentReportNoTaken;
+ }
+ if (angular.isUndefined($scope.parentScopeValues.printActionEqualTakeAction)) {
+ $scope.parentScopeValues.printActionEqualTakeAction = folder.printActionEqualTakeAction;
+ }
+ if (angular.isUndefined($scope.parentScopeValues.refuseMail)) {
+ $scope.parentScopeValues.refuseMail = folder.refuseMail;
+ }
+ if (angular.isUndefined($scope.parentScopeValues.rejectUnknownSender)) {
+ $scope.parentScopeValues.rejectUnknownSender = folder.rejectUnknownSender;
+ }
+
+ // move to parent first to keed parent order for collection
+ if (folder.$parent) {
+ updateParentScopeValues(folder.$parent);
+ };
+
+ // manage rigths
+ if (folder.readRightUsers) {
+ $scope.parentScopeValues.parentsWriteRightUsers = $scope.parentScopeValues.parentsReadRightUsers.concat(folder.readRightUsers);
+ }
+ if (folder.readRightGroups) {
+ $scope.parentScopeValues.parentsWriteRightGroups = $scope.parentScopeValues.parentsReadRightGroups.concat(folder.readRightGroups);
+ }
+ if (folder.writeRightUsers) {
+ $scope.parentScopeValues.parentsWriteRightUsers = $scope.parentScopeValues.parentsWriteRightUsers.concat(folder.writeRightUsers);
+ }
+ if (folder.writeRightGroups) {
+ $scope.parentScopeValues.parentsWriteRightGroups = $scope.parentScopeValues.parentsWriteRightGroups.concat(folder.writeRightGroups);
+ }
+ if (folder.moveRightUsers) {
+ $scope.parentScopeValues.parentsMoveRightUsers = $scope.parentScopeValues.parentsMoveRightUsers.concat(folder.moveRightUsers);
+ }
+ if (folder.moveRightGroups) {
+ $scope.parentScopeValues.parentsMoveRightGroups = $scope.parentScopeValues.parentsMoveRightGroups.concat(folder.moveRightGroups);
+ }
+ }
+ };
+
// utilisé pour mettre à jour $scope.selectedMailFolder.folderTableColumns si $scope.folderTableColumns change
$scope.$watch("folderTableColumns", function(newValue, oldValue) {
if (newValue != oldValue) {
@@ -403,98 +481,32 @@
$scope.selectedMailFolder.folderActions.push(folderAction);
}
};
-}]);
-
-/**
- * Right accordion tab controller.
- */
-ConfigurationModule.controller('ConfigurationRigthsController', ['$scope', '$window', 'ConfigurationData',
- function($scope, $window, ConfigurationData) {
- // {Array} Parent folders write right users
- $scope.parentsWriteRightUsers;
- // {Array} Parent folders write rigth groups
- $scope.parentsWriteRightGroups;
-
- // action specific aux droits pour l'editions d'un dossier
- $scope.$watch("selectedMailFolder", function(newValue) {
- if (newValue) {
- if (!$scope.selectedMailFolder.writeRightUsers) {
- $scope.selectedMailFolder.writeRightUsers = [];
- }
- if (!$scope.selectedMailFolder.writeRightGroups) {
- $scope.selectedMailFolder.writeRightGroups = [];
- }
-
- // on exclut le dossier courant
- updateParentFolderRigths($scope.selectedMailFolder.$parent);
- }
- });
-
- // met à jour les listes des droits des dossiers parents
- var updateParentFolderRigths = function(folder) {
- $scope.parentsWriteRightUsers = [];
- $scope.parentsWriteRightGroups = [];
- recParentFolderRigths(folder);
- };
- var recParentFolderRigths = function(folder) {
- if (folder) {
- if (folder.$parent) {
- recParentFolderRigths(folder.$parent);
- };
- if (folder.writeRightUsers) {
- $scope.parentsWriteRightUsers = $scope.parentsWriteRightUsers.concat(folder.writeRightUsers);
- }
- if (folder.writeRightGroups) {
- $scope.parentsWriteRightGroups = $scope.parentsWriteRightGroups.concat(folder.writeRightGroups);
- }
- }
- };
-
- // add reply address
+
+ // add user write right
$scope.addWriteRightUser = function() {
$scope.selectedMailFolder.writeRightUsers.push($scope.newWriteRightUser);
delete $scope.newWriteRightUser;
};
- // remove customer responsible
+ // remove user write right
$scope.removeWriteRightUser = function(index) {
if ($window.confirm("Êtes-vous sur de vouloir supprimer les droits de cet utilisateur ?")) {
$scope.selectedMailFolder.writeRightUsers.splice(index, 1);
}
};
- // add reply address
+ // add group write right
$scope.addWriteRightGroup = function() {
$scope.selectedMailFolder.writeRightGroups.push($scope.newWriteRightGroup);
delete $scope.newWriteRightGroup;
};
- // remove customer responsible
+ // remove group write right
$scope.removeWriteRightGroup = function(index) {
if ($window.confirm("Êtes-vous sur de vouloir supprimer les droits de ce groupe ?")) {
$scope.selectedMailFolder.writeRightGroups.splice(index, 1);
}
};
-
- // selection/deselection d'un état d'attente possible pour ce dossier
- $scope.changeFolderEtatAttente = function(etatAttente) {
- var index = $scope.selectedMailFolder.etatAttente.indexOf(etatAttente);
- if (index != -1) {
- $scope.selectedMailFolder.etatAttente.splice(index, 1);
- } else {
- $scope.selectedMailFolder.etatAttente.push(etatAttente);
- }
- };
-
- // selection/deselection d'une action possible du menu contextuel pour ce dossier
- $scope.changeFolderAction = function(folderAction) {
- var index = $scope.selectedMailFolder.folderActions.indexOf(folderAction);
- if (index != -1) {
- $scope.selectedMailFolder.folderActions.splice(index, 1);
- } else {
- $scope.selectedMailFolder.folderActions.push(folderAction);
- }
- };
}]);
1
0
r150 - in trunk/faxtomail-ui-web/src/main/webapp: WEB-INF/content/admin js
by echatellier@users.forge.codelutin.com 08 Jun '14
by echatellier@users.forge.codelutin.com 08 Jun '14
08 Jun '14
Author: echatellier
Date: 2014-06-08 15:21:04 +0200 (Sun, 08 Jun 2014)
New Revision: 150
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/150
Log:
Fix charg?\195?\169s de clientelle
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-06-08 12:48:03 UTC (rev 149)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-08 13:21:04 UTC (rev 150)
@@ -321,12 +321,18 @@
</div>
<div class="form-group">
- <label for="ediFolderField">Dossier (FS) de dépôt des demandes EDI</label>
- <input type="text" class="form-control" id="ediFolderField" ng-model="selectedMailFolder.ediFolder">
+ <label for="ediFolderField">Dossier de dépôt des demandes EDI sur le serveur</label>
+ <div class="input-group">
+ <input type="text" class="form-control" id="ediFolderField" ng-model="selectedMailFolder.ediFolder">
+ <span class="input-group-addon btn btn-info" ng-disabled="selectedMailFolder.ediFolder"
+ tooltip="Fonctionnalité à venir">
+ <i class="fa fa-cogs"></i> Test
+ </span>
+ </div>
</div>
<div class="form-group">
- <label for="faxDomainField">Domaines des fax</label>
+ <label for="faxDomainField">Domaine des fax</label>
<input type="text" class="form-control" id="faxDomainField" ng-model="selectedMailFolder.faxDomain">
</div>
</div>
@@ -354,7 +360,7 @@
<tbody>
<tr ng-repeat="customerResponsible in selectedMailFolder.customerResponsibles">
<td>
- <span class="glyphicon glyphicon-user"></span>
+ <span class="fa fa-user"></span>
{{customerResponsible.firstName}} {{customerResponsible.lastName}}</td>
<td>
<a class="pull-right btn btn-danger btn-xs" ng-click="removeCustomerResponsible($index)">
@@ -362,13 +368,22 @@
</a>
</td>
</tr>
+ <tr ng-if="!selectedMailFolder.customerResponsibles || selectedMailFolder.customerResponsibles.length == 0">
+ <td colspan="2" class="emptyTable">Aucun chargé de clientelle défini</td>
+ </tr>
</tbody>
</table>
- Nouveau : <select ng-model="newCustomerResponsible" ng-options="user as user.firstName + ' ' + user.lastName for user in users"></select>
- <a class="btn btn-success btn-xs" ng-click="addCustomerResponsible()" ng-disabled="!newCustomerResponsible">
- <span class="glyphicon glyphicon-ok"></span>
- </a>
+ <div class="form-inline">
+ <div class="form-group">
+ <label for="newCustomerResponsibleField" class="control-label">Nouveau :</label>
+ <select id="newCustomerResponsibleField" class="form-control" ng-model="newCustomerResponsible"
+ ng-options="user as user.firstName + ' ' + user.lastName for user in users"></select>
+ </div>
+ <a class="btn btn-success btn-xs" ng-click="addCustomerResponsible()" ng-disabled="!newCustomerResponsible">
+ <span class="glyphicon glyphicon-plus"></span>
+ </a>
+ </div>
</div>
</div>
</div>
@@ -416,7 +431,7 @@
<input id="newAddressField" class="form-control" name="address" type="email" ng-model="newReplyAddress" placeholder="nom.prenom(a)franciaflex.fr" />
</div>
<a class="btn btn-success btn-xs" ng-click="addReplyAddress()" ng-disabled="!newReplyAddress">
- <span class="glyphicon glyphicon-ok"></span>
+ <span class="glyphicon glyphicon-plus"></span>
</a>
</div>
@@ -454,7 +469,7 @@
<input id="newDomainField" class="form-control" type="text" name="domain" ng-model="newReplyDomain" placeholder="franciaflex.fr" />
</div>
<a class="btn btn-success btn-xs" ng-click="addReplyDomain()" ng-disabled="!newReplyDomain">
- <span class="glyphicon glyphicon-ok"></span>
+ <span class="glyphicon glyphicon-plus"></span>
</a>
</div>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 12:48:03 UTC (rev 149)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 13:21:04 UTC (rev 150)
@@ -227,6 +227,10 @@
*/
ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
+ //{Array} Users
+ $scope.users = ConfigurationData.users;
+ // {Array} Groups
+ $scope.groups = ConfigurationData.groups;
// {Object} selected mail folder
$scope.selectedMailFolder;
// {String} add new customer responsible form value
@@ -347,7 +351,9 @@
// remove customer responsible
$scope.removeCustomerResponsible = function(index) {
- $scope.selectedMailFolder.customerResponsibles.splice(index, 1);
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce chargé de clientelle ?")) {
+ $scope.selectedMailFolder.customerResponsibles.splice(index, 1);
+ }
};
// add reply address
@@ -359,7 +365,9 @@
// remove customer responsible
$scope.removeReplyAddress = function(index) {
- $scope.selectedMailFolder.replyAddresses.splice(index, 1);
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer cette adresse ?")) {
+ $scope.selectedMailFolder.replyAddresses.splice(index, 1);
+ }
};
// add reply domain
@@ -371,7 +379,9 @@
// remove customer responsible
$scope.removeReplyDomain = function(index) {
- $scope.selectedMailFolder.replyDomains.splice(index, 1);
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce domaine ?")) {
+ $scope.selectedMailFolder.replyDomains.splice(index, 1);
+ }
};
// selection/deselection d'un état d'attente possible pour ce dossier
@@ -400,11 +410,6 @@
*/
ConfigurationModule.controller('ConfigurationRigthsController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
- // {Array} Users
- $scope.users = ConfigurationData.users;
- // {Array} Groups
- $scope.groups = ConfigurationData.groups;
-
// {Array} Parent folders write right users
$scope.parentsWriteRightUsers;
// {Array} Parent folders write rigth groups
1
0
08 Jun '14
Author: echatellier
Date: 2014-06-08 14:48:03 +0200 (Sun, 08 Jun 2014)
New Revision: 149
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/149
Log:
Fix license headers
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/LdapUser.java
trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/LdapServiceTest.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/AbstractFaxToMailJob.java
trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml
trunk/faxtomail-ui-web/src/main/webapp/js/select2sortable.js
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientService.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ClientService.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.services.service;
+/*
+ * #%L
+ * FaxToMail :: Service
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import com.franciaflex.faxtomail.persistence.entities.Client;
import com.franciaflex.faxtomail.persistence.entities.ClientTopiaDao;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.services.service;
+/*
+ * #%L
+ * FaxToMail :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/LdapUser.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/LdapUser.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/LdapUser.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.services.service.ldap;
+/*
+ * #%L
+ * FaxToMail :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import java.util.ArrayList;
import java.util.Collection;
Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/LdapServiceTest.java
===================================================================
--- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/LdapServiceTest.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/LdapServiceTest.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.services.service;
+/*
+ * #%L
+ * FaxToMail :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/LoadFolderEmailsAction.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.ui.swing.actions;
+/*
+ * #%L
+ * FaxToMail :: UI
+ * $Id:$
+ * $HeadURL:$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeListUI;
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/AbstractFaxToMailJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/AbstractFaxToMailJob.java 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/AbstractFaxToMailJob.java 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,5 +1,29 @@
package com.franciaflex.faxtomail.web.job;
+/*
+ * #%L
+ * FaxToMail :: Web
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import org.quartz.Job;
import org.quartz.JobExecutionContext;
Modified: trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties
===================================================================
--- trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,3 +1,26 @@
+###
+# #%L
+# FaxToMail :: Web
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2014 Franciaflex, Code Lutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-3.0.html>.
+# #L%
+###
# dev
disableCache=true
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ FaxToMail :: Web
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2014 Franciaflex, Code Lutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<groups xmlns="http://www.isdc.ro/wro">
<group name='webjar-select2' abstract="true">
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/select2sortable.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/select2sortable.js 2014-06-08 12:38:26 UTC (rev 148)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/select2sortable.js 2014-06-08 12:48:03 UTC (rev 149)
@@ -1,4 +1,4 @@
-/**
+/** %%Ignore-License
* Enhanced Select2 Dropmenus
*
* @AJAX Mode - When in this mode, your value will be an object (or array of objects) of the data used by Select2
1
0
r148 - in trunk: faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin faxtomail-ui-web/src/main/webapp/WEB-INF/decorators faxtomail-ui-web/src/main/webapp/js
by echatellier@users.forge.codelutin.com 08 Jun '14
by echatellier@users.forge.codelutin.com 08 Jun '14
08 Jun '14
Author: echatellier
Date: 2014-06-08 14:38:26 +0200 (Sun, 08 Jun 2014)
New Revision: 148
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/148
Log:
Modification des filtres et mail accounts
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationService.java
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationService.java 2014-06-08 10:56:31 UTC (rev 147)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationService.java 2014-06-08 12:38:26 UTC (rev 148)
@@ -50,6 +50,8 @@
import com.franciaflex.faxtomail.persistence.entities.MailFilterTopiaDao;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.services.FaxToMailServiceSupport;
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
@@ -133,13 +135,26 @@
}
/**
- * Return all email accounts.
+ * Return all email accounts (without password info).
*
* @return all email account
*/
public List<EmailAccount> getEmailAccounts() {
EmailAccountTopiaDao emailAccountTopiaDao = getPersistenceContext().getEmailAccountDao();
- return emailAccountTopiaDao.findAll();
+ List<EmailAccount> accounts = emailAccountTopiaDao.findAll();
+
+ // remove password information from bean
+ final Binder<EmailAccount, EmailAccount> binderEmailAccount = BinderFactory.newBinder(EmailAccount.class);
+ List<EmailAccount> result = Lists.transform(accounts, new Function<EmailAccount, EmailAccount>() {
+ @Override
+ public EmailAccount apply(EmailAccount input) {
+ EmailAccount account = new EmailAccountImpl();
+ binderEmailAccount.copyExcluding(input, account, EmailAccount.PROPERTY_PASSWORD);
+ return account;
+ }
+ });
+
+ return result;
}
/**
@@ -147,10 +162,10 @@
* @param newEmailAccounts new email account list to save
*/
public void saveEmailAccounts(List<EmailAccount> newEmailAccounts) {
- List<EmailAccount> emailAccounts = getEmailAccounts();
+ EmailAccountTopiaDao emailAccountTopiaDao = getPersistenceContext().getEmailAccountDao();
+ List<EmailAccount> emailAccounts = emailAccountTopiaDao.findAll();
Map<String, EmailAccount> emailAccountMap = new HashMap<>(Maps.uniqueIndex(emailAccounts, TopiaEntities.getTopiaIdFunction()));
Binder<EmailAccount, EmailAccount> binder = BinderFactory.newBinder(EmailAccount.class);
- EmailAccountTopiaDao emailAccountTopiaDao = getPersistenceContext().getEmailAccountDao();
for (EmailAccount newEmailAccount : newEmailAccounts) {
EmailAccount emailAccount;
@@ -159,12 +174,18 @@
} else {
emailAccount = new EmailAccountImpl();
}
-
+
binder.copyExcluding(newEmailAccount, emailAccount,
EmailAccount.PROPERTY_TOPIA_ID,
EmailAccount.PROPERTY_TOPIA_CREATE_DATE,
- EmailAccount.PROPERTY_TOPIA_VERSION);
-
+ EmailAccount.PROPERTY_TOPIA_VERSION,
+ EmailAccount.PROPERTY_PASSWORD);
+
+ // password is only present for new account (not for edited ones)
+ if (StringUtils.isNotEmpty(newEmailAccount.getPassword())) {
+ emailAccount.setPassword(newEmailAccount.getPassword());
+ }
+
if (emailAccount.isPersisted()) {
emailAccountTopiaDao.update(emailAccount);
} else {
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-06-08 10:56:31 UTC (rev 147)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-08 12:38:26 UTC (rev 148)
@@ -91,7 +91,6 @@
<tr>
<th>Extension</th>
<th>Commandes</th>
- <th>Suppr.</th>
</tr>
</thead>
<tbody>
@@ -100,29 +99,27 @@
<div class="form-group">
<input type="text" class="form-control" ng-model="extensionCommand.extension" size="5" placeholder="jpg" required>
</div>
+ <a class="pull-right btn btn-danger btn-xs " ng-click="deleteExtensionRow($index)" title="Supprimer l'extension">
+ <span class="glyphicon glyphicon-remove"></span></a>
</td>
<td>
<div class="form-group">
<label for="convertToToPdfField">Conversion en pdf :</label>
- <input id="convertToToPdfField" type="email" class="form-control" ng-model="extensionCommand.convertToPdfCommand" placeholder="" />
+ <input id="convertToToPdfField" type="text" class="form-control" ng-model="extensionCommand.convertToPdfCommand" placeholder="" />
</div>
<div class="form-group">
<label for="openAttachmentCommandField">Ouverture :</label>
- <input id="openAttachmentCommandField" type="email" class="form-control" ng-model="extensionCommand.openAttachmentCommand" placeholder="" />
+ <input id="openAttachmentCommandField" type="text" class="form-control" ng-model="extensionCommand.openAttachmentCommand" placeholder="" />
</div>
</td>
- <td>
- <a class="pull-right btn btn-danger btn-xs " ng-click="deleteExtensionRow($index)" title="Supprimer l'extension">
- <span class="glyphicon glyphicon-remove"></span></a>
- </td>
</tr>
<tr ng-if="!configuration.extensionCommands || configuration.extensionCommands.length == 0">
- <td colspan="3" class="emptyTable">Aucune extension définie</td>
+ <td colspan="2" class="emptyTable">Aucune extension définie</td>
</tr>
</tbody>
<tfoot>
<tr>
- <td colspan="3">
+ <td colspan="2">
<a class="pull-right btn btn-success btn-xs" ng-click="addExtensionRow()" >
<span class="glyphicon glyphicon-plus"></span> Ajouter une ligne</a>
</td>
@@ -489,13 +486,73 @@
</div>
</div>
</div>
-
+
+
<!-- Liste des emails expéditeur -->
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapse5">
+ Actions possibles du menu contextuel pour ce dossier
+ </a>
+ </h4>
+ </div>
+ <div id="collapse5" class="panel-collapse collapse">
+ <div class="panel-body">
+ <label class="checkbox" ng-repeat="(folderAction,label) in folderActions">
+ <input type="checkbox" ng-checked="selectedMailFolder.folderActions.indexOf(folderAction) != -1"
+ ng-click="changeFolderAction(folderAction)"> {{label}}
+ </label>
+ </div>
+ </div>
+ </div>
+
+ <!-- configuration des colonnes a afficher -->
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapse6">
+ Configuration des colonnes à afficher
+ </a>
+ </h4>
+ </div>
+ <div id="collapse6" class="panel-collapse collapse">
+ <div class="panel-body">
+
+ <label>
+ <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelTableColumns" ng-value="true" /> Définir un ordre
+ différent du dossier parent à ce niveau.</label>
+ <hr />
+
+ <div class="control-group">
+ <label class="control-label" for="tableColumns">Champs à afficher dans le tableau (l'ordre peut être changé en faisant un glisser/déposer sur les champs)</label>
+
+ <div class="controls">
+ <input type="hidden" ui-select2-sortable ng-model="folderTableColumns"
+ simple-query="getObjectsData" multiple sortable ng-disabled="!selectedMailFolder.useCurrentLevelTableColumns">
+ </div>
+ </div>
+
+ <div>
+ <table id='table-snapshot' class="table table-bordered">
+ <caption>Aperçu</caption>
+ <thead>
+ <tr>
+ <th ng-repeat="etatAttenteField in folderTableColumns">{{mailFields[etatAttenteField.id]}}</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Droits -->
<div class="panel panel-default" ng-controller="ConfigurationRigthsController">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse4">
- Groupes/personnes ayant droit d'écriture sur le dossier
+ Droits
</a>
</h4>
</div>
@@ -581,65 +638,6 @@
</div>
</div>
</div>
-
- <!-- Liste des emails expéditeur -->
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse5">
- Actions possibles du menu contextuel pour ce dossier
- </a>
- </h4>
- </div>
- <div id="collapse5" class="panel-collapse collapse">
- <div class="panel-body">
- <label class="checkbox" ng-repeat="(folderAction,label) in folderActions">
- <input type="checkbox" ng-checked="selectedMailFolder.folderActions.indexOf(folderAction) != -1"
- ng-click="changeFolderAction(folderAction)"> {{label}}
- </label>
- </div>
- </div>
- </div>
-
- <!-- configuration des colonnes a afficher -->
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse6">
- Configuration des colonnes à afficher
- </a>
- </h4>
- </div>
- <div id="collapse6" class="panel-collapse collapse">
- <div class="panel-body">
-
- <label>
- <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelTableColumns" ng-value="true" /> Définir un ordre
- différent du dossier parent à ce niveau.</label>
- <hr />
-
- <div class="control-group">
- <label class="control-label" for="tableColumns">Champs à afficher dans le tableau (l'ordre peut être changé en faisant un glisser/déposer sur les champs)</label>
-
- <div class="controls">
- <input type="hidden" ui-select2-sortable ng-model="folderTableColumns"
- simple-query="getObjectsData" multiple sortable ng-disabled="!selectedMailFolder.useCurrentLevelTableColumns">
- </div>
- </div>
-
- <div>
- <table id='table-snapshot' class="table table-bordered">
- <caption>Aperçu</caption>
- <thead>
- <tr>
- <th ng-repeat="etatAttenteField in folderTableColumns">{{mailFields[etatAttenteField.id]}}</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </div>
</div>
</div>
</div>
@@ -666,11 +664,11 @@
<th/>
</tr>
</thead>
- <tbody ui-sortable ng-model="mailFilters">
- <tr ng-repeat="mailFilter in mailFilters|filter:subFolderFilter(mailFolder)">
+ <tbody ui-sortable="sortableOptions" ng-model="rootFolderMailFilters[mailFolder.topiaId]">
+ <tr ng-repeat="mailFilter in rootFolderMailFilters[mailFolder.topiaId]">
<td>{{mailFilter.expression}}</td>
<td>{{mailFilter.mailFolder.$fullPath}}</td>
- <td><a class="btn btn-danger btn-xs" ng-click="removeFilter(mailFilter)">
+ <td><a class="btn btn-danger btn-xs" ng-click="removeFilter(mailFolder, mailFilter)">
<span class="glyphicon glyphicon-remove"></span>
</a></td>
</tr>
@@ -687,7 +685,7 @@
<select class="form-control" ng-model="newFilter.mailFolder" ng-options="mailFolder.$fullPath for mailFolder in flatMailFolders[mailFolder.topiaId]"></select>
</div>
</div>
- <button type="button" class="btn btn-success" ng-disabled="!newFilter.expression || !newFilter.mailFolder" ng-click="addNewFilter()">
+ <button type="button" class="btn btn-success" ng-disabled="!newFilter.expression || !newFilter.mailFolder" ng-click="addNewFilter(mailFolder)">
<i class="glyphicon glyphicon-plus"></i> Ajouter
</button>
</div>
@@ -728,7 +726,6 @@
<th>Serveur</th>
<th>Port</th>
<th>Utilisateur</th>
- <th>Mot de passe</th>
<th/>
</tr>
</thead>
@@ -738,7 +735,6 @@
<td>{{emailAccount.host}}</td>
<td>{{emailAccount.port}}</td>
<td>{{emailAccount.login}}</td>
- <td>{{emailAccount.password}}</td>
<td>
<a class="btn btn-danger btn-xs" ng-click="removeEmailAccount($index)">
<span class="glyphicon glyphicon-remove"></span>
@@ -761,7 +757,7 @@
ng-class="{'has-error': addEmailAccountForm.newAccountPort.$dirty && addEmailAccountForm.newAccountPort.$invalid,
'has-success': addEmailAccountForm.newAccountPort.$dirty && addEmailAccountForm.newAccountPort.$valid}">
<label for="emailAccountPort" class="control-label">Port:</label>
- <input id="emailAccountPort" name="newAccountPort" type="text" class="form-control" ng-model="newAccount.port" ng-pattern="/^\d+$/" ng-minlength="1" />
+ <input id="emailAccountPort" name="newAccountPort" type="text" class="form-control" ng-model="newAccount.port" ng-pattern="/^\d+$/" />
</div>
<div class="form-group col-xs-2">
<label for="emailAccountUser" class="control-label">Utilisateur:</label>
@@ -769,12 +765,16 @@
</div>
<div class="form-group col-xs-2">
<label for="emailAccountPassword" class="control-label">Mot de passe:</label>
- <input id="emailAccountPassword" type="text" class="form-control" ng-model="newAccount.password">
+ <input id="emailAccountPassword" type="password" class="form-control" ng-model="newAccount.password">
</div>
- <div class="form-group col-xs-1">
+ <div class="form-group col-xs-2">
<br />
+ <button type="button" class="btn btn-info" ng-disabled="!newAccount.host || !newAccount.port || addEmailAccountForm.$invalid"
+ tooltip="Fonctionnalité à venir">
+ <i class="fa fa-cogs"></i> Test
+ </button>
<button type="button" class="btn btn-success" ng-disabled="!newAccount.host || !newAccount.port || addEmailAccountForm.$invalid" ng-click="addEmailAccount()">
- <i class="glyphicon glyphicon-plus"></i> Ajouter
+ <i class="fa fa-plus"></i> Ajouter
</button>
</div>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-06-08 10:56:31 UTC (rev 147)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-06-08 12:38:26 UTC (rev 148)
@@ -58,13 +58,13 @@
<nav class="collapse navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
<li><a href="<s:url action='ldap-input' namespace="/admin" />">
- <span class="glyphicon glyphicon-retweet"></span> Ldap</a></li>
+ <span class="fa fa-database"></span> Ldap</a></li>
<li><a href="<s:url action='configuration-input' namespace="/admin" />">
- <span class="glyphicon glyphicon-cog"></span> Configuration</a></li>
+ <span class="fa fa-cog"></span> Configuration</a></li>
<li><a href="<s:url action='import-input' namespace="/admin" />">
- <span class="glyphicon glyphicon-upload"></span> Import</a></li>
+ <span class="fa fa-upload"></span> Import</a></li>
<li><a href="<s:url action='user-folder-input' namespace="/admin" />">
- <span class="glyphicon glyphicon-th-list"></span> Dossiers utilisateur</a></li>
+ <span class="fa fa-folder-open"></span> Dossiers utilisateur</a></li>
</ul>
</nav>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 10:56:31 UTC (rev 147)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 12:38:26 UTC (rev 148)
@@ -460,7 +460,6 @@
// add reply address
$scope.addWriteRightGroup = function() {
- console.log("dd")
$scope.selectedMailFolder.writeRightGroups.push($scope.newWriteRightGroup);
delete $scope.newWriteRightGroup;
};
@@ -501,47 +500,71 @@
function($scope, $window, ConfigurationData) {
//{Array} Current mail filter list
$scope.mailFilters = ConfigurationData.mailFilters;
+ //{Map} Folder mail fiters
+ $scope.rootFolderMailFilters = {};
//{Object} New accout empty filter
$scope.newFilter = {};
// replace filter instance with mailFolder filter instance to use same objects
- angular.forEach($scope.mailFilters, function(filter) {
- // root folder
- angular.forEach($scope.mailFolders, function(mailFolder) {
- if (mailFolder.topiaId == filter.mailFolder.topiaId) {
- filter.mailFolder = mailFolder;
- } else {
+ var updateMetaFilter = function() {
+ angular.forEach($scope.mailFilters, function(filter) {
+ // root folder
+ angular.forEach($scope.mailFolders, function(mailFolder) {
+ if (!$scope.rootFolderMailFilters.hasOwnProperty(mailFolder.topiaId)) {
+ $scope.rootFolderMailFilters[mailFolder.topiaId] = [];
+ }
angular.forEach($scope.flatMailFolders[mailFolder.topiaId], function(subFolder) {
if (subFolder.topiaId == filter.mailFolder.topiaId) {
filter.mailFolder = subFolder;
+
+ $scope.rootFolderMailFilters[subFolder.$rootFolder.topiaId].push(filter);
}
});
- }
+ });
});
+ };
+ // update when root folder collection changes (and for init)
+ $scope.$watchCollection("mailFolders", function(news, olds) {
+ console.log("Udpate MetaFilter");
+ $scope.rootFolderMailFilters = {};
+ updateMetaFilter();
});
+ // option de la configuration 'sortable'
+ $scope.sortableOptions = {
+ stop: function(e, ui) {
+ $scope.mailFilters = [];
+ // update global $scope.mailFilters list
+ angular.forEach($scope.rootFolderMailFilters, function(folderFilters, rootFolderId) {
+ $scope.mailFilters = $scope.mailFilters.concat(folderFilters);
+ });
+ }
+ };
+
// add new filter action
- $scope.addNewFilter = function() {
+ $scope.addNewFilter = function(rootMailFolder) {
$scope.mailFilters.push($scope.newFilter);
-
+ $scope.rootFolderMailFilters[rootMailFolder.topiaId].push($scope.newFilter);
// clear form
$scope.newFilter = {};
};
// remove filter
- $scope.removeFilter = function(filter) {
- if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce filter ?")) {
+ $scope.removeFilter = function(rootMailFolder, filter) {
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce filtre ?")) {
var index = $scope.mailFilters.indexOf(filter);
$scope.mailFilters.splice(index, 1);
+ var index2 = $scope.rootFolderMailFilters[rootMailFolder.topiaId].indexOf(filter);
+ $scope.rootFolderMailFilters[rootMailFolder.topiaId].splice(index2, 1);
}
};
// define angular filter used to group mailFilters by rootFolders
- $scope.subFolderFilter = function(mailFolder) {
+ /*$scope.subFolderFilter = function(mailFolder) {
return function(item) {
return item.mailFolder == mailFolder || item.mailFolder.$rootFolder == mailFolder;
};
- };
+ };*/
}]);
1
0
r147 - in trunk: . faxtomail-ui-web faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web faxtomail-ui-web/src/main/resources faxtomail-ui-web/src/main/webapp/WEB-INF faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin faxtomail-ui-web/src/main/webapp/WEB-INF/decorators
by echatellier@users.forge.codelutin.com 08 Jun '14
by echatellier@users.forge.codelutin.com 08 Jun '14
08 Jun '14
Author: echatellier
Date: 2014-06-08 12:56:31 +0200 (Sun, 08 Jun 2014)
New Revision: 147
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/147
Log:
Update wro config.
Removed:
trunk/faxtomail-ui-web/src/main/resources/shiro.ini
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/version.jsp
Modified:
trunk/faxtomail-ui-web/pom.xml
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java
trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml
trunk/pom.xml
Modified: trunk/faxtomail-ui-web/pom.xml
===================================================================
--- trunk/faxtomail-ui-web/pom.xml 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/pom.xml 2014-06-08 10:56:31 UTC (rev 147)
@@ -149,21 +149,11 @@
<artifactId>struts2-convention-plugin</artifactId>
</dependency>
- <!-- <dependency>
- <groupId>org.apache.struts</groupId>
- <artifactId>struts2-json-plugin</artifactId>
- </dependency> -->
-
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
</dependency>
- <!-- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- </dependency> -->
-
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
@@ -218,25 +208,35 @@
<artifactId>nuiton-js-wro</artifactId>
</dependency>
-
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>bootstrap</artifactId>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery-ui</artifactId>
+ </dependency>
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>jquery</artifactId>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>select2</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>jquery</artifactId>
+ <groupId>org.webjars</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
+ <groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-angularjs</artifactId>
- <groupId>org.nuiton.js</groupId>
</dependency>
<dependency>
@@ -245,14 +245,41 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-font-awesome</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.webjars</groupId>
<artifactId>angular-ui-bootstrap</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>bootstrap</artifactId>
+ <groupId>org.webjars</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angular-ui-sortable</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>jquery-ui</artifactId>
+ <groupId>org.webjars</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
+
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-html5shiv</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>respond</artifactId>
+ </dependency>
</dependencies>
<build>
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java 2014-06-08 10:56:31 UTC (rev 147)
@@ -34,8 +34,6 @@
import com.franciaflex.faxtomail.FaxToMailConfiguration;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailEntityEnum;
-import com.franciaflex.faxtomail.persistence.entities.MailFilter;
-import com.franciaflex.faxtomail.persistence.entities.MailFilterAbstract;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.persistence.entities.MailFolderAbstract;
import com.franciaflex.faxtomail.web.json.HibernateProxyTypeAdapter;
@@ -50,7 +48,7 @@
import com.opensymphony.xwork2.ActionSupport;
@Results({
- @Result(name="login", type="redirectAction", params = { "actionName", "login!input", "namespace", "/authentication"})
+ @Result(name="login", type="redirectAction", params = { "actionName", "login-input", "namespace", "/authentication"})
})
public class FaxToMailActionSupport extends ActionSupport {
@@ -62,7 +60,7 @@
protected FaxToMailConfiguration applicationConfig;
- private FaxToMailSession session;
+ protected FaxToMailSession session;
protected Gson gson;
@@ -86,14 +84,6 @@
return true;
}
- /*public String translateEnum(Class cl, String name) {
- return t(cl.getName() + "." + name);
- }
-
- public String translateEnum(Enum en) {
- return translateEnum(en.getClass(), en.name());
- }*/
-
public String getId(TopiaEntity entity) {
String id = "";
@@ -105,10 +95,6 @@
}
- public String getInstanceDisclaimer() {
- return applicationConfig.getInstanceDisclaimer();
- }
-
public void setSession(FaxToMailSession session) {
this.session = session;
}
Modified: trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties
===================================================================
--- trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/resources/nuiton-js.properties 2014-06-08 10:56:31 UTC (rev 147)
@@ -2,9 +2,11 @@
# dev
disableCache=true
minimize=false
-#preProcessors=forceCssDataUri,cssUrlRewriting,cssImport,semicolonAppender
-#postProcessors=cssVariables
+preProcessors=forceCssDataUri,cssUrlRewriting,cssImport,semicolonAppender
+postProcessors=cssVariables
# prod
#disableCache=false
#minimize=true
+#preProcessors=cssUrlRewriting,cssImport,semicolonAppender,cssMinJawr
+#postProcessors=cssVariables,jsMin
Deleted: trunk/faxtomail-ui-web/src/main/resources/shiro.ini
===================================================================
--- trunk/faxtomail-ui-web/src/main/resources/shiro.ini 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/resources/shiro.ini 2014-06-08 10:56:31 UTC (rev 147)
@@ -1,37 +0,0 @@
-[main]
-# URL vers laquelle il faut rediriger si l'utilisateur n'est pas authentifié
-authc.loginUrl = /authentication/login!input.action
-
-# dans le formulaire d'authentifaction, le champs contenant le username s'appelle "email"
-authc.usernameParam = email
-# authc.passwordParam = password
-
-# on utilise un cache dans notre implémentation du Realm, il faut le configurer
-cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
-securityManager.cacheManager = $cacheManager
-
-# on indique notre implémentation du realm
-# extranetEncAhiRealm = fr.gouv.social.encahi.extranet.web.ExtranetEncAhiRealm
-
-# on l'indique comme seul realm à utiliser
-# securityManager.realms = $extranetEncAhiRealm
-
-[urls]
-
-# on doit pouvoir accéder à ces pages sans être authentifié
-/authentication/login* = anon
-/authentication/forgotten-password-* = anon
-/authentication/registration* = anon
-
-# on donne accès aux ressource statiques
-/css/** = anon
-/data/** = anon
-/font/** = anon
-/img/** = anon
-/js/** = anon
-/struts/js/** = anon
-/struts/themes/** = anon
-/struts/bootstrap/** = anon
-
-# pour tout le reste, il faut être authentifié
-#/** = authc
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-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-08 10:56:31 UTC (rev 147)
@@ -476,7 +476,7 @@
<div id="collapse3" class="panel-collapse collapse">
<div class="panel-body">
<label>
- <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelEtatAttente" ng-value="false" />
+ <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelEtatAttente" ng-value="true" />
Redéfinir les états d'attente à ce niveau.
</label>
Dans le cas contraires, les états d'attentes des dossiers parents seront pris en compte.
@@ -507,67 +507,56 @@
<tr>
<th>Utilisateur ou groupe</th>
<th>Droits</th>
- <th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="user in parentsWriteRightUsers">
<td>
- <span class="glyphicon glyphicon-arrow-up"></span> <em>{{user.firstName}} {{user.lastName}}</em>
+ <span class="fa fa-user"></span> <em>{{user.firstName}} {{user.lastName}}</em>
</td>
<td>
<label><input type="checkbox"> Lecture</label>
<label><input type="checkbox"> Écriture</label>
<label><input type="checkbox"> Déplacement</label>
</td>
- <td>
-
- </td>
</tr>
<tr ng-repeat="group in parentsWriteRightGroups">
<td>
- <span class="glyphicon glyphicon-arrow-up"></span> <em>{{group.fullPath}}</em>
+ <span class="fa fa-users"></span> <em>{{group.fullPath}}</em>
</td>
<td>
<label><input type="checkbox"> Lecture</label>
<label><input type="checkbox"> Écriture</label>
<label><input type="checkbox"> Déplacement</label>
</td>
- <td>
-
- </td>
</tr>
</tbody>
<tbody>
<tr ng-repeat="user in selectedMailFolder.writeRightUsers">
<td>
- <span class="glyphicon glyphicon-user"></span> {{user.firstName}} {{user.lastName}}
+ <span class="fa fa-user"></span> {{user.firstName}} {{user.lastName}}
+ <a class="pull-right btn btn-danger btn-xs pull-right" ng-click="removeWriteRightUser($index)">
+ <span class="glyphicon glyphicon-remove"></span>
+ </a>
</td>
<td>
<label><input type="checkbox"> Lecture</label>
<label><input type="checkbox"> Écriture</label>
<label><input type="checkbox"> Déplacement</label>
</td>
+ </tr>
+ <tr ng-repeat="group in selectedMailFolder.writeRightGroups">
<td>
- <a class="pull-right btn btn-danger btn-xs" ng-click="removeWriteRightUser($index)">
+ <span class="fa fa-users"></span> {{group.fullPath}}
+ <a class="pull-right btn btn-danger btn-xs pull-right" ng-click="removeWriteRightGroup($index)">
<span class="glyphicon glyphicon-remove"></span>
</a>
</td>
- </tr>
- <tr ng-repeat="group in selectedMailFolder.writeRightGroups">
<td>
- <span class="glyphicon glyphicon-folder-open"></span> {{group.fullPath}}
- </td>
- <td>
<label><input type="checkbox"> Lecture</label>
<label><input type="checkbox"> Écriture</label>
<label><input type="checkbox"> Déplacement</label>
</td>
- <td>
- <a class="pull-right btn btn-danger btn-xs" ng-click="removeWriteRightGroup($index)">
- <span class="glyphicon glyphicon-remove"></span>
- </a>
- </td>
</tr>
</tbody>
</table>
@@ -576,7 +565,7 @@
Nouveau utilisateur :
<select ng-model="newWriteRightUser" ng-options="user as user.firstName + ' ' + user.lastName for user in users"></select>
<a class="btn btn-success btn-xs" ng-click="addWriteRightUser()" ng-disabled="!newWriteRightUser">
- <span class="glyphicon glyphicon-ok"></span>
+ <span class="glyphicon glyphicon-plus"></span>
</a>
</div>
@@ -586,7 +575,7 @@
<option></option>
</select>
<a class="btn btn-success btn-xs" ng-click="addWriteRightGroup()" ng-disabled="!newWriteRightGroup">
- <span class="glyphicon glyphicon-ok"></span>
+ <span class="glyphicon glyphicon-plus"></span>
</a>
</div>
</div>
@@ -623,27 +612,33 @@
</div>
<div id="collapse6" class="panel-collapse collapse">
<div class="panel-body">
+
+ <label>
+ <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelTableColumns" ng-value="true" /> Définir un ordre
+ différent du dossier parent à ce niveau.</label>
+ <hr />
+
<div class="control-group">
<label class="control-label" for="tableColumns">Champs à afficher dans le tableau (l'ordre peut être changé en faisant un glisser/déposer sur les champs)</label>
<div class="controls">
<input type="hidden" ui-select2-sortable ng-model="folderTableColumns"
- simple-query="getObjectsData" multiple sortable>
+ simple-query="getObjectsData" multiple sortable ng-disabled="!selectedMailFolder.useCurrentLevelTableColumns">
</div>
-
- <div>
- <table id='table-snapshot' class="table table-bordered">
- <caption>Aperçu</caption>
- <thead>
- <tr>
- <th ng-repeat="etatAttenteField in folderTableColumns">{{mailFields[etatAttenteField.id]}}</th>
- </tr>
- </thead>
- </table>
</div>
+
+ <div>
+ <table id='table-snapshot' class="table table-bordered">
+ <caption>Aperçu</caption>
+ <thead>
+ <tr>
+ <th ng-repeat="etatAttenteField in folderTableColumns">{{mailFields[etatAttenteField.id]}}</th>
+ </tr>
+ </thead>
+ </table>
+ </div>
</div>
</div>
- </div>
</div>
</div>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-06-08 10:56:31 UTC (rev 147)
@@ -24,17 +24,20 @@
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sb" uri="/struts-bootstrap-tags" %>
-<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<html>
<head>
+ <meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
<title>FaxToMail : <decorator:title default="FaxToMail"/></title>
- <sj:head locale="fr" jqueryui="true" loadAtOnce='true' jquerytheme="start" />
- <sb:head />
<link rel="stylesheet" type="text/css" href="<s:url value='/nuiton-js/faxtomail.css' />" />
<script type="text/javascript" src="<s:url value='/nuiton-js/faxtomail.js' />"></script>
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script type="text/javascript" src="<s:url value='/nuiton-js/faxtomail-ie8.js' />"></script>
+ <![endif]-->
<decorator:head/>
</head>
@@ -71,14 +74,5 @@
</div>
</div>
</div>
-
- <s:if test="%{instanceDisclaimer != null}">
- <div id="instance-disclaimer">
- <div>
- <s:property value="instanceDisclaimer" />
- </div>
- </div>
- </s:if>
-
</body>
</html>
Deleted: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/version.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/version.jsp 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/version.jsp 2014-06-08 10:56:31 UTC (rev 147)
@@ -1,25 +0,0 @@
-<%--
- #%L
- FaxToMail :: Web
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2014 Franciaflex, Code Lutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- --%>
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
-${project.version}
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-06-08 10:56:31 UTC (rev 147)
@@ -7,43 +7,54 @@
</group>
<group name='webjar-angular-ui-sortable' abstract="true">
- <group-ref>angular</group-ref>
<js>classpath:META-INF/resources/webjars/angular-ui-sortable/0.12.2/sortable.min.js</js>
</group>
<group name='webjar-angular-ui-bootstrap' abstract="true">
- <!-- do not include bootstrap here : done by struts -->
+ <group-ref>bootstrap</group-ref>
<group-ref>angular</group-ref>
<js>classpath:META-INF/resources/webjars/angular-ui-bootstrap/0.11.0/ui-bootstrap.js</js>
<js>classpath:META-INF/resources/webjars/angular-ui-bootstrap/0.11.0/ui-bootstrap-tpls.js</js>
</group>
<group name='select2sortable' abstract="true">
- <group-ref>angular</group-ref>
<group-ref>webjar-select2</group-ref>
<js>/js/select2sortable.js</js>
</group>
-
+ <group name='webjar-respond' abstract="true">
+ <js>classpath:META-INF/resources/webjars/respond/1.4.2/src/respond.js</js>
+ </group>
-
+
<group name='faxtomail'>
+ <group-ref>jquery</group-ref>
+ <group-ref>jquery-ui</group-ref>
+ <group-ref>bootstrap</group-ref>
<group-ref>angular</group-ref>
<group-ref>webjar-angular-ui-bootstrap</group-ref>
+ <group-ref>angular-ui-tree</group-ref>
+ <group-ref>font-awesome</group-ref>
<js>/js/faxtomail.js</js>
</group>
+ <group name='faxtomail-ie8'>
+ <group-ref>html5shiv</group-ref>
+ <group-ref>webjar-respond</group-ref>
+ </group>
+
<group name='faxtomail-configuration'>
<group-ref>select2sortable</group-ref>
<group-ref>webjar-angular-ui-sortable</group-ref>
- <group-ref>angular-ui-tree</group-ref>
+ <group-ref>font-awesome</group-ref>
<js>/js/configuration.js</js>
<css>/css/faxtomail.css</css>
</group>
<group name='faxtomail-user-folder'>
<group-ref>select2sortable</group-ref>
+ <group-ref>font-awesome</group-ref>
<js>/js/user-folder.js</js>
<css>/css/faxtomail.css</css>
</group>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-06-06 16:26:07 UTC (rev 146)
+++ trunk/pom.xml 2014-06-08 10:56:31 UTC (rev 147)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>5.0.8</version>
+ <version>5.0.9</version>
</parent>
<groupId>com.franciaflex</groupId>
@@ -528,21 +528,22 @@
<version>1.7.5</version>
<scope>runtime</scope>
</dependency>
-
+
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>angular-ui-utils</artifactId>
- <version>0.1.1</version>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery</artifactId>
+ <version>1.11.1-1</version>
<scope>runtime</scope>
- <exclusions>
- <exclusion>
- <artifactId>angularjs</artifactId>
- <groupId>org.webjars</groupId>
- </exclusion>
- </exclusions>
</dependency>
-
+
<dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-bootstrap</artifactId>
+ <version>3.1.1-2-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.webjars</groupId>
<artifactId>angular-ui-sortable</artifactId>
<version>0.12.2</version>
@@ -563,44 +564,52 @@
</dependency>
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>bootstrap</artifactId>
- <version>3.1.1-1</version>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery-ui</artifactId>
+ <version>1.10.4-1</version>
<scope>runtime</scope>
</dependency>
-
+
<dependency>
<groupId>org.webjars</groupId>
- <artifactId>jquery</artifactId>
- <version>1.11.1</version>
+ <artifactId>select2</artifactId>
+ <version>3.4.8-1</version>
<scope>runtime</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-angularjs</artifactId>
+ <version>1.2.17-1-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>select2</artifactId>
- <version>3.4.8-1</version>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-font-awesome</artifactId>
+ <version>4.1.0-1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
- <artifactId>nuiton-js-angularjs</artifactId>
<groupId>org.nuiton.js</groupId>
- <version>1.2.16-1</version>
+ <artifactId>nuiton-js-html5shiv</artifactId>
+ <version>3.7.2-1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>respond</artifactId>
+ <version>1.4.2</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-angular-ui-tree</artifactId>
<version>2.1.4-1</version>
<scope>runtime</scope>
- <exclusions>
- <exclusion>
- <artifactId>nuiton-js-angularjs</artifactId>
- <groupId>org.nuiton.js</groupId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
1
0
r146 - in trunk: faxtomail-persistence/src/main/xmi faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande
by echatellier@users.forge.codelutin.com 06 Jun '14
by echatellier@users.forge.codelutin.com 06 Jun '14
06 Jun '14
Author: echatellier
Date: 2014-06-06 18:26:07 +0200 (Fri, 06 Jun 2014)
New Revision: 146
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/146
Log:
Update model to move classes and association
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestData.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-06-06 16:25:02 UTC (rev 145)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-06-06 16:26:07 UTC (rev 146)
@@ -208,7 +208,7 @@
FaxToMailUser.PROPERTY_FIRST_NAME, "Marc",
FaxToMailUser.PROPERTY_LOGIN, "mlefebvre",
FaxToMailUser.PROPERTY_TRIGRAPH, "MLE",
- FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
+ FaxToMailUser.PROPERTY_USER_GROUPS, Collections.singletonList(commerciaux));
FaxToMailUser cyril = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Baillet",
FaxToMailUser.PROPERTY_FIRST_NAME, "Cyril",
FaxToMailUser.PROPERTY_LOGIN, "cbaillet",
@@ -217,7 +217,7 @@
FaxToMailUser.PROPERTY_FIRST_NAME, "Frédéric",
FaxToMailUser.PROPERTY_LOGIN, "fviala",
FaxToMailUser.PROPERTY_TRIGRAPH, "FVI",
- FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
+ FaxToMailUser.PROPERTY_USER_GROUPS, Collections.singletonList(commerciaux));
FaxToMailUser claire = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Marquis",
FaxToMailUser.PROPERTY_FIRST_NAME, "Claire",
FaxToMailUser.PROPERTY_LOGIN, "cmarquis",
@@ -230,7 +230,7 @@
FaxToMailUser.PROPERTY_FIRST_NAME, "Jeanne",
FaxToMailUser.PROPERTY_LOGIN, "jbourgoin",
FaxToMailUser.PROPERTY_TRIGRAPH, "JBO",
- FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
+ FaxToMailUser.PROPERTY_USER_GROUPS, Collections.singletonList(commerciaux));
MailFolderTopiaDao folderDao = getPersistenceContext().getMailFolderDao();
Map<String, MailFolder> folders = new HashMap<>();
@@ -258,7 +258,7 @@
Collections.shuffle(etatAttentes);
MailFolder sav = folderDao.create(MailFolder.PROPERTY_NAME, "SAV",
MailFolder.PROPERTY_PARENT, franciaflex,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
franciaflex.addChildren(sav);
folders.put("SAV", sav);
@@ -266,7 +266,7 @@
Collections.shuffle(etatAttentes);
MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril",
MailFolder.PROPERTY_PARENT, chargesClientelle,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
chargesClientelle.addChildren(cyrilFolder);
folders.put("Cyril", cyrilFolder);
@@ -278,7 +278,7 @@
Collections.shuffle(etatAttentes);
MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe",
MailFolder.PROPERTY_PARENT, chargesClientelle,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(0, random.nextInt(etatAttenteSize - 8) + 2));
chargesClientelle.addChildren(agatheFolder);
folders.put("Agathe", agatheFolder);
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java 2014-06-06 16:25:02 UTC (rev 145)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java 2014-06-06 16:26:07 UTC (rev 146)
@@ -151,11 +151,11 @@
FaxToMailUser.PROPERTY_TOPIA_ID,
FaxToMailUser.PROPERTY_TOPIA_CREATE_DATE,
FaxToMailUser.PROPERTY_TOPIA_VERSION,
- FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP);
+ FaxToMailUser.PROPERTY_USER_GROUPS);
// manage user group
Collection<String> groups = ldapUser.getGroups();
- user.clearFaxToMailUserGroup();
+ user.clearUserGroups();
for (String group : groups) {
String groupPath = getGroupFullPath(group);
String groupName = StringUtils.substringAfterLast(groupPath, "/");
@@ -165,7 +165,7 @@
FaxToMailUserGroup.PROPERTY_NAME, groupName,
FaxToMailUserGroup.PROPERTY_FULL_PATH, groupPath);
}
- user.addFaxToMailUserGroup(userGroup);
+ user.addUserGroups(userGroup);
}
// persist user
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-06-06 16:25:02 UTC (rev 145)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/MailFolderService.java 2014-06-06 16:26:07 UTC (rev 146)
@@ -166,7 +166,7 @@
protected Collection<MailFolder> getFoldersWithEtatAttente(MailFolder folder,
Collection<EtatAttente> parentEtatAttente,
EtatAttente etatAttente) {
- Collection<EtatAttente> etatAttentes = folder.getEtatAttente();
+ Collection<EtatAttente> etatAttentes = folder.getEtatAttentes();
if (CollectionUtils.isEmpty(etatAttentes)) {
etatAttentes = parentEtatAttente;
} else {
Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestData.java
===================================================================
--- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestData.java 2014-06-06 16:25:02 UTC (rev 145)
+++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/InitTestData.java 2014-06-06 16:26:07 UTC (rev 146)
@@ -102,14 +102,14 @@
MailFolder sav = folderDao.create(MailFolder.PROPERTY_NAME, "SAV",
MailFolder.PROPERTY_PARENT, franciaflex,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(0, 1));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(0, 1));
franciaflex.addChildren(sav);
foldersByName.put(sav.getName(), sav);
// user folders
MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril",
MailFolder.PROPERTY_PARENT, chargesClientelle,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(1, 2));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(1, 2));
chargesClientelle.addChildren(cyrilFolder);
foldersByName.put(cyrilFolder.getName(), cyrilFolder);
@@ -120,7 +120,7 @@
MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe",
MailFolder.PROPERTY_PARENT, chargesClientelle,
- MailFolder.PROPERTY_ETAT_ATTENTE, etatAttentes.subList(2, 3));
+ MailFolder.PROPERTY_ETAT_ATTENTES, etatAttentes.subList(2, 3));
chargesClientelle.addChildren(agatheFolder);
foldersByName.put(agatheFolder.getName(), agatheFolder);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-06-06 16:25:02 UTC (rev 145)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-06-06 16:26:07 UTC (rev 146)
@@ -433,7 +433,7 @@
public Collection<EtatAttente> getEtatAttenteForFolder(MailFolder folder) {
Collection<EtatAttente> result = null;
while (CollectionUtils.isEmpty(result) && folder != null) {
- result = folder.getEtatAttente();
+ result = folder.getEtatAttentes();
folder = folder.getParent();
}
return result;
1
0
r145 - trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities
by echatellier@users.forge.codelutin.com 06 Jun '14
by echatellier@users.forge.codelutin.com 06 Jun '14
06 Jun '14
Author: echatellier
Date: 2014-06-06 18:25:02 +0200 (Fri, 06 Jun 2014)
New Revision: 145
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/145
Log:
Update required field enum
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java 2014-06-06 10:05:05 UTC (rev 144)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java 2014-06-06 16:25:02 UTC (rev 145)
@@ -30,26 +30,14 @@
* @author Eric Chatellier
*/
public enum MailField {
-
- SENDER,
- RECEPTION_DATE,
- EDI_CODE_NUMBER,
+
OBJECT,
PROJECT_REFERENCE,
PRIORITY,
RANGE_ROW,
- MAIL_FOLDER,
CLIENT,
- DEMANDE_STATUS,
- DEMAND_TYPE,
- TAKEN_BY,
ETAT_ATTENTE,
- ATTACHMENT
-
- //FAX,
- //RECIPIENT,
- //ARCHIVE_DATE,
- //COMPANY_REFERENCE,
- //ORIGINAL_EMAIL,
- //COMMENT
+ COMPANY_REFERENCE,
+ COMMENT
+
}
1
0
r144 - in trunk/faxtomail-ui-web/src/main/webapp: WEB-INF/content/admin js
by echatellier@users.forge.codelutin.com 06 Jun '14
by echatellier@users.forge.codelutin.com 06 Jun '14
06 Jun '14
Author: echatellier
Date: 2014-06-06 12:05:05 +0200 (Fri, 06 Jun 2014)
New Revision: 144
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/144
Log:
Affichage des utilisateurs/groupes ayant d?\195?\169j?\195?\160 les droits sur les dossiers parents
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-06-06 09:31:40 UTC (rev 143)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-06 10:05:05 UTC (rev 144)
@@ -491,7 +491,7 @@
</div>
<!-- Liste des emails expéditeur -->
- <div class="panel panel-default">
+ <div class="panel panel-default" ng-controller="ConfigurationRigthsController">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse4">
@@ -511,6 +511,34 @@
</tr>
</thead>
<tbody>
+ <tr ng-repeat="user in parentsWriteRightUsers">
+ <td>
+ <span class="glyphicon glyphicon-arrow-up"></span> <em>{{user.firstName}} {{user.lastName}}</em>
+ </td>
+ <td>
+ <label><input type="checkbox"> Lecture</label>
+ <label><input type="checkbox"> Écriture</label>
+ <label><input type="checkbox"> Déplacement</label>
+ </td>
+ <td>
+
+ </td>
+ </tr>
+ <tr ng-repeat="group in parentsWriteRightGroups">
+ <td>
+ <span class="glyphicon glyphicon-arrow-up"></span> <em>{{group.fullPath}}</em>
+ </td>
+ <td>
+ <label><input type="checkbox"> Lecture</label>
+ <label><input type="checkbox"> Écriture</label>
+ <label><input type="checkbox"> Déplacement</label>
+ </td>
+ <td>
+
+ </td>
+ </tr>
+ </tbody>
+ <tbody>
<tr ng-repeat="user in selectedMailFolder.writeRightUsers">
<td>
<span class="glyphicon glyphicon-user"></span> {{user.firstName}} {{user.lastName}}
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-06 09:31:40 UTC (rev 143)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-06 10:05:05 UTC (rev 144)
@@ -48,7 +48,7 @@
// method privée recursive pour retourner l'ensemble des dossiers en les modifiant pour ajouter
// des metadata (full path from root, and root node instance)
- var recursiveAddMailFolder = function(result, mailFolders, rootFolder, prefix) {
+ var recursiveAddMailFolder = function(result, mailFolders, rootFolder, prefix, parent) {
var cumulativeCount = 0;
if (mailFolders) {
angular.forEach(mailFolders, function(mailFolder) {
@@ -59,15 +59,16 @@
// ha la la, modify input object again :(
// use $ from this, even not recommended because angular exlude those fields when jsonify
mailFolder.$rootFolder = rootFolder;
-
- //
+ // encore pour le parent
+ mailFolder.$parent = parent;
+
var folderCount = 0;
if ($scope.mailFoldersUsage.hasOwnProperty(mailFolder.topiaId)) {
folderCount += $scope.mailFoldersUsage[mailFolder.topiaId];
}
result.push(mailFolder);
- folderCount += recursiveAddMailFolder(result, mailFolder.children, rootFolder, mailFolder.$fullPath);
+ folderCount += recursiveAddMailFolder(result, mailFolder.children, rootFolder, mailFolder.$fullPath, mailFolder);
// et on modifie encore (tant qu'on a commencé !!!)
mailFolder.$cumulativeCount = folderCount;
@@ -83,7 +84,7 @@
$scope.flatMailFolders = {};
angular.forEach($scope.mailFolders, function(mailFolder) {
$scope.flatMailFolders[mailFolder.topiaId] = [];
- var cumulativeCount = recursiveAddMailFolder($scope.flatMailFolders[mailFolder.topiaId], mailFolder.children, mailFolder, mailFolder.name);
+ var cumulativeCount = recursiveAddMailFolder($scope.flatMailFolders[mailFolder.topiaId], mailFolder.children, mailFolder, mailFolder.name, mailFolder);
mailFolder.$cumulativeCount = cumulativeCount;
});
};
@@ -226,10 +227,6 @@
*/
ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
- // {Array} Users
- $scope.users = ConfigurationData.users;
- // {Array} Groups
- $scope.groups = ConfigurationData.groups;
// {Object} selected mail folder
$scope.selectedMailFolder;
// {String} add new customer responsible form value
@@ -306,12 +303,6 @@
if (!$scope.selectedMailFolder.folderTableColumns) {
$scope.selectedMailFolder.folderTableColumns = [];
}
- if (!$scope.selectedMailFolder.writeRightUsers) {
- $scope.selectedMailFolder.writeRightUsers = [];
- }
- if (!$scope.selectedMailFolder.writeRightGroups) {
- $scope.selectedMailFolder.writeRightGroups = [];
- }
if (!$scope.selectedMailFolder.etatAttente) {
$scope.selectedMailFolder.etatAttente = [];
}
@@ -383,6 +374,77 @@
$scope.selectedMailFolder.replyDomains.splice(index, 1);
};
+ // selection/deselection d'un état d'attente possible pour ce dossier
+ $scope.changeFolderEtatAttente = function(etatAttente) {
+ var index = $scope.selectedMailFolder.etatAttente.indexOf(etatAttente);
+ if (index != -1) {
+ $scope.selectedMailFolder.etatAttente.splice(index, 1);
+ } else {
+ $scope.selectedMailFolder.etatAttente.push(etatAttente);
+ }
+ };
+
+ // selection/deselection d'une action possible du menu contextuel pour ce dossier
+ $scope.changeFolderAction = function(folderAction) {
+ var index = $scope.selectedMailFolder.folderActions.indexOf(folderAction);
+ if (index != -1) {
+ $scope.selectedMailFolder.folderActions.splice(index, 1);
+ } else {
+ $scope.selectedMailFolder.folderActions.push(folderAction);
+ }
+ };
+}]);
+
+/**
+ * Right accordion tab controller.
+ */
+ConfigurationModule.controller('ConfigurationRigthsController', ['$scope', '$window', 'ConfigurationData',
+ function($scope, $window, ConfigurationData) {
+ // {Array} Users
+ $scope.users = ConfigurationData.users;
+ // {Array} Groups
+ $scope.groups = ConfigurationData.groups;
+
+ // {Array} Parent folders write right users
+ $scope.parentsWriteRightUsers;
+ // {Array} Parent folders write rigth groups
+ $scope.parentsWriteRightGroups;
+
+ // action specific aux droits pour l'editions d'un dossier
+ $scope.$watch("selectedMailFolder", function(newValue) {
+ if (newValue) {
+ if (!$scope.selectedMailFolder.writeRightUsers) {
+ $scope.selectedMailFolder.writeRightUsers = [];
+ }
+ if (!$scope.selectedMailFolder.writeRightGroups) {
+ $scope.selectedMailFolder.writeRightGroups = [];
+ }
+
+ // on exclut le dossier courant
+ updateParentFolderRigths($scope.selectedMailFolder.$parent);
+ }
+ });
+
+ // met à jour les listes des droits des dossiers parents
+ var updateParentFolderRigths = function(folder) {
+ $scope.parentsWriteRightUsers = [];
+ $scope.parentsWriteRightGroups = [];
+ recParentFolderRigths(folder);
+ };
+ var recParentFolderRigths = function(folder) {
+ if (folder) {
+ if (folder.$parent) {
+ recParentFolderRigths(folder.$parent);
+ };
+ if (folder.writeRightUsers) {
+ $scope.parentsWriteRightUsers = $scope.parentsWriteRightUsers.concat(folder.writeRightUsers);
+ }
+ if (folder.writeRightGroups) {
+ $scope.parentsWriteRightGroups = $scope.parentsWriteRightGroups.concat(folder.writeRightGroups);
+ }
+ }
+ };
+
// add reply address
$scope.addWriteRightUser = function() {
$scope.selectedMailFolder.writeRightUsers.push($scope.newWriteRightUser);
@@ -431,6 +493,7 @@
};
}]);
+
/**
* Mail filter tab controller.
*/
1
0
r143 - trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin
by echatellier@users.forge.codelutin.com 06 Jun '14
by echatellier@users.forge.codelutin.com 06 Jun '14
06 Jun '14
Author: echatellier
Date: 2014-06-06 11:31:40 +0200 (Fri, 06 Jun 2014)
New Revision: 143
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/143
Log:
Redefinition des ?\195?\169tats d'attente pour un niveau
Modified:
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp
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-06-06 09:16:16 UTC (rev 142)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-06 09:31:40 UTC (rev 143)
@@ -475,9 +475,16 @@
</div>
<div id="collapse3" class="panel-collapse collapse">
<div class="panel-body">
+ <label>
+ <input type="checkbox" ng-model="selectedMailFolder.useCurrentLevelEtatAttente" ng-value="false" />
+ Redéfinir les états d'attente à ce niveau.
+ </label>
+ Dans le cas contraires, les états d'attentes des dossiers parents seront pris en compte.
+ <hr />
<label class="checkbox" ng-repeat="etatAttente in etatAttentes">
<input type="checkbox" ng-checked="selectedMailFolder.etatAttente.indexOf(etatAttente) != -1"
- ng-click="changeFolderEtatAttente(etatAttente)"> {{etatAttente.label}}
+ ng-click="changeFolderEtatAttente(etatAttente)"
+ ng-disabled="!selectedMailFolder.useCurrentLevelEtatAttente"> {{etatAttente.label}}
</label>
</div>
</div>
1
0
r142 - in trunk: faxtomail-persistence/src/main/xmi faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin faxtomail-ui-web/src/main/webapp/js
by echatellier@users.forge.codelutin.com 06 Jun '14
by echatellier@users.forge.codelutin.com 06 Jun '14
06 Jun '14
Author: echatellier
Date: 2014-06-06 11:16:16 +0200 (Fri, 06 Jun 2014)
New Revision: 142
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/142
Log:
refs #4662: Manage write rigth for user and groups
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java
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-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-06-06 08:10:52 UTC (rev 141)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-06-06 09:16:16 UTC (rev 142)
@@ -192,11 +192,23 @@
rangeDao.create(Range.PROPERTY_LABEL, "FSI FMI")
);
+ // user groups
+ FaxToMailUserGroupTopiaDao userGroupDao = getPersistenceContext().getFaxToMailUserGroupDao();
+ userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Chargés de clientèle",
+ FaxToMailUserGroup.PROPERTY_FULL_PATH, "Franciaflex/Chargés de clientèle");
+ FaxToMailUserGroup commerciaux = userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Commerciaux",
+ FaxToMailUserGroup.PROPERTY_FULL_PATH, "Franciaflex/Commerciaux");
+ userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "SAV",
+ FaxToMailUserGroup.PROPERTY_FULL_PATH, "Franciaflex/SAV");
+ userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Administrateurs",
+ FaxToMailUserGroup.PROPERTY_FULL_PATH, "Franciaflex/Administrateurs");
+
FaxToMailUserTopiaDao userDao = getPersistenceContext().getFaxToMailUserDao();
FaxToMailUser marc = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Lefèbvre",
FaxToMailUser.PROPERTY_FIRST_NAME, "Marc",
FaxToMailUser.PROPERTY_LOGIN, "mlefebvre",
- FaxToMailUser.PROPERTY_TRIGRAPH, "MLE");
+ FaxToMailUser.PROPERTY_TRIGRAPH, "MLE",
+ FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
FaxToMailUser cyril = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Baillet",
FaxToMailUser.PROPERTY_FIRST_NAME, "Cyril",
FaxToMailUser.PROPERTY_LOGIN, "cbaillet",
@@ -204,7 +216,8 @@
FaxToMailUser frederic = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Viala",
FaxToMailUser.PROPERTY_FIRST_NAME, "Frédéric",
FaxToMailUser.PROPERTY_LOGIN, "fviala",
- FaxToMailUser.PROPERTY_TRIGRAPH, "FVI");
+ FaxToMailUser.PROPERTY_TRIGRAPH, "FVI",
+ FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
FaxToMailUser claire = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Marquis",
FaxToMailUser.PROPERTY_FIRST_NAME, "Claire",
FaxToMailUser.PROPERTY_LOGIN, "cmarquis",
@@ -216,7 +229,8 @@
FaxToMailUser jeanne = userDao.create(FaxToMailUser.PROPERTY_LAST_NAME, "Bourgoin",
FaxToMailUser.PROPERTY_FIRST_NAME, "Jeanne",
FaxToMailUser.PROPERTY_LOGIN, "jbourgoin",
- FaxToMailUser.PROPERTY_TRIGRAPH, "JBO");
+ FaxToMailUser.PROPERTY_TRIGRAPH, "JBO",
+ FaxToMailUser.PROPERTY_FAX_TO_MAIL_USER_GROUP, Collections.singletonList(commerciaux));
MailFolderTopiaDao folderDao = getPersistenceContext().getMailFolderDao();
Map<String, MailFolder> folders = new HashMap<>();
@@ -308,13 +322,6 @@
log.error("error getting the email filters", e);
}
- // user groups
- FaxToMailUserGroupTopiaDao userGroupDao = getPersistenceContext().getFaxToMailUserGroupDao();
- userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Chargés de clientèle");
- userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Commerciaux");
- userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "SAV");
- userGroupDao.create(FaxToMailUserGroup.PROPERTY_NAME, "Administrateurs");
-
// clients and emails
File clientFile = new File(demoDirectory, "fx_clients.csv");
try {
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-06-06 08:10:52 UTC (rev 141)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-06-06 09:16:16 UTC (rev 142)
@@ -39,11 +39,12 @@
import com.franciaflex.faxtomail.persistence.entities.EmailProtocol;
import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroup;
import com.franciaflex.faxtomail.persistence.entities.FolderAction;
+import com.franciaflex.faxtomail.persistence.entities.MailAction;
import com.franciaflex.faxtomail.persistence.entities.MailField;
import com.franciaflex.faxtomail.persistence.entities.MailFilter;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
-import com.franciaflex.faxtomail.persistence.entities.MailAction;
import com.franciaflex.faxtomail.services.service.ConfigurationService;
import com.franciaflex.faxtomail.services.service.MailFolderService;
import com.franciaflex.faxtomail.services.service.ReferentielService;
@@ -77,10 +78,12 @@
protected List<MailFilter> mailFilters;
- protected List<FaxToMailUser> users;
-
protected List<EmailAccount> emailAccounts;
+ protected List<FaxToMailUser> users;
+
+ protected List<FaxToMailUserGroup> groups;
+
@Override
public void prepare() throws Exception {
@@ -93,10 +96,11 @@
demandTypes = referentielService.getAllDemandType();
mailFolders = mailFolderService.getRootMailFolders();
mailFoldersUsage = mailFolderService.getMailFoldersUsage();
- users = configurationService.getAllUsers();
emailAccounts = configurationService.getEmailAccounts();
mailFilters = configurationService.getMailFilters();
configuration = configurationService.getConfiguration();
+ users = configurationService.getAllUsers();
+ groups = configurationService.getAllGroups();
return INPUT;
}
@@ -162,11 +166,7 @@
Type type = new TypeToken<List<MailFolder>>() {}.getType();
this.mailFolders = getGson().fromJson(json, type);
}
-
- public List<FaxToMailUser> getUsers() {
- return users;
- }
-
+
public List<MailFilter> getMailFilters() {
return mailFilters;
}
@@ -189,6 +189,14 @@
this.emailAccounts = getGson().fromJson(json, type);
}
+ public List<FaxToMailUser> getUsers() {
+ return users;
+ }
+
+ public List<FaxToMailUserGroup> getGroups() {
+ return groups;
+ }
+
public Map<MailAction, String> getMailActions() {
return getEnumAsMap(MailAction.values());
}
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-06-06 08:10:52 UTC (rev 141)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-06 09:16:16 UTC (rev 142)
@@ -46,9 +46,11 @@
'mailFolders': <s:property value="toJson(mailFolders)" escapeHtml="false"/>,
'mailFoldersUsage': <s:property value="toJson(mailFoldersUsage)" escapeHtml="false"/>,
'searchDisplayColumns': <s:property value="toJson(configuration.searchDisplayColumns)" escapeHtml="false"/>,
+ 'mailFilters': <s:property value="toJson(mailFilters)" escapeHtml="false"/>,
+ 'emailAccounts': <s:property value="toJson(emailAccounts)" escapeHtml="false"/>,
+ // referentiels
'users': <s:property value="toJson(users)" escapeHtml="false"/>,
- 'mailFilters': <s:property value="toJson(mailFilters)" escapeHtml="false"/>,
- 'emailAccounts': <s:property value="toJson(emailAccounts)" escapeHtml="false"/>
+ 'groups': <s:property value="toJson(groups)" escapeHtml="false"/>
});
</script>
</head>
@@ -497,17 +499,19 @@
<thead>
<tr>
<th>Utilisateur ou groupe</th>
- <th>Type</th>
+ <th>Droits</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="user in selectedMailFolder.writeRightUsers">
<td>
- {{user.firstName}} {{user.lastName}}
+ <span class="glyphicon glyphicon-user"></span> {{user.firstName}} {{user.lastName}}
</td>
<td>
- Ecriture
+ <label><input type="checkbox"> Lecture</label>
+ <label><input type="checkbox"> Écriture</label>
+ <label><input type="checkbox"> Déplacement</label>
</td>
<td>
<a class="pull-right btn btn-danger btn-xs" ng-click="removeWriteRightUser($index)">
@@ -515,6 +519,21 @@
</a>
</td>
</tr>
+ <tr ng-repeat="group in selectedMailFolder.writeRightGroups">
+ <td>
+ <span class="glyphicon glyphicon-folder-open"></span> {{group.fullPath}}
+ </td>
+ <td>
+ <label><input type="checkbox"> Lecture</label>
+ <label><input type="checkbox"> Écriture</label>
+ <label><input type="checkbox"> Déplacement</label>
+ </td>
+ <td>
+ <a class="pull-right btn btn-danger btn-xs" ng-click="removeWriteRightGroup($index)">
+ <span class="glyphicon glyphicon-remove"></span>
+ </a>
+ </td>
+ </tr>
</tbody>
</table>
@@ -528,10 +547,10 @@
<div class="form-group">
Nouveau groupe :
- <select ng-model="newWriteAccessGroup" ng-options="groupName for groupName in groupNames">
+ <select ng-model="newWriteRightGroup" ng-options="group as group.fullPath for group in groups">
<option></option>
</select>
- <a class="btn btn-success btn-xs" ng-click="addReplyAddress()" ng-disabled="!newWriteAccessGroup">
+ <a class="btn btn-success btn-xs" ng-click="addWriteRightGroup()" ng-disabled="!newWriteRightGroup">
<span class="glyphicon glyphicon-ok"></span>
</a>
</div>
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-06 08:10:52 UTC (rev 141)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-06 09:16:16 UTC (rev 142)
@@ -228,6 +228,8 @@
function($scope, $window, ConfigurationData) {
// {Array} Users
$scope.users = ConfigurationData.users;
+ // {Array} Groups
+ $scope.groups = ConfigurationData.groups;
// {Object} selected mail folder
$scope.selectedMailFolder;
// {String} add new customer responsible form value
@@ -307,6 +309,12 @@
if (!$scope.selectedMailFolder.writeRightUsers) {
$scope.selectedMailFolder.writeRightUsers = [];
}
+ if (!$scope.selectedMailFolder.writeRightGroups) {
+ $scope.selectedMailFolder.writeRightGroups = [];
+ }
+ if (!$scope.selectedMailFolder.etatAttente) {
+ $scope.selectedMailFolder.etatAttente = [];
+ }
// initialise la liste des colonnes pour le dossier courant
$scope.folderTableColumns = [];
@@ -383,9 +391,25 @@
// remove customer responsible
$scope.removeWriteRightUser = function(index) {
- $scope.selectedMailFolder.writeRightUsers.splice(index, 1);
+ if ($window.confirm("Êtes-vous sur de vouloir supprimer les droits de cet utilisateur ?")) {
+ $scope.selectedMailFolder.writeRightUsers.splice(index, 1);
+ }
};
+
+ // add reply address
+ $scope.addWriteRightGroup = function() {
+ console.log("dd")
+ $scope.selectedMailFolder.writeRightGroups.push($scope.newWriteRightGroup);
+ delete $scope.newWriteRightGroup;
+ };
+ // remove customer responsible
+ $scope.removeWriteRightGroup = function(index) {
+ if ($window.confirm("Êtes-vous sur de vouloir supprimer les droits de ce groupe ?")) {
+ $scope.selectedMailFolder.writeRightGroups.splice(index, 1);
+ }
+ };
+
// selection/deselection d'un état d'attente possible pour ce dossier
$scope.changeFolderEtatAttente = function(etatAttente) {
var index = $scope.selectedMailFolder.etatAttente.indexOf(etatAttente);
1
0