r127 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-persistence/src/main/xmi faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin faxtomail-ui-web/src/main/resources/i18n faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin faxtomail-ui-web/src
Author: echatellier Date: 2014-06-03 09:31:14 +0200 (Tue, 03 Jun 2014) New Revision: 127 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/127 Log: Refactoring des actions et actions contextuelles. Added: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailAction.java trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java Removed: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ContextAction.java trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/Field.java trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MainAction.java Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js Deleted: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ContextAction.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ContextAction.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ContextAction.java 2014-06-03 07:31:14 UTC (rev 127) @@ -1,36 +0,0 @@ -package com.franciaflex.faxtomail.persistence.entities; - -/* - * #%L - * FaxToMail :: Persistence - * $Id: Action.java 48 2014-04-25 13:43:04Z echatellier $ - * $HeadURL: https://svn.codelutin.com/faxtomail/trunk/faxtomail-persistence/src/main/jav... $ - * %% - * 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% - */ - -/** - * @author Kevin Morin (Code Lutin) - * @since x.x - */ -public enum ContextAction { - - CHANGE_PRIORITY, - AUTO_SAVE - -} Deleted: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/Field.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/Field.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/Field.java 2014-06-03 07:31:14 UTC (rev 127) @@ -1,55 +0,0 @@ -package com.franciaflex.faxtomail.persistence.entities; - -/* - * #%L - * FaxToMail :: Persistence - * $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% - */ - -/** - * Required email fields for specific {@link EtatAttente}. - * - * @author Eric Chatellier - */ -public enum Field { - - 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 -} Copied: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailAction.java (from rev 125, trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MainAction.java) =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailAction.java (rev 0) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailAction.java 2014-06-03 07:31:14 UTC (rev 127) @@ -0,0 +1,49 @@ +package com.franciaflex.faxtomail.persistence.entities; + +/* + * #%L + * FaxToMail :: Persistence + * $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% + */ + +/** + * @author Kevin Morin (Code Lutin) + * @since x.x + */ +public enum MailAction { + + SAVE(false), + TRANSMIT(false), + PRINT(true), + ARCHIVE(true), + REPLY(true), + GROUP(false); + + protected boolean contextuable; + + private MailAction(boolean contextuable) { + this.contextuable = contextuable; + } + + public boolean isContextuable() { + return contextuable; + } +} Copied: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java (from rev 125, trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/Field.java) =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java (rev 0) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MailField.java 2014-06-03 07:31:14 UTC (rev 127) @@ -0,0 +1,55 @@ +package com.franciaflex.faxtomail.persistence.entities; + +/* + * #%L + * FaxToMail :: Persistence + * $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% + */ + +/** + * Required email fields for specific {@link EtatAttente}. + * + * @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 +} Deleted: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MainAction.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MainAction.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/MainAction.java 2014-06-03 07:31:14 UTC (rev 127) @@ -1,40 +0,0 @@ -package com.franciaflex.faxtomail.persistence.entities; - -/* - * #%L - * FaxToMail :: Persistence - * $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% - */ - -/** - * @author Kevin Morin (Code Lutin) - * @since x.x - */ -public enum MainAction { - - SAVE, - TRANSMIT, - PRINT, - ARCHIVE, - REPLY, - GROUP - -} Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo =================================================================== (Binary files differ) Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-06-03 07:31:14 UTC (rev 127) @@ -29,7 +29,7 @@ import com.franciaflex.faxtomail.persistence.entities.DemandStatus; import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; -import com.franciaflex.faxtomail.persistence.entities.Field; +import com.franciaflex.faxtomail.persistence.entities.MailField; import com.franciaflex.faxtomail.persistence.entities.History; import com.franciaflex.faxtomail.persistence.entities.HistoryImpl; import com.franciaflex.faxtomail.persistence.entities.HistoryType; @@ -285,11 +285,11 @@ Collection<String> columns = null; MailFolder selectedFolder = getModel().getSelectedFolder(); if (selectedFolder != null) { - List<Field> tableColumns = selectedFolder.getFolderTableColumns(); + List<MailField> tableColumns = selectedFolder.getFolderTableColumns(); if (tableColumns != null) { - Collections2.transform(tableColumns, new Function<Field, String>() { + Collections2.transform(tableColumns, new Function<MailField, String>() { @Override - public String apply(Field field) { + public String apply(MailField field) { return field.toString(); } }); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-06-03 07:31:14 UTC (rev 127) @@ -28,7 +28,7 @@ import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.EmailFilter; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; -import com.franciaflex.faxtomail.persistence.entities.Field; +import com.franciaflex.faxtomail.persistence.entities.MailField; import com.franciaflex.faxtomail.persistence.entities.MailFolder; import com.franciaflex.faxtomail.services.service.EmailService; import com.franciaflex.faxtomail.services.service.ReferentielService; @@ -230,11 +230,11 @@ @Override protected Collection<String> getColumns() { Collection<String> columns = null; - List<Field> tableColumns = getContext().getFaxToMailConfiguration().getSearchDisplayColumns(); + List<MailField> tableColumns = getContext().getFaxToMailConfiguration().getSearchDisplayColumns(); if (tableColumns != null) { - Collections2.transform(tableColumns, new Function<Field, String>() { + Collections2.transform(tableColumns, new Function<MailField, String>() { @Override - public String apply(Field field) { + public String apply(MailField field) { return field.toString(); } }); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-06-03 07:31:14 UTC (rev 127) @@ -26,7 +26,7 @@ import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.EmailFilter; import com.franciaflex.faxtomail.persistence.entities.EtatAttente; -import com.franciaflex.faxtomail.persistence.entities.Field; +import com.franciaflex.faxtomail.persistence.entities.MailField; import com.franciaflex.faxtomail.persistence.entities.HasLabel; import com.franciaflex.faxtomail.services.service.ReferentielService; import com.franciaflex.faxtomail.ui.swing.actions.SearchAction; @@ -201,11 +201,11 @@ @Override protected Collection<String> getColumns() { Collection<String> columns = null; - List<Field> tableColumns = getContext().getFaxToMailConfiguration().getSearchDisplayColumns(); + List<MailField> tableColumns = getContext().getFaxToMailConfiguration().getSearchDisplayColumns(); if (tableColumns != null) { - Collections2.transform(tableColumns, new Function<Field, String>() { + Collections2.transform(tableColumns, new Function<MailField, String>() { @Override - public String apply(Field field) { + public String apply(MailField field) { return field.toString(); } }); 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-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-06-03 07:31:14 UTC (rev 127) @@ -34,14 +34,13 @@ import com.franciaflex.faxtomail.persistence.entities.Configuration; import com.franciaflex.faxtomail.persistence.entities.ConfigurationImpl; -import com.franciaflex.faxtomail.persistence.entities.ContextAction; import com.franciaflex.faxtomail.persistence.entities.EmailAccount; import com.franciaflex.faxtomail.persistence.entities.EtatAttente; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; -import com.franciaflex.faxtomail.persistence.entities.Field; +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.MainAction; +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; @@ -134,16 +133,17 @@ this.etatAttentes = getGson().fromJson(json, type); } - public Map<MainAction, String> getMainActions() { - return getEnumAsMap(MainAction.values()); + public Map<MailAction, String> getMailActions() { + return getEnumAsMap(MailAction.values()); } - public Map<ContextAction, String> getContextActions() { - return getEnumAsMap(ContextAction.values()); + public Map<MailAction, String> getContextMailActions() { + // FIXME add filter on isContextual + return getEnumAsMap(MailAction.ARCHIVE, MailAction.PRINT, MailAction.REPLY); } - public Map<Field, String> getFields() { - return getEnumAsMap(Field.values()); + public Map<MailField, String> getMailFields() { + return getEnumAsMap(MailField.values()); } public List<MailFolder> getMailFolders() { Modified: trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties =================================================================== --- trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties 2014-06-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-web/src/main/resources/i18n/faxtomail-ui-web_fr_FR.properties 2014-06-03 07:31:14 UTC (rev 127) @@ -1,29 +1,27 @@ -com.franciaflex.faxtomail.persistence.entities.ContextAction.AUTO_SAVE=Sauver automatiquement -com.franciaflex.faxtomail.persistence.entities.ContextAction.CHANGE_PRIORITY=Changer la priorité -com.franciaflex.faxtomail.persistence.entities.Field.ARCHIVE_DATE=Date d'archive -com.franciaflex.faxtomail.persistence.entities.Field.ATTACHMENT=Pièces jointes -com.franciaflex.faxtomail.persistence.entities.Field.CLIENT=Client -com.franciaflex.faxtomail.persistence.entities.Field.COMMENT=Commentaire -com.franciaflex.faxtomail.persistence.entities.Field.COMPANY_REFERENCE=Référence -com.franciaflex.faxtomail.persistence.entities.Field.DEMANDE_STATUS=Statut de demande -com.franciaflex.faxtomail.persistence.entities.Field.DEMAND_TYPE=Type de demande -com.franciaflex.faxtomail.persistence.entities.Field.EDI_CODE_NUMBER=Code EDI -com.franciaflex.faxtomail.persistence.entities.Field.ETAT_ATTENTE=État d'attente -com.franciaflex.faxtomail.persistence.entities.Field.FAX=Fax -com.franciaflex.faxtomail.persistence.entities.Field.MAIL_FOLDER=Dossier -com.franciaflex.faxtomail.persistence.entities.Field.OBJECT=Objet -com.franciaflex.faxtomail.persistence.entities.Field.ORIGINAL_EMAIL=Email original -com.franciaflex.faxtomail.persistence.entities.Field.PRIORITY=Priorité -com.franciaflex.faxtomail.persistence.entities.Field.PROJECT_REFERENCE=Réference projet -com.franciaflex.faxtomail.persistence.entities.Field.RANGE_ROW=Gamme -com.franciaflex.faxtomail.persistence.entities.Field.RECEPTION_DATE=Date de réception -com.franciaflex.faxtomail.persistence.entities.Field.RECIPIENT=Destinataire -com.franciaflex.faxtomail.persistence.entities.Field.SENDER=Expéditeur -com.franciaflex.faxtomail.persistence.entities.Field.TAKEN_BY=Pris par -com.franciaflex.faxtomail.persistence.entities.MainAction.ARCHIVE=Archiver -com.franciaflex.faxtomail.persistence.entities.MainAction.GROUP=Grouper -com.franciaflex.faxtomail.persistence.entities.MainAction.PRINT=Imprimer -com.franciaflex.faxtomail.persistence.entities.MainAction.REPLY=Repondre -com.franciaflex.faxtomail.persistence.entities.MainAction.SAVE=Sauver -com.franciaflex.faxtomail.persistence.entities.MainAction.TRANSMIT=Déplacer +com.franciaflex.faxtomail.persistence.entities.MailAction.ARCHIVE=Archiver +com.franciaflex.faxtomail.persistence.entities.MailAction.GROUP=Grouper +com.franciaflex.faxtomail.persistence.entities.MailAction.PRINT=Imprimer +com.franciaflex.faxtomail.persistence.entities.MailAction.REPLY=Repondre +com.franciaflex.faxtomail.persistence.entities.MailAction.SAVE=Sauver +com.franciaflex.faxtomail.persistence.entities.MailAction.TRANSMIT=Déplacer +com.franciaflex.faxtomail.persistence.entities.MailField.ARCHIVE_DATE=Date d'archive +com.franciaflex.faxtomail.persistence.entities.MailField.ATTACHMENT=Pièces jointes +com.franciaflex.faxtomail.persistence.entities.MailField.CLIENT=Client +com.franciaflex.faxtomail.persistence.entities.MailField.COMMENT=Commentaire +com.franciaflex.faxtomail.persistence.entities.MailField.COMPANY_REFERENCE=Référence +com.franciaflex.faxtomail.persistence.entities.MailField.DEMANDE_STATUS=Statut de demande +com.franciaflex.faxtomail.persistence.entities.MailField.DEMAND_TYPE=Type de demande +com.franciaflex.faxtomail.persistence.entities.MailField.EDI_CODE_NUMBER=Code EDI +com.franciaflex.faxtomail.persistence.entities.MailField.ETAT_ATTENTE=État d'attente +com.franciaflex.faxtomail.persistence.entities.MailField.FAX=Fax +com.franciaflex.faxtomail.persistence.entities.MailField.MAIL_FOLDER=Dossier +com.franciaflex.faxtomail.persistence.entities.MailField.OBJECT=Objet +com.franciaflex.faxtomail.persistence.entities.MailField.ORIGINAL_EMAIL=Email original +com.franciaflex.faxtomail.persistence.entities.MailField.PRIORITY=Priorité +com.franciaflex.faxtomail.persistence.entities.MailField.PROJECT_REFERENCE=Réference projet +com.franciaflex.faxtomail.persistence.entities.MailField.RANGE_ROW=Gamme +com.franciaflex.faxtomail.persistence.entities.MailField.RECEPTION_DATE=Date de réception +com.franciaflex.faxtomail.persistence.entities.MailField.RECIPIENT=Destinataire +com.franciaflex.faxtomail.persistence.entities.MailField.SENDER=Expéditeur +com.franciaflex.faxtomail.persistence.entities.MailField.TAKEN_BY=Pris par faxtomail.email.projectReference.default= 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-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-03 07:31:14 UTC (rev 127) @@ -47,9 +47,9 @@ angular.module('ConfigurationModule', ['FaxToMail', 'ui.tree', 'ui.sortable', 'ui.select2.sortable']) .value('ConfigurationData', { // enums - 'mainActions': <s:property value="toJson(mainActions)" escapeHtml="false"/>, - 'contextActions': <s:property value="toJson(contextActions)" escapeHtml="false"/>, - 'fields': <s:property value="toJson(fields)" escapeHtml="false"/>, + 'mailActions': <s:property value="toJson(mailActions)" escapeHtml="false"/>, + 'contextMailActions': <s:property value="toJson(contextMailActions)" escapeHtml="false"/>, + 'mailFields': <s:property value="toJson(mailFields)" escapeHtml="false"/>, // datas 'etatAttentes' : <s:property value="toJson(etatAttentes)" escapeHtml="false"/>, 'mailFolders': <s:property value="toJson(mailFolders)" escapeHtml="false"/>, @@ -119,14 +119,14 @@ <div class="col-md-7" ng-if="selectedEtatAttente"> <h3>Édition de l'état d'attente {{selectedEtatAttente.label}}</h3> Champs obligatoires pour l'état d'attente : - <label class="checkbox" ng-repeat="(field,label) in fields"> - <input type="checkbox" ng-checked="selectedEtatAttente.fields.indexOf(field) != -1" - ng-click="changeEtatAttenteField(field)"> {{label}} + <label class="checkbox" ng-repeat="(mailField,label) in mailFields"> + <input type="checkbox" ng-checked="selectedEtatAttente.fields.indexOf(mailField) != -1" + ng-click="changeEtatAttenteField(mailField)"> {{label}} </label> Actions autorisées pour l'état d'attente : - <label class="checkbox" ng-repeat="(mainAction,label) in mainActions"> - <input type="checkbox" ng-checked="selectedEtatAttente.mainActions.indexOf(mainAction) != -1" - ng-click="changeEtatAttenteAction(mainAction)"> {{label}} + <label class="checkbox" ng-repeat="(mailAction,label) in mailActions"> + <input type="checkbox" ng-checked="selectedEtatAttente.mailActions.indexOf(mailAction) != -1" + ng-click="changeEtatAttenteAction(mailAction)"> {{label}} </label> </div> <div class="col-md-7" ng-if="!selectedEtatAttente"> @@ -335,9 +335,9 @@ </div> <div id="collapse5" class="panel-collapse collapse"> <div class="panel-body"> - <label class="checkbox" ng-repeat="(contextAction,label) in contextActions"> - <input type="checkbox" ng-checked="selectedMailFolder.contextActions.indexOf(contextAction) != -1" - ng-click="changeFolderAction(contextAction)"> {{label}} + <label class="checkbox" ng-repeat="(contextMailAction,label) in contextMailActions"> + <input type="checkbox" ng-checked="selectedMailFolder.contextActions.indexOf(contextMailAction) != -1" + ng-click="changeFolderAction(contextMailAction)"> {{label}} </label> </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-03 07:30:29 UTC (rev 126) +++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-03 07:31:14 UTC (rev 127) @@ -28,11 +28,11 @@ FaxToMailModule.controller('ConfigurationController', ['$scope', '$http', 'ConfigurationData', function($scope, $http, ConfigurationData) { //{Map} les actions possibles pour les etats d'attentes - $scope.mainActions = ConfigurationData.mainActions; + $scope.mailActions = ConfigurationData.mailActions; //{Map} les champs obligatoires possibles - $scope.fields = ConfigurationData.fields; + $scope.mailFields = ConfigurationData.mailFields; //{Map} les actions contextuelles possibles pour les dossiers - $scope.contextActions = ConfigurationData.contextActions; + $scope.contextMailActions = ConfigurationData.contextMailActions; //{Array} les etats d'attentes disponibles $scope.etatAttentes = ConfigurationData.etatAttentes; //{Array} mail folders @@ -105,22 +105,22 @@ // selection/deselection d'une action $scope.changeEtatAttenteAction = function(action) { - var index = $scope.selectedEtatAttente.mainActions.indexOf(action); + var index = $scope.selectedEtatAttente.mailActions.indexOf(action); if (index != -1) { - $scope.selectedEtatAttente.mainActions.splice(index, 1); + $scope.selectedEtatAttente.mailActions.splice(index, 1); } else { - $scope.selectedEtatAttente.mainActions.push(action); + $scope.selectedEtatAttente.mailActions.push(action); } }; // selection/deselection d'un champ - $scope.changeEtatAttenteField = function(field) { + $scope.changeEtatAttenteField = function(mailField) { - var index = $scope.selectedEtatAttente.fields.indexOf(field); + var index = $scope.selectedEtatAttente.fields.indexOf(mailField); if (index != -1) { $scope.selectedEtatAttente.fields.splice(index, 1); } else { - $scope.selectedEtatAttente.fields.push(field); + $scope.selectedEtatAttente.fields.push(mailField); } }; }]); @@ -267,12 +267,12 @@ }; // selection/deselection d'une action possible du menu contextuel pour ce dossier - $scope.changeFolderAction = function(contextAction) { - var index = $scope.selectedMailFolder.contextActions.indexOf(contextAction); + $scope.changeFolderAction = function(mailAction) { + var index = $scope.selectedMailFolder.contextActions.indexOf(mailAction); if (index != -1) { $scope.selectedMailFolder.contextActions.splice(index, 1); } else { - $scope.selectedMailFolder.contextActions.push(contextAction); + $scope.selectedMailFolder.contextActions.push(mailAction); } }; }]); @@ -319,9 +319,9 @@ // fonction retournant l'ensemble des options disponibles $scope.getObjectsData = function(term, result) { var resultArray = []; - angular.forEach($scope.fields, function(label, field) { + angular.forEach($scope.mailFields, function(label, mailField) { resultArray.push({ - id: field, + id: mailField, label: label }); });
participants (1)
-
echatellier@users.forge.codelutin.com