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
- 1934 discussions
r154 - trunk/faxtomail-ui-web/src/main/webapp/WEB-INF
by echatellier@users.forge.codelutin.com 09 Jun '14
by echatellier@users.forge.codelutin.com 09 Jun '14
09 Jun '14
Author: echatellier
Date: 2014-06-09 16:45:04 +0200 (Mon, 09 Jun 2014)
New Revision: 154
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/154
Log:
Update angular-ui-sortable
Modified:
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml
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-09 14:38:49 UTC (rev 153)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-06-09 14:45:04 UTC (rev 154)
@@ -30,7 +30,7 @@
</group>
<group name='webjar-angular-ui-sortable' abstract="true">
- <js>classpath:META-INF/resources/webjars/angular-ui-sortable/0.12.2/sortable.min.js</js>
+ <js>classpath:META-INF/resources/webjars/angular-ui-sortable/0.12.7/sortable.min.js</js>
</group>
<group name='webjar-angular-ui-bootstrap' abstract="true">
1
0
09 Jun '14
Author: echatellier
Date: 2014-06-09 16:38:49 +0200 (Mon, 09 Jun 2014)
New Revision: 153
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/153
Log:
Add authentication form
Added:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/AuthenticationException.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailLoginInterceptor.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LoginAction.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LogoutAction.java
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailInterceptor.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailSession.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/IndexAction.java
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/ImportAction.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/LdapAction.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/UserFolderAction.java
trunk/faxtomail-ui-web/src/main/resources/struts.xml
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/pom.xml
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 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/LdapService.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -35,13 +35,13 @@
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
-import com.franciaflex.faxtomail.FaxToMailConfiguration;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroup;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroupTopiaDao;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserImpl;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserTopiaDao;
import com.franciaflex.faxtomail.services.FaxToMailServiceSupport;
+import com.franciaflex.faxtomail.services.service.ldap.AuthenticationException;
import com.franciaflex.faxtomail.services.service.ldap.LdapUser;
import com.unboundid.ldap.sdk.LDAPConnection;
import com.unboundid.ldap.sdk.LDAPException;
@@ -219,4 +219,43 @@
String result = StringUtils.join(part, '/');
return result;
}
+
+ /**
+ * Return user for given user id.
+ *
+ * @param userTopiaId userTopiaId
+ * @return user bean (without password)
+ */
+ public FaxToMailUser getUserBean(String userTopiaId) {
+ FaxToMailUser result = null;
+
+ FaxToMailUserTopiaDao faxtomailUserDao = getPersistenceContext().getFaxToMailUserDao();
+ FaxToMailUser user = faxtomailUserDao.findByTopiaId(userTopiaId);
+ if (user != null) {
+ Binder<FaxToMailUser, FaxToMailUser> faxToMailUserBinder = BinderFactory.newBinder(FaxToMailUser.class);
+ result = new FaxToMailUserImpl();
+ faxToMailUserBinder.copyExcluding(user, result);
+ }
+ return result;
+ }
+
+ /**
+ * Authenticate user.
+ *
+ * @param login login
+ * @param password password
+ * @return authenticated user
+ * @throws AuthenticationException if authentication fails
+ */
+ public FaxToMailUser authenticateUser(String login, String password) throws AuthenticationException {
+ FaxToMailUserTopiaDao faxtomailUserDao = getPersistenceContext().getFaxToMailUserDao();
+ FaxToMailUser user = faxtomailUserDao.forAll().findAnyOrNull();
+ FaxToMailUser result = null;
+ if (user != null) {
+ Binder<FaxToMailUser, FaxToMailUser> faxToMailUserBinder = BinderFactory.newBinder(FaxToMailUser.class);
+ result = new FaxToMailUserImpl();
+ faxToMailUserBinder.copyExcluding(user, result);
+ }
+ return result;
+ }
}
Added: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/AuthenticationException.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/AuthenticationException.java (rev 0)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/AuthenticationException.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -0,0 +1,36 @@
+package com.franciaflex.faxtomail.services.service.ldap;
+
+/*
+ * #%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%
+ */
+
+public class AuthenticationException extends Exception {
+
+ public AuthenticationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public AuthenticationException(String message) {
+ super(message);
+ }
+}
Property changes on: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ldap/AuthenticationException.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
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-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailActionSupport.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -34,6 +34,7 @@
import com.franciaflex.faxtomail.FaxToMailConfiguration;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailEntityEnum;
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.persistence.entities.MailFolderAbstract;
import com.franciaflex.faxtomail.web.json.HibernateProxyTypeAdapter;
@@ -76,29 +77,18 @@
return session;
}
- public boolean needAuthentication() {
- return true;
+ public void setSession(FaxToMailSession session) {
+ this.session = session;
}
- public boolean rememberAsLastAction() {
- return true;
+ public boolean isAuthenticated() {
+ return session.getAuthenticatedUserId() != null;
}
- public String getId(TopiaEntity entity) {
- String id = "";
-
- if (entity.getTopiaId() != null) {
- id = Integer.toString(entity.getTopiaId().hashCode());
- }
-
- return id;
-
+ public FaxToMailUser getAuthenticatedUser() {
+ return session.getAuthenticatedFaxToMailUser();
}
- public void setSession(FaxToMailSession session) {
- this.session = session;
- }
-
public String toJson(Object element) {
String result = null;
try {
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailInterceptor.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailInterceptor.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailInterceptor.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -24,24 +24,28 @@
* #L%
*/
+import java.beans.PropertyDescriptor;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.beans.BeanUtil;
+
import com.franciaflex.faxtomail.FaxToMailApplicationContext;
import com.franciaflex.faxtomail.FaxToMailConfiguration;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailTopiaPersistenceContext;
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.services.FaxToMailService;
import com.franciaflex.faxtomail.services.FaxToMailServiceContext;
+import com.franciaflex.faxtomail.services.service.LdapService;
import com.google.common.base.Preconditions;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.interceptor.Interceptor;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.util.beans.BeanUtil;
-import java.beans.PropertyDescriptor;
-import java.util.Map;
-import java.util.Set;
-
public class FaxToMailInterceptor implements Interceptor {
private static final Log log = LogFactory.getLog(FaxToMailInterceptor.class);
@@ -69,29 +73,20 @@
FaxToMailServiceContext serviceContext = newServiceContext(invocation);
FaxToMailSession faxToMailSession = getFaxToMailSession(invocation);
+ populateUser(faxToMailSession, serviceContext);
if (CollectionUtils.isNotEmpty(faxToMailSession.getMessages())) {
-
for (String message : faxToMailSession.getMessages()) {
-
faxToMailAction.addActionMessage(message);
-
}
-
faxToMailSession.getMessages().clear();
-
}
if (CollectionUtils.isNotEmpty(faxToMailSession.getErrorMessages())) {
-
for (String message : faxToMailSession.getErrorMessages()) {
-
faxToMailAction.addActionError(message);
-
}
-
faxToMailSession.getErrorMessages().clear();
-
}
Set<PropertyDescriptor> descriptors =
@@ -102,45 +97,32 @@
for (PropertyDescriptor propertyDescriptor : descriptors) {
Class<?> propertyType = propertyDescriptor.getPropertyType();
-
Object toInject = null;
if (FaxToMailService.class.isAssignableFrom(propertyType)) {
-
Class<? extends FaxToMailService> serviceClass =
(Class<? extends FaxToMailService>) propertyType;
-
toInject = serviceContext.newService(serviceClass);
} else if (FaxToMailSession.class.isAssignableFrom(propertyType)) {
-
toInject = faxToMailSession;
} else if (FaxToMailConfiguration.class.isAssignableFrom(propertyType)) {
-
toInject = getFaxToMailApplicationContext(invocation).getApplicationConfig();
-
}
if (toInject != null) {
-
if (log.isTraceEnabled()) {
log.trace("injecting " + toInject + " in action " + action);
}
-
propertyDescriptor.getWriteMethod().invoke(action, toInject);
-
}
}
try {
-
return invocation.invoke();
-
} finally {
-
serviceContext.getPersistenceContext().close();
-
}
} else {
@@ -153,6 +135,15 @@
}
+ protected void populateUser(FaxToMailSession faxToMailSession, FaxToMailServiceContext serviceContext) {
+ if (StringUtils.isNotBlank(faxToMailSession.getAuthenticatedUserId())) {
+ LdapService ldapService = serviceContext.newService(LdapService.class);
+ FaxToMailUser user = ldapService.getUserBean(faxToMailSession.getAuthenticatedUserId());
+ faxToMailSession.setAuthenticatedFaxToMailUser(user);
+ }
+
+ }
+
protected void saveLastAction(ActionInvocation invocation) {
Map<String, Object> session = invocation.getInvocationContext().getSession();
ActionProxy proxy = invocation.getProxy();
@@ -170,11 +161,8 @@
FaxToMailSession session = (FaxToMailSession) invocation.getInvocationContext().getSession().get(FaxToMailSession.SESSION_PARAMETER);
if (session == null) {
-
session = new FaxToMailSession();
-
invocation.getInvocationContext().getSession().put(FaxToMailSession.SESSION_PARAMETER, session);
-
}
return session;
@@ -199,23 +187,17 @@
protected FaxToMailServiceContext newServiceContext(ActionInvocation invocation) {
FaxToMailApplicationContext extranetEncAhiApplicationContext = getFaxToMailApplicationContext(invocation);
-
FaxToMailTopiaPersistenceContext persistenceContext = extranetEncAhiApplicationContext.newPersistenceContext();
-
FaxToMailServiceContext serviceContext =
extranetEncAhiApplicationContext.newServiceContext(persistenceContext);
return serviceContext;
-
}
@Override
public void destroy() {
-
if (log.isInfoEnabled()) {
log.info("destroy " + this);
}
-
}
-
}
Added: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailLoginInterceptor.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailLoginInterceptor.java (rev 0)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailLoginInterceptor.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -0,0 +1,44 @@
+package com.franciaflex.faxtomail.web;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.Interceptor;
+
+/**
+ * Authentication interceptor.
+ *
+ * @author Eric Chatellier
+ */
+public class FaxToMailLoginInterceptor implements Interceptor {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -5760224375232019437L;
+
+ /*
+ * @see com.opensymphony.xwork2.interceptor.Interceptor#init()
+ */
+ @Override
+ public void init() {
+
+ }
+
+ public String intercept(ActionInvocation invocation) throws Exception {
+ ActionContext context = invocation.getInvocationContext();
+ FaxToMailSession session = (FaxToMailSession) context.getSession().get(FaxToMailSession.SESSION_PARAMETER);
+ if (session == null || StringUtils.isBlank(session.getAuthenticatedUserId())) {
+ return "redirect-to-login";
+ } else {
+ return invocation.invoke();
+ }
+ }
+
+ /*
+ * @see com.opensymphony.xwork2.interceptor.Interceptor#destroy()
+ */
+ @Override
+ public void destroy() {
+
+ }
+}
Property changes on: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailLoginInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailSession.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailSession.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/FaxToMailSession.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -24,6 +24,7 @@
* #L%
*/
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.google.common.collect.Lists;
import java.io.Serializable;
@@ -37,8 +38,10 @@
protected Collection<String> errorMessages;
-// protected AuthenticatedExtranetUser authenticatedExtranetUser;
+ protected String authenticatedUserId;
+ protected transient FaxToMailUser authenticatedFaxToMailUser;
+
public Collection<String> getMessages() {
if (messages == null) {
messages = Lists.newLinkedList();
@@ -61,16 +64,24 @@
getErrorMessages().add(errorMessage);
}
- public void logout() {
-// authenticatedExtranetUser.logout();
-// authenticatedExtranetUser = null;
+ public String getAuthenticatedUserId() {
+ return authenticatedUserId;
}
-// public AuthenticatedExtranetUser getAuthenticatedExtranetUser() {
-// return authenticatedExtranetUser;
-// }
+ public void setAuthenticatedUserId(String authenticatedUserId) {
+ this.authenticatedUserId = authenticatedUserId;
+ }
-// public void setAuthenticatedExtranetUser(AuthenticatedExtranetUser authenticatedExtranetUser) {
-// this.authenticatedExtranetUser = authenticatedExtranetUser;
-// }
+ public FaxToMailUser getAuthenticatedFaxToMailUser() {
+ return authenticatedFaxToMailUser;
+ }
+
+ public void setAuthenticatedFaxToMailUser(FaxToMailUser authenticatedFaxToMailUser) {
+ this.authenticatedFaxToMailUser = authenticatedFaxToMailUser;
+ }
+
+ public void logout() {
+ setAuthenticatedUserId(null);
+ setAuthenticatedFaxToMailUser(null);
+ }
}
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/IndexAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/IndexAction.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/IndexAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -25,44 +25,23 @@
*/
import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.InterceptorRef;
+import org.apache.struts2.convention.annotation.InterceptorRefs;
+@InterceptorRefs({
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("faxToMailStack")
+})
public class IndexAction extends FaxToMailActionSupport {
private static final Log log = LogFactory.getLog(IndexAction.class);
-// protected ApplicationSettingsService service;
-//
-// protected ApplicationSettings applicationSettings;
-
-// public void setService(ApplicationSettingsService service) {
-// this.service = service;
-// }
-
@Override
public String execute() {
-
-// applicationSettings = service.getApplicationSettings();
-
return SUCCESS;
}
-// public ApplicationSettings getApplicationSettings() {
-// return applicationSettings;
-// }
-
- public String getWelcomeText() {
-
-// String text = applicationSettings.getWelcomeText();
- String text = "Hello world";
-
- text = "<p>" + text.replaceAll("\\r?\\n\\r?\\n", "</p><p>") + "</p>";
-
- text = text.replaceAll("\\r?\\n", "<br/>");
-
- return text;
-
- }
-
}
Added: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LoginAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LoginAction.java (rev 0)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LoginAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -0,0 +1,80 @@
+package com.franciaflex.faxtomail.web.action;
+
+/*
+ * #%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.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
+import com.franciaflex.faxtomail.services.service.LdapService;
+import com.franciaflex.faxtomail.services.service.ldap.AuthenticationException;
+import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
+
+public class LoginAction extends FaxToMailActionSupport {
+
+ private static final Log log = LogFactory.getLog(LoginAction.class);
+
+ protected LdapService ldapService;
+
+ protected String login;
+
+ protected String password;
+
+ public void setLdapService(LdapService ldapService) {
+ this.ldapService = ldapService;
+ }
+
+ public void setLogin(String login) {
+ this.login = login;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ @Action("login-input")
+ public String input() throws Exception {
+ return super.input();
+ }
+
+ @Override
+ @Action(results = {
+ @Result(type = "redirectAction", params = {"actionName", "configuration-input", "namespace", "/admin"})})
+ public String execute() {
+
+ String result = SUCCESS;
+ try {
+ FaxToMailUser user = ldapService.authenticateUser(login, password);
+ getSession().setAuthenticatedUserId(user.getTopiaId());
+ } catch (AuthenticationException ex) {
+ result = ERROR;
+ addActionError("Can't login");
+ }
+ return result;
+ }
+}
Property changes on: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LoginAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LogoutAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LogoutAction.java (rev 0)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LogoutAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -0,0 +1,48 @@
+package com.franciaflex.faxtomail.web.action;
+
+/*
+ * #%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.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Result;
+
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
+import com.franciaflex.faxtomail.services.service.LdapService;
+import com.franciaflex.faxtomail.services.service.ldap.AuthenticationException;
+import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
+
+public class LogoutAction extends FaxToMailActionSupport {
+
+ private static final Log log = LogFactory.getLog(LogoutAction.class);
+
+ @Override
+ @Action(results = {
+ @Result(type = "redirectAction", params = {"actionName", "index", "namespace", "/"})})
+ public String execute() {
+ getSession().logout();
+ return SUCCESS;
+ }
+}
Property changes on: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/LogoutAction.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
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-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -31,6 +31,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.InterceptorRef;
+import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import com.franciaflex.faxtomail.persistence.entities.Configuration;
@@ -41,7 +44,6 @@
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.GroupChef;
import com.franciaflex.faxtomail.persistence.entities.MailAction;
import com.franciaflex.faxtomail.persistence.entities.MailField;
import com.franciaflex.faxtomail.persistence.entities.MailFilter;
@@ -57,6 +59,10 @@
* @author kmorin <kmorin(a)codelutin.com>
* @since x.x
*/
+@InterceptorRefs({
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("faxToMailStack")
+})
public class ConfigurationAction extends FaxToMailActionSupport implements Preparable {
private static final Log log = LogFactory.getLog(ConfigurationAction.class);
@@ -91,7 +97,7 @@
}
@Override
- @org.apache.struts2.convention.annotation.Action("configuration-input")
+ @Action("configuration-input")
public String input() throws Exception {
etatAttentes = referentielService.getAllEtatAttente();
demandTypes = referentielService.getAllDemandType();
@@ -106,8 +112,7 @@
}
@Override
- @org.apache.struts2.convention.annotation.Action(results = {
- @Result(type = "redirectAction", params = {"actionName", "configuration-input"})})
+ @Action(results = {@Result(type = "redirectAction", params = {"actionName", "configuration-input"})})
public String execute() throws Exception {
String result = super.execute();
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportAction.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ImportAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -30,11 +30,18 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.InterceptorRef;
+import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import com.franciaflex.faxtomail.services.service.ReferentielService;
import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
+@InterceptorRefs({
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("faxToMailStack")
+})
public class ImportAction extends FaxToMailActionSupport {
private static final Log log = LogFactory.getLog(ImportAction.class);
@@ -72,14 +79,13 @@
}
@Override
- @org.apache.struts2.convention.annotation.Action("import-input")
+ @Action("import-input")
public String input() throws Exception {
return INPUT;
}
@Override
- @org.apache.struts2.convention.annotation.Action(results = {
- @Result(type = "redirectAction", params = {"actionName", "import-input"})})
+ @Action(results = {@Result(type = "redirectAction", params = {"actionName", "import-input"})})
public String execute() throws Exception {
String result = super.execute();
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/LdapAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/LdapAction.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/LdapAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -26,11 +26,18 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.InterceptorRef;
+import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import com.franciaflex.faxtomail.services.service.LdapService;
import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
+@InterceptorRefs({
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("faxToMailStack")
+})
public class LdapAction extends FaxToMailActionSupport {
private static final Log log = LogFactory.getLog(LdapAction.class);
@@ -42,14 +49,13 @@
}
@Override
- @org.apache.struts2.convention.annotation.Action("ldap-input")
+ @Action("ldap-input")
public String input() throws Exception {
return INPUT;
}
@Override
- @org.apache.struts2.convention.annotation.Action(results = {
- @Result(type = "redirectAction", params = {"actionName", "ldap-input"})})
+ @Action(results = {@Result(type = "redirectAction", params = {"actionName", "ldap-input"})})
public String execute() throws Exception {
ldapService.updateLdapData();
return SUCCESS;
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/UserFolderAction.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/UserFolderAction.java 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/UserFolderAction.java 2014-06-09 14:38:49 UTC (rev 153)
@@ -26,13 +26,14 @@
import java.lang.reflect.Type;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.InterceptorRef;
+import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
@@ -43,6 +44,10 @@
import com.franciaflex.faxtomail.web.FaxToMailActionSupport;
import com.google.gson.reflect.TypeToken;
+@InterceptorRefs({
+ @InterceptorRef("loginInterceptor"),
+ @InterceptorRef("faxToMailStack")
+})
public class UserFolderAction extends FaxToMailActionSupport {
private static final Log log = LogFactory.getLog(UserFolderAction.class);
@@ -68,22 +73,16 @@
}
@Override
- @org.apache.struts2.convention.annotation.Action("user-folder-input")
+ @Action("user-folder-input")
public String input() throws Exception {
mailFolders = mailFolderService.getAllMailFolders();
users = configurationService.getAllUsers();
groups = configurationService.getAllGroups();
-
- /*userFolders = new HashMap<>();
- for (FaxToMailUser user : users) {
- userFolders.put(user.getTopiaId(), CollectionUtils.emptyIfNull(user.getAffectedFolders()));
- }*/
return INPUT;
}
@Override
- @org.apache.struts2.convention.annotation.Action(results = {
- @Result(type = "redirectAction", params = {"actionName", "user-folder-input"})})
+ @Action(results = {@Result(type = "redirectAction", params = {"actionName", "user-folder-input"})})
public String execute() throws Exception {
configurationService.saveUserFolders(userFolders);
Modified: trunk/faxtomail-ui-web/src/main/resources/struts.xml
===================================================================
--- trunk/faxtomail-ui-web/src/main/resources/struts.xml 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/resources/struts.xml 2014-06-09 14:38:49 UTC (rev 153)
@@ -22,72 +22,41 @@
#L%
-->
<!DOCTYPE struts PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
- "http://struts.apache.org/dtds/struts-2.0.dtd">
+ "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
+ "http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
- <constant name="struts.convention.default.parent.package" value="faxtomail" />
-
<bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" type="com.opensymphony.xwork2.TextProvider" />
-
+
+ <constant name="struts.convention.default.parent.package" value="faxtomail" />
<constant name="struts.objectFactory" value="com.franciaflex.faxtomail.web.FaxToMailStrutsObjectFactory" />
-
<constant name="struts.xworkTextProvider" value="i18nTextProvider" />
-
<constant name="struts.multipart.maxSize" value="10485760" />
<package name="faxtomail" namespace="/" extends="struts-default">
<interceptors>
-
<interceptor name="faxToMailInterceptor" class="com.franciaflex.faxtomail.web.FaxToMailInterceptor"/>
+ <interceptor name="loginInterceptor" class="com.franciaflex.faxtomail.web.FaxToMailLoginInterceptor" />
<interceptor-stack name="faxToMailStack">
<interceptor-ref name="faxToMailInterceptor" />
-
- <interceptor-ref name="exception"/>
- <interceptor-ref name="alias"/>
- <interceptor-ref name="i18n"/>
- <interceptor-ref name="checkbox"/>
- <interceptor-ref name="multiselect"/>
- <interceptor-ref name="params">
- <param name="excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*</param>
- <param name="acceptParamNames">(\w|\(|\)|\[|\]|\.|'|-|\s|\u002C|\||")+</param>
- </interceptor-ref>
- <interceptor-ref name="servletConfig"/>
- <interceptor-ref name="prepare"/>
- <interceptor-ref name="chain"/>
- <interceptor-ref name="modelDriven"/>
- <interceptor-ref name="fileUpload"/>
- <interceptor-ref name="staticParams"/>
- <interceptor-ref name="actionMappingParams"/>
- <interceptor-ref name="params">
- <param name="excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*</param>
- <param name="acceptParamNames">(\w|\(|\)|\[|\]|\.|'|-|_|\s|\u002C|\||")+</param>
- </interceptor-ref>
- <interceptor-ref name="conversionError"/>
- <interceptor-ref name="validation">
- <param name="excludeMethods">input,back,cancel,browse</param>
- </interceptor-ref>
- <interceptor-ref name="workflow">
- <param name="excludeMethods">input,back,cancel,browse</param>
- </interceptor-ref>
+ <interceptor-ref name="paramsPrepareParamsStack" />
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="faxToMailStack"/>
<global-results>
- <result name="redirect-to-login" type="redirect">/</result>
+ <result name="redirect-to-login" type="redirect">/login-input</result>
</global-results>
-
- <global-exception-mappings>
+
+ <!-- <global-exception-mappings>
<exception-mapping exception="com.franciaflex.faxtomail.web.FaxToMailNoIdException" result="NoIdException"></exception-mapping>
<exception-mapping exception="com.franciaflex.faxtomail.web.FaxToMailEntityNotFoundException" result="EntityNotFoundException"></exception-mapping>
<exception-mapping exception="com.franciaflex.faxtomail.web.FaxToMailIllegalAccessException" result="IllegalAccessException"></exception-mapping>
- </global-exception-mappings>
+ </global-exception-mappings>-->
</package>
-
</struts>
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/index.jsp 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/index.jsp 2014-06-09 14:38:49 UTC (rev 153)
@@ -27,15 +27,21 @@
<html>
<head>
<title>Accueil</title>
- <content tag="categorie-accueil">current</content>
</head>
<body>
- <h1>Administration FaxToMail</h1>
+ <div id="main-container" class="container" ng-app="ConfigurationModule">
+ <h1 class="page-header">Administration FaxToMail</h1>
- <div class="content info-zone">
-
- <s:property value="welcomeText" escapeHtml="false"/>
-
- </div>
+ <ul>
+ <li><a href="<s:url action='ldap-input' namespace="/admin" />">
+ <span class="fa fa-database"></span> Ldap</a></li>
+ <li><a href="<s:url action='configuration-input' namespace="/admin" />">
+ <span class="fa fa-cog"></span> Configuration</a></li>
+ <li><a href="<s:url action='import-input' namespace="/admin" />">
+ <span class="fa fa-upload"></span> Import</a></li>
+ <li><a href="<s:url action='user-folder-input' namespace="/admin" />">
+ <span class="fa fa-folder-open"></span> Dossiers utilisateur</a></li>
+ </ul>
+ </div>
</body>
</html>
Added: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp (rev 0)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp 2014-06-09 14:38:49 UTC (rev 153)
@@ -0,0 +1,72 @@
+<%--
+ #%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"%>
+<!DOCTYPE html>
+<%@taglib uri="/struts-tags" prefix="s" %>
+<html>
+ <head>
+ <title>Connexion</title>
+ </head>
+ <body>
+
+ <div id="main-container" class="container" ng-app="ConfigurationModule">
+ <h1 class="page-header">Connexion</h1>
+
+ <s:form id="main_form" action="login" method="post" role="form" class="form-horizontal">
+
+ <div class="alert alert-warning">
+ <strong>Attention!</strong> Le formulaire de connexion n'est pas encore branché sur le serveur LDAP.
+ Entrez n'importe quelles informations de connexion pour le moment.
+ </div>
+
+ <div class="form-group">
+ <label for="loginField" class="col-sm-2 control-label">Identifiant LDAP :</label>
+ <div class="col-sm-10">
+ <input type="email" class="form-control" id="loginField" placeholder="nom.prenom(a)franciaflex.fr">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="passwordField" class="col-sm-2 control-label">Mot de passe :</label>
+ <div class="col-sm-10">
+ <input type="password" class="form-control" id="passwordField" placeholder="password">
+ </div>
+ </div>
+ <!-- <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Remember me
+ </label>
+ </div>
+ </div>
+ </div> -->
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <button type="submit" class="btn btn-primary">Connexion</button>
+ </div>
+ </div>
+ </s:form>
+ </div>
+ </body>
+</html>
Property changes on: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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 20:44:39 UTC (rev 152)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-06-09 14:38:49 UTC (rev 153)
@@ -55,18 +55,27 @@
<div class="navbar-header">
<a href="<s:url value='/' />" class="navbar-brand">FaxToMail</a>
</div>
- <nav class="collapse navbar-collapse" role="navigation">
- <ul class="nav navbar-nav">
- <li><a href="<s:url action='ldap-input' namespace="/admin" />">
- <span class="fa fa-database"></span> Ldap</a></li>
- <li><a href="<s:url action='configuration-input' namespace="/admin" />">
- <span class="fa fa-cog"></span> Configuration</a></li>
- <li><a href="<s:url action='import-input' namespace="/admin" />">
- <span class="fa fa-upload"></span> Import</a></li>
- <li><a href="<s:url action='user-folder-input' namespace="/admin" />">
- <span class="fa fa-folder-open"></span> Dossiers utilisateur</a></li>
- </ul>
- </nav>
+ <s:if test="authenticated">
+ <nav class="collapse navbar-collapse" role="navigation">
+ <ul class="nav navbar-nav">
+ <li><a href="<s:url action='ldap-input' namespace="/admin" />">
+ <span class="fa fa-database"></span> Ldap</a></li>
+ <li><a href="<s:url action='configuration-input' namespace="/admin" />">
+ <span class="fa fa-cog"></span> Configuration</a></li>
+ <li><a href="<s:url action='import-input' namespace="/admin" />">
+ <span class="fa fa-upload"></span> Import</a></li>
+ <li><a href="<s:url action='user-folder-input' namespace="/admin" />">
+ <span class="fa fa-folder-open"></span> Dossiers utilisateur</a></li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li><a><span class="fa fa-user"></span>
+ <s:property value="authenticatedUser.firstName" /> <s:property value="authenticatedUser.lastName" /></a></li>
+ <li><a href="<s:url action='logout' namespace="/" />">
+ <span class="fa fa-power-off"></span> Déconnexion</a></li>
+ </ul>
+ </nav>
+ </s:if>
</div>
</header>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-06-08 20:44:39 UTC (rev 152)
+++ trunk/pom.xml 2014-06-09 14:38:49 UTC (rev 153)
@@ -539,14 +539,14 @@
<dependency>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-bootstrap</artifactId>
- <version>3.1.1-2-SNAPSHOT</version>
+ <version>3.1.1-1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angular-ui-sortable</artifactId>
- <version>0.12.2</version>
+ <version>0.12.7</version>
<scope>runtime</scope>
</dependency>
@@ -580,14 +580,14 @@
<dependency>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-angularjs</artifactId>
- <version>1.2.17-1-SNAPSHOT</version>
+ <version>1.2.17-1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-font-awesome</artifactId>
- <version>4.1.0-1-SNAPSHOT</version>
+ <version>4.1.0-1</version>
<scope>runtime</scope>
</dependency>
1
0
r152 - in trunk: faxtomail-persistence/src/main/xmi 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 08 Jun '14
by echatellier@users.forge.codelutin.com 08 Jun '14
08 Jun '14
Author: echatellier
Date: 2014-06-08 22:44:39 +0200 (Sun, 08 Jun 2014)
New Revision: 152
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/152
Log:
Ajout des chefs de groupes
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
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.properties
===================================================================
--- trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties 2014-06-08 14:30:45 UTC (rev 151)
+++ trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties 2014-06-08 20:44:39 UTC (rev 152)
@@ -94,3 +94,6 @@
# FaxToMailUserGroup
com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroup.attribute.name.tagvalue.naturalId=true
+
+# GroupChef
+com.franciaflex.faxtomail.persistence.entities.GroupChef.attribute.userGroup.tagvalue.notNull=true
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
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-08 14:30:45 UTC (rev 151)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-06-08 20:44:39 UTC (rev 152)
@@ -41,6 +41,7 @@
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.GroupChef;
import com.franciaflex.faxtomail.persistence.entities.MailAction;
import com.franciaflex.faxtomail.persistence.entities.MailField;
import com.franciaflex.faxtomail.persistence.entities.MailFilter;
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 14:30:45 UTC (rev 151)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-06-08 20:44:39 UTC (rev 152)
@@ -73,6 +73,7 @@
<li><a href="#tabs-filters" data-toggle="tab">Filtres de mail</a></li>
<li><a href="#tabs-search" data-toggle="tab">Recherche</a></li>
<li><a href="#tabs-mailaccounts" data-toggle="tab">Comptes mail</a></li>
+ <li><a href="#tabs-chefgroup" data-toggle="tab">Chef de groupe</a></li>
</ul>
<div class="tab-content active" ng-controller="ConfigurationMiscController">
@@ -145,7 +146,7 @@
</table>
</div>
- <div class="col-md-7" ng-if="selectedEtatAttente">
+ <div class="col-md-8" ng-if="selectedEtatAttente">
<h3>Édition de l'état d'attente {{selectedEtatAttente.label}}</h3>
Actions autorisées lorsque la demande est <strong>valide</strong> :
<label class="checkbox" ng-repeat="(mailAction,label) in mailActions">
@@ -159,7 +160,7 @@
ng-click="changeEtatAttenteInvalidAction(mailAction)"> {{label}}
</label>
</div>
- <div class="col-md-7" ng-if="!selectedEtatAttente">
+ <div class="col-md-8" ng-if="!selectedEtatAttente">
<em>Sélectionnez un état d'attente.</em>
</div>
</div>
@@ -183,7 +184,7 @@
</table>
</div>
- <div class="col-md-7" ng-if="selectedDemandType">
+ <div class="col-md-8" ng-if="selectedDemandType">
<h3>Édition du type de document {{selectedDemandType.label}}</h3>
Champs obligatoires pour le type de document :
<label class="checkbox" ng-repeat="(mailField,label) in mailFields">
@@ -191,7 +192,7 @@
ng-click="changeDemandTypeField(mailField)"> {{label}}
</label>
</div>
- <div class="col-md-7" ng-if="!selectedDemandType">
+ <div class="col-md-8" ng-if="!selectedDemandType">
<em>Sélectionnez un type de document.</em>
</div>
</div>
@@ -805,6 +806,78 @@
</div>
</div>
</div>
+
+ <div id="tabs-chefgroup" class="tab-pane" ng-controller="ConfigurationChefGroupController">
+
+ <div class="row">
+ <div class="col-md-4">
+ <h3>Chef de groupe <input type="button" class="btn btn-success btn-xs pull-right" value="Nouveau" ng-click="newGroupChef()" /></h3>
+ <table class="table table-hover">
+ <tbody>
+ <tr ng-repeat="groupChef in configuration.chefs"
+ ng-class="{'info' : groupChef == selectedGroupChef}"
+ ng-click="editGroupChef(groupChef)">
+ <td>{{groupChef.userGroup ? groupChef.userGroup.fullPath : '(aucun groupe)'}}
+ <a class="btn btn-danger btn-xs pull-right" ng-click="removeGroupChef(groupChef, $index)">
+ <span class="glyphicon glyphicon-remove"></span>
+ </a>
+ </td>
+ </tr>
+ <tr ng-if="!configuration.chefs || configuration.chefs.length == 0">
+ <td class="emptyTable">Aucun chef de groupe</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="col-md-8" ng-show="selectedGroupChef">
+ <h3>Édition du chef de groupe</h3>
+
+ <div class="form-inline">
+ <div class="form-group">
+ <label for="groupChefUserGroupField" class="control-label">Chef du groupe : </label>
+ <select id="groupChefUserGroupField" class="form-control" ng-model="selectedGroupChef.userGroup"
+ ng-options="group as group.fullPath for group in groups"></select>
+ </div>
+ </div>
+
+ <hr />
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Groupes gérés par le chef de groupe</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="group in selectedGroupChef.managedGroups">
+ <td>
+ <span class="fa fa-users"></span>
+ {{group.fullPath}}
+ <a class="btn btn-danger btn-xs pull-right" ng-click="removeManagedGroup($index)">
+ <span class="glyphicon glyphicon-remove"></span>
+ </a>
+ </td>
+ </tr>
+ <tr ng-if="!selectedGroupChef.managedGroups || selectedGroupChef.managedGroups.length == 0">
+ <td class="emptyTable">Aucun groupe gérés</td>
+ </tr>
+ </tbody>
+ </table>
+ <div class="form-inline">
+ <div class="form-group">
+ <label for="newManagedGroupField" class="control-label">Nouveau groupe :</label>
+ <select id="newManagedGroupField" class="form-control"
+ ng-model="newManagedGroup" ng-options="group as group.fullPath for group in groups">
+ </select>
+ <a class="btn btn-success btn-xs" ng-click="addManagedGroup()" ng-disabled="!newManagedGroup">
+ <span class="glyphicon glyphicon-plus"></span>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
</div>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container">
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 14:30:45 UTC (rev 151)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-06-08 20:44:39 UTC (rev 152)
@@ -29,6 +29,8 @@
*/
ConfigurationModule.controller('ConfigurationController', ['$scope', 'ConfigurationData',
function($scope, ConfigurationData) {
+ //{Object} L'object configuration
+ $scope.configuration = ConfigurationData.configuration;
//{Map} les actions possibles pour les etats d'attentes
$scope.mailActions = ConfigurationData.mailActions;
//{Map} les champs obligatoires possibles
@@ -45,6 +47,10 @@
$scope.mailFoldersUsage = ConfigurationData.mailFoldersUsage;
//{Map<MailFolder id, Array<MailFolder>>} liste des
$scope.flatMailFolders;
+ //{Array} All application users
+ $scope.users = ConfigurationData.users;
+ // {Array} All application groups
+ $scope.groups = ConfigurationData.groups;
// 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)
@@ -96,8 +102,6 @@
*/
ConfigurationModule.controller('ConfigurationMiscController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
- //{Object} L'object configuration
- $scope.configuration = ConfigurationData.configuration;
// Ajout d'une nouvelle ligne vide d'extension
$scope.addExtensionRow = function() {
@@ -227,10 +231,6 @@
*/
ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$window', 'ConfigurationData',
function($scope, $window, ConfigurationData) {
- //{Array} All application users
- $scope.users = ConfigurationData.users;
- // {Array} All application groups
- $scope.groups = ConfigurationData.groups;
// {Object} selected mail folder
$scope.selectedMailFolder;
// {String} add new customer responsible form value
@@ -575,13 +575,6 @@
$scope.rootFolderMailFilters[rootMailFolder.topiaId].splice(index2, 1);
}
};
-
- // define angular filter used to group mailFilters by rootFolders
- /*$scope.subFolderFilter = function(mailFolder) {
- return function(item) {
- return item.mailFolder == mailFolder || item.mailFolder.$rootFolder == mailFolder;
- };
- };*/
}]);
@@ -647,3 +640,65 @@
}
});
}]);
+
+
+/**
+ * Chef de groupe controller.
+ */
+ConfigurationModule.controller('ConfigurationChefGroupController', ['$scope', '$window', 'ConfigurationData',
+ function($scope, $window, ConfigurationData) {
+ //{Object} Chef de group en cours d'edition
+ $scope.selectedGroupChef;
+ //{Object} Nouveau group selectionné
+ $scope.newManagedGroup;
+
+ // change instances
+ if (!$scope.configuration.chefs) {
+ $scope.configuration.chefs = [];
+ }
+ angular.forEach($scope.groups, function(group) {
+ angular.forEach($scope.configuration.chefs, function(chef) {
+ if (chef.userGroup.topiaId == group.topiaId) {
+ chef.userGroup = group;
+ }
+ // managedGroups is not necessary to change here
+ });
+ });
+
+ // ajout d'un nouveau chef de groupe
+ $scope.newGroupChef = function() {
+ var groupChef = {
+ managedGroups : []
+ };
+ $scope.configuration.chefs.push(groupChef);
+ $scope.editGroupChef(groupChef);
+ };
+
+ // edition d'un chef de groupe
+ $scope.editGroupChef = function(groupChef) {
+ $scope.selectedGroupChef = groupChef;
+ };
+
+ // suppression d'un chef de groupe
+ $scope.removeGroupChef = function(groupChef, index) {
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce chef de groupe ?")) {
+ $scope.configuration.chefs.splice(index, 1);
+ if (groupChef == $scope.selectedGroupChef) {
+ delete $scope.selectedGroupChef;
+ }
+ }
+ };
+
+ // Ajout d'un nouveau group géré
+ $scope.addManagedGroup = function() {
+ $scope.selectedGroupChef.managedGroups.push($scope.newManagedGroup);
+ delete $scope.newManagedGroup;
+ };
+
+ // Suppression d'un group gérés
+ $scope.removeManagedGroup = function(index) {
+ if ($window.confirm("Êtes-vous sûr de vouloir supprimer ce groupe gérés ?")) {
+ $scope.selectedGroupChef.managedGroups.splice(index, 1);
+ }
+ };
+}]);
1
0
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