mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2E to HEAD
17533: Fix for unreported issue for events with multiple days (secondary elements) aren't filtered correctly when view is filtered by tags 17535: ETHREEOH-3411 - Alert appears when loading My Dashboard when Documents I'm editing dashlet is aded and site name was edited with XSS text 17536: Fixes for various forms issues (ETHREEOH-3398, ETHREEOH-3273, ETHREEOH-3339 & ALFCOM-3587) and reverted accidentally checked in log4j.properties file - Folders can now have tags applied in edit form - Working copy nodes have their cm:name property set to protected - Removed mandatory marker from checkbox control (if you have a boolean there is always a value so no need to mark as mandatory) - Potential security issue 17537: ETHREEOH-1908 - .docx word documents are not displayed in 'Word Documents' category in 'Document List' component. Also fixed some i18n strings. 17538: Fix for ETHREEOH-3085 and ETHREEOH-3341. - NTLM/Kerberos, Tomcat/JBoss5 and JSF client now play nicely on session timeout and display the correct configured page on first login. - Tested Share NTLM works correctly with above changes. 17539: Fix for ETHREEOH-3368: UI does not show multi-valued MLText propertis as localisable 17543: Merged DEV_TEMPORARY to V3.2 17529: Fix for ETHREEOH-3186 & ETHREEOH-3187 17544: Fix for ETHREEOH-1509 - Manage action is not applied for task resources part from My Tasks tab in Office Addins if user already opens another task. 17547: Fix for ETHREEOH-1709 - AccessDeniedException - Download Servlet not re-directing user to login page. - WebDav path now resolved to a noderef as system user - then the permission test for READ_CONTENT is performed directly on the resulting noderef. 17548: Fix for ETHREEOH-3137 - Tags created for All day event are not displayed in Tags pane. 17551: Final part of fix for ETHREEOH-2161 includes solution for ETHREEOH-3270. - An admin user can now optionally disable the execute of Rules and the Archive of nodes during a folder delete operation. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,8 +27,8 @@ portlets.myspaces.create_space=Create Space
|
||||
portlets.myspaces.create_space.title=Create a new Space
|
||||
portlets.myspaces.upload=Upload
|
||||
portlets.myspaces.upload.title=Upload a new document
|
||||
portlets.myspaces.name=name
|
||||
portlets.myspaces.title=title
|
||||
portlets.myspaces.name=Name
|
||||
portlets.myspaces.title=Title
|
||||
portlets.myspaces.description=Description
|
||||
portlets.myspaces.all_items=All Items
|
||||
portlets.myspaces.spaces=Spaces
|
||||
|
@@ -227,7 +227,7 @@ view_details=View Details
|
||||
view_details_file=View Details for file
|
||||
change_details=Change Details
|
||||
update=Update
|
||||
download=download
|
||||
download=Download
|
||||
cut=Cut
|
||||
copy=Copy
|
||||
paste=Paste
|
||||
@@ -1641,6 +1641,8 @@ delete_op_all=This space and all its contents. Note: Rules will also be deleted.
|
||||
delete_op_files=Only the files within this space.
|
||||
delete_op_folders=Only the folders within this space.
|
||||
delete_op_contents=Files and folders within this space.
|
||||
delete_execute_rules=Execute Rules
|
||||
delete_archive_nodes=Archive Nodes
|
||||
|
||||
# Email users dialog
|
||||
email_space_users=Email Space users
|
||||
|
@@ -31,6 +31,7 @@ import javax.portlet.RenderResponse;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.web.app.servlet.AuthenticationHelper;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.apache.myfaces.portlet.DefaultViewSelector;
|
||||
|
||||
@@ -47,7 +48,7 @@ public class AlfrescoDefaultViewSelector implements DefaultViewSelector
|
||||
User user = (User)request.getPortletSession().getAttribute(AuthenticationHelper.AUTHENTICATION_USER);
|
||||
if (user != null && user.getUserName().equals(AuthenticationUtil.getGuestUserName()))
|
||||
{
|
||||
return "/jsp/browse/browse.jsp";
|
||||
return FacesHelper.BROWSE_VIEW_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -50,6 +50,7 @@ import org.alfresco.util.TempFileProvider;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.AuthenticationHelper;
|
||||
import org.alfresco.web.app.servlet.AuthenticationStatus;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.ErrorBean;
|
||||
import org.alfresco.web.bean.FileUploadBean;
|
||||
import org.alfresco.web.bean.LoginBean;
|
||||
@@ -291,7 +292,7 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
}
|
||||
else
|
||||
{
|
||||
nonFacesRequest(request, response, "/jsp/browse/browse.jsp");
|
||||
nonFacesRequest(request, response, FacesHelper.BROWSE_VIEW_ID);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -423,7 +424,7 @@ public class AlfrescoFacesPortlet extends MyFacesGenericPortlet
|
||||
{
|
||||
ViewHandler viewHandler = context.getApplication().getViewHandler();
|
||||
// TODO: configure the portlet error return page
|
||||
UIViewRoot view = viewHandler.createView(context, "/jsp/browse/browse.jsp");
|
||||
UIViewRoot view = viewHandler.createView(context, FacesHelper.BROWSE_VIEW_ID);
|
||||
context.setViewRoot(view);
|
||||
}
|
||||
|
||||
|
@@ -39,6 +39,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
@@ -96,8 +98,6 @@ public abstract class BaseServlet extends HttpServlet
|
||||
|
||||
private static Log logger = LogFactory.getLog(BaseServlet.class);
|
||||
|
||||
// Tenant service
|
||||
private static TenantService m_tenantService;
|
||||
|
||||
/**
|
||||
* Return the ServiceRegistry helper instance
|
||||
@@ -309,7 +309,11 @@ public abstract class BaseServlet extends HttpServlet
|
||||
* @param args The elements of the path to lookup
|
||||
* @param decode True to decode the arg from UTF-8 format, false for no decoding
|
||||
*/
|
||||
private static NodeRef resolveWebDAVPath(WebApplicationContext wc, String[] args, boolean decode)
|
||||
private static NodeRef resolveWebDAVPath(final WebApplicationContext wc, final String[] args, final boolean decode)
|
||||
{
|
||||
return AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
{
|
||||
NodeRef nodeRef = null;
|
||||
|
||||
@@ -330,13 +334,11 @@ public abstract class BaseServlet extends HttpServlet
|
||||
// get the company home node to start the search from
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
|
||||
m_tenantService = (TenantService) wc.getBean("tenantService");
|
||||
if (m_tenantService !=null && m_tenantService.isEnabled())
|
||||
TenantService tenantService = (TenantService)wc.getBean("tenantService");
|
||||
if (tenantService != null && tenantService.isEnabled())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("MT is enabled.");
|
||||
}
|
||||
|
||||
NodeService nodeService = (NodeService) wc.getBean("NodeService");
|
||||
SearchService searchService = (SearchService) wc.getBean("SearchService");
|
||||
@@ -344,10 +346,10 @@ public abstract class BaseServlet extends HttpServlet
|
||||
|
||||
// TODO: since these constants are used more widely than just the WebDAVServlet,
|
||||
// they should be defined somewhere other than in that servlet
|
||||
String m_rootPath = wc.getServletContext().getInitParameter(org.alfresco.repo.webdav.WebDAVServlet.KEY_ROOT_PATH);
|
||||
String rootPath = wc.getServletContext().getInitParameter(org.alfresco.repo.webdav.WebDAVServlet.KEY_ROOT_PATH);
|
||||
|
||||
// note: rootNodeRef is required (for storeRef part)
|
||||
nodeRef = m_tenantService.getRootNode(nodeService, searchService, namespaceService, m_rootPath, nodeRef);
|
||||
nodeRef = tenantService.getRootNode(nodeService, searchService, namespaceService, rootPath, nodeRef);
|
||||
}
|
||||
|
||||
if (paths.size() != 0)
|
||||
@@ -367,9 +369,10 @@ public abstract class BaseServlet extends HttpServlet
|
||||
|
||||
nodeRef = null;
|
||||
}
|
||||
|
||||
return nodeRef;
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a name based into a NodeRef and Filename string
|
||||
|
@@ -48,6 +48,9 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public final class FacesHelper
|
||||
{
|
||||
/** Root browse screen JSF view ID */
|
||||
public static final String BROWSE_VIEW_ID = "/jsp/browse/browse.jsp";
|
||||
|
||||
private static Log logger = LogFactory.getLog(FacesHelper.class);
|
||||
|
||||
/**
|
||||
@@ -138,7 +141,7 @@ public final class FacesHelper
|
||||
// set a new viewRoot, otherwise context.getViewRoot returns null
|
||||
if (viewRoot == null)
|
||||
{
|
||||
viewRoot = "/jsp/browse/browse.jsp";
|
||||
viewRoot = FacesHelper.BROWSE_VIEW_ID;
|
||||
}
|
||||
|
||||
UIViewRoot view = facesContext.getApplication().getViewHandler().createView(facesContext, viewRoot);
|
||||
|
@@ -208,7 +208,7 @@ public class HTTPRequestAuthenticationFilter implements Filter
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Login page requested, chaining ...");
|
||||
|
||||
resp.sendRedirect(req.getContextPath() + "/faces/jsp/browse/browse.jsp");
|
||||
resp.sendRedirect(req.getContextPath() + BaseServlet.FACES_SERVLET + FacesHelper.BROWSE_VIEW_ID);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@@ -26,6 +26,7 @@ package org.alfresco.web.app.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -36,6 +37,9 @@ import org.springframework.extensions.config.ConfigService;
|
||||
import org.alfresco.repo.SessionUser;
|
||||
import org.alfresco.repo.webdav.auth.BaseKerberosAuthenticationFilter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.PreferencesService;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -128,17 +132,44 @@ public class KerberosAuthenticationFilter extends BaseKerberosAuthenticationFilt
|
||||
* @see org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter#onLoginComplete(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected boolean onLoginComplete(HttpServletRequest req, HttpServletResponse res)
|
||||
protected boolean onLoginComplete(ServletContext sc, HttpServletRequest req, HttpServletResponse res, boolean userInit)
|
||||
throws IOException
|
||||
{
|
||||
// If the original URL requested was the login page then redirect to the browse view
|
||||
if (req.getRequestURI().endsWith(getLoginPage()) == true)
|
||||
if (userInit || req.getRequestURI().endsWith(getLoginPage()))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Login page requested, redirecting to browse page");
|
||||
if (logger.isDebugEnabled() && req.getRequestURI().endsWith(getLoginPage()))
|
||||
logger.debug("Login page requested - redirecting to initially configured page");
|
||||
if (logger.isDebugEnabled() && userInit)
|
||||
logger.debug("Session reinitialised - redirecting to initially configured page");
|
||||
|
||||
FacesContext fc = FacesHelper.getFacesContext(req, res, sc);
|
||||
ConfigService configService = Application.getConfigService(fc);
|
||||
ClientConfigElement configElement = (ClientConfigElement)configService.getGlobalConfig().getConfigElement("client");
|
||||
String location = configElement.getInitialLocation();
|
||||
|
||||
String preference = (String)PreferencesService.getPreferences(fc).getValue("start-location");
|
||||
if (preference != null)
|
||||
{
|
||||
location = preference;
|
||||
}
|
||||
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(location))
|
||||
{
|
||||
// Clear previous location - Fixes the issue ADB-61
|
||||
NavigationBean navigationBean = (NavigationBean)FacesHelper.getManagedBean(fc, "NavigationBean");
|
||||
if (navigationBean != null)
|
||||
{
|
||||
navigationBean.setLocation(null);
|
||||
navigationBean.setToolbarLocation(null);
|
||||
}
|
||||
res.sendRedirect(req.getContextPath() + BaseServlet.FACES_SERVLET + "/jsp/dashboards/container.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
res.sendRedirect(req.getContextPath() + BaseServlet.FACES_SERVLET + FacesHelper.BROWSE_VIEW_ID);
|
||||
}
|
||||
|
||||
// Redirect to the browse view
|
||||
res.sendRedirect(req.getContextPath() + "/faces/jsp/browse/browse.jsp");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@@ -26,6 +26,7 @@ package org.alfresco.web.app.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -36,6 +37,9 @@ import org.springframework.extensions.config.ConfigService;
|
||||
import org.alfresco.repo.SessionUser;
|
||||
import org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.PreferencesService;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -90,7 +94,6 @@ public class NTLMAuthenticationFilter extends BaseNTLMAuthenticationFilter
|
||||
protected SessionUser createUserObject(String userName, String ticket, NodeRef personNode, NodeRef homeSpaceRef)
|
||||
{
|
||||
// Create a web client user object
|
||||
|
||||
User user = new User( userName, ticket, personNode);
|
||||
user.setHomeSpaceId( homeSpaceRef.getId());
|
||||
|
||||
@@ -115,7 +118,6 @@ public class NTLMAuthenticationFilter extends BaseNTLMAuthenticationFilter
|
||||
throws IOException
|
||||
{
|
||||
// Redirect to the login page if user validation fails
|
||||
|
||||
redirectToLoginPage(req, res);
|
||||
}
|
||||
|
||||
@@ -123,17 +125,44 @@ public class NTLMAuthenticationFilter extends BaseNTLMAuthenticationFilter
|
||||
* @see org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter#onLoginComplete(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected boolean onLoginComplete(HttpServletRequest req, HttpServletResponse res)
|
||||
protected boolean onLoginComplete(ServletContext sc, HttpServletRequest req, HttpServletResponse res, boolean userInit)
|
||||
throws IOException
|
||||
{
|
||||
// If the original URL requested was the login page then redirect to the browse view
|
||||
if (req.getRequestURI().endsWith(getLoginPage()) == true)
|
||||
if (userInit || req.getRequestURI().endsWith(getLoginPage()))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Login page requested, redirecting to browse page");
|
||||
if (logger.isDebugEnabled() && req.getRequestURI().endsWith(getLoginPage()))
|
||||
logger.debug("Login page requested - redirecting to initially configured page");
|
||||
if (logger.isDebugEnabled() && userInit)
|
||||
logger.debug("Session reinitialised - redirecting to initially configured page");
|
||||
|
||||
FacesContext fc = FacesHelper.getFacesContext(req, res, sc);
|
||||
ConfigService configService = Application.getConfigService(fc);
|
||||
ClientConfigElement configElement = (ClientConfigElement)configService.getGlobalConfig().getConfigElement("client");
|
||||
String location = configElement.getInitialLocation();
|
||||
|
||||
String preference = (String)PreferencesService.getPreferences(fc).getValue("start-location");
|
||||
if (preference != null)
|
||||
{
|
||||
location = preference;
|
||||
}
|
||||
|
||||
if (NavigationBean.LOCATION_MYALFRESCO.equals(location))
|
||||
{
|
||||
// Clear previous location - Fixes the issue ADB-61
|
||||
NavigationBean navigationBean = (NavigationBean)FacesHelper.getManagedBean(fc, "NavigationBean");
|
||||
if (navigationBean != null)
|
||||
{
|
||||
navigationBean.setLocation(null);
|
||||
navigationBean.setToolbarLocation(null);
|
||||
}
|
||||
res.sendRedirect(req.getContextPath() + BaseServlet.FACES_SERVLET + "/jsp/dashboards/container.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
res.sendRedirect(req.getContextPath() + BaseServlet.FACES_SERVLET + FacesHelper.BROWSE_VIEW_ID);
|
||||
}
|
||||
|
||||
// Redirect to the browse view
|
||||
res.sendRedirect(req.getContextPath() + "/faces/jsp/browse/browse.jsp");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@@ -45,6 +45,7 @@ import org.alfresco.repo.dictionary.constraint.StringLengthConstraint;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.Constraint;
|
||||
import org.alfresco.service.cmr.dictionary.ConstraintDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
@@ -331,6 +332,12 @@ public abstract class BaseComponentGenerator implements IComponentGenerator
|
||||
if (getControlType() == ControlType.FIELD)
|
||||
{
|
||||
multiValueComponent.setRendererType(RepoConstants.ALFRESCO_FACES_FIELD_RENDERER);
|
||||
|
||||
// set flag to indicate the wrapped field is multilingual, if necessary
|
||||
if (propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT))
|
||||
{
|
||||
multiValueComponent.getAttributes().put("mltext", Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -29,6 +29,7 @@ import javax.faces.component.UISelectOne;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.ui.repo.RepoConstants;
|
||||
import org.alfresco.web.ui.repo.component.UIMultiValueEditor;
|
||||
import org.alfresco.web.ui.repo.component.property.PropertySheetItem;
|
||||
import org.alfresco.web.ui.repo.component.property.UIPropertySheet;
|
||||
|
||||
@@ -45,7 +46,8 @@ public class MultilingualTextFieldGenerator extends TextFieldGenerator
|
||||
{
|
||||
UIComponent component = super.generateAndAdd(context, propertySheet, item);
|
||||
|
||||
if ((component instanceof UISelectOne) == false)
|
||||
if ((component instanceof UISelectOne) == false &&
|
||||
(component instanceof UIMultiValueEditor) == false)
|
||||
{
|
||||
component.setRendererType(RepoConstants.ALFRESCO_FACES_MLTEXT_RENDERER);
|
||||
}
|
||||
|
@@ -65,9 +65,12 @@ public class DeleteSpaceDialog extends BaseDialogBean
|
||||
private static final String DELETE_CONTENTS = "contents";
|
||||
|
||||
private String deleteMode = DELETE_ALL;
|
||||
private boolean executeRules = true;
|
||||
private boolean archiveNodes = true;
|
||||
|
||||
protected boolean hasMultipleParents = false;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Dialog implementation
|
||||
|
||||
@@ -99,12 +102,22 @@ public class DeleteSpaceDialog extends BaseDialogBean
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Trying to delete space: " + node.getId() + " using delete mode: " + this.deleteMode);
|
||||
|
||||
try
|
||||
{
|
||||
if (!this.executeRules)
|
||||
{
|
||||
Repository.getServiceRegistry(context).getRuleService().disableRules();
|
||||
}
|
||||
if (DELETE_ALL.equals(this.deleteMode))
|
||||
{
|
||||
NodeRef nodeRef = node.getNodeRef();
|
||||
// Check the node still exists
|
||||
if (this.getNodeService().exists(nodeRef))
|
||||
{
|
||||
// The node still exists
|
||||
if (!this.archiveNodes)
|
||||
{
|
||||
this.getNodeService().addAspect(node.getNodeRef(), ContentModel.ASPECT_TEMPORARY, null);
|
||||
}
|
||||
this.getNodeService().deleteNode(node.getNodeRef());
|
||||
}
|
||||
}
|
||||
@@ -166,6 +179,10 @@ public class DeleteSpaceDialog extends BaseDialogBean
|
||||
tx = txService.getNonPropagatingUserTransaction();
|
||||
tx.begin();
|
||||
|
||||
if (!this.archiveNodes)
|
||||
{
|
||||
this.getNodeService().addAspect(nodeRef, ContentModel.ASPECT_TEMPORARY, null);
|
||||
}
|
||||
this.getNodeService().deleteNode(nodeRef);
|
||||
|
||||
tx.commit();
|
||||
@@ -177,6 +194,14 @@ public class DeleteSpaceDialog extends BaseDialogBean
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!this.executeRules)
|
||||
{
|
||||
Repository.getServiceRegistry(context).getRuleService().enableRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("WARNING: delete called without a current Space!");
|
||||
@@ -273,4 +298,36 @@ public class DeleteSpaceDialog extends BaseDialogBean
|
||||
{
|
||||
return this.hasMultipleParents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true to execute rules during delete
|
||||
*/
|
||||
public boolean getExecuteRules()
|
||||
{
|
||||
return this.executeRules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param executeRules execute rules during delete
|
||||
*/
|
||||
public void setExecuteRules(boolean executeRules)
|
||||
{
|
||||
this.executeRules = executeRules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true to archive nodes during delete
|
||||
*/
|
||||
public boolean getArchiveNodes()
|
||||
{
|
||||
return this.archiveNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param archiveNodes archive nodes during delete
|
||||
*/
|
||||
public void setArchiveNodes(boolean archiveNodes)
|
||||
{
|
||||
this.archiveNodes = archiveNodes;
|
||||
}
|
||||
}
|
||||
|
@@ -232,20 +232,20 @@ public class XFormsProcessor implements FormProcessor
|
||||
SimpleDateFormat.getDateInstance(DateFormat.SHORT,
|
||||
Application.getLanguage(fc));
|
||||
js.append("alfresco.xforms.constants.DATE_FORMAT = '").
|
||||
append(sdf.toLocalizedPattern()).
|
||||
append(sdf.toPattern()).
|
||||
append("';\n");
|
||||
sdf = (SimpleDateFormat)
|
||||
SimpleDateFormat.getTimeInstance(DateFormat.SHORT,
|
||||
Application.getLanguage(fc));
|
||||
js.append("alfresco.xforms.constants.TIME_FORMAT = '").
|
||||
append(sdf.toLocalizedPattern()).
|
||||
append(sdf.toPattern()).
|
||||
append("';\n");
|
||||
sdf = (SimpleDateFormat)
|
||||
SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT,
|
||||
DateFormat.SHORT,
|
||||
Application.getLanguage(fc));
|
||||
js.append("alfresco.xforms.constants.DATE_TIME_FORMAT = '").
|
||||
append(sdf.toLocalizedPattern()).
|
||||
append(sdf.toPattern()).
|
||||
append("';\n");
|
||||
for (String[] ns : JS_NAMESPACES)
|
||||
{
|
||||
|
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.web.ui.repo.renderer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.ResponseWriter;
|
||||
@@ -51,6 +52,7 @@ public class MultiValueFieldRenderer extends BaseMultiValueRenderer
|
||||
out.write("<tr><td>");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void renderPostWrappedComponent(FacesContext context, ResponseWriter out,
|
||||
UIMultiValueEditor editor) throws IOException
|
||||
@@ -59,6 +61,19 @@ public class MultiValueFieldRenderer extends BaseMultiValueRenderer
|
||||
out.write(Application.getMessage(context, MSG_ADD_TO_LIST_BUTTON));
|
||||
out.write("' onclick=\"");
|
||||
out.write(generateFormSubmit(context, editor, Integer.toString(UIMultiValueEditor.ACTION_ADD)));
|
||||
out.write("\"/></td></tr>");
|
||||
out.write("\"/>");
|
||||
|
||||
// if the wrapped component is an mltext field add the icon
|
||||
if (editor.getAttributes().get("mltext") != null)
|
||||
{
|
||||
String tooltip = Application.getMessage(context, "marker_tooltip");
|
||||
out.write("<img src='");
|
||||
out.write(context.getExternalContext().getRequestContextPath());
|
||||
out.write("/images/icons/multilingual_marker.gif' title='");
|
||||
out.write(tooltip);
|
||||
out.write("' style='margin-left:6px; vertical-align:-2px;'>");
|
||||
}
|
||||
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@ import javax.servlet.jsp.JspException;
|
||||
import javax.servlet.jsp.tagext.TagSupport;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.BaseServlet;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -77,7 +78,7 @@ public class UploadFormTag extends TagSupport
|
||||
out.write(req.getContextPath());
|
||||
out.write("/uploadFileServlet'>\n");
|
||||
out.write("<input type='hidden' name='return-page' value='");
|
||||
out.write(req.getContextPath() + "/faces" + req.getServletPath());
|
||||
out.write(req.getContextPath() + BaseServlet.FACES_SERVLET + req.getServletPath());
|
||||
out.write("'>\n");
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
<xs:simpleType name="five_string_values">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="one"/>
|
||||
<xs:enumeration value="two"/>
|
||||
<xs:enumeration value="three"/>
|
||||
<xs:enumeration value="four"/>
|
||||
<xs:enumeration value="five"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:element name="readonly-and-default-values">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="elements">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="fixed_string" type="xs:normalizedString" fixed="fixed string element value"/>
|
||||
<xs:element name="default_string" type="xs:normalizedString" default="default string element value"/>
|
||||
<xs:element name="fixed_integer" type="xs:integer" fixed="3"/>
|
||||
<xs:element name="default_integer" type="xs:integer" default="3"/>
|
||||
<xs:element name="fixed_date" type="xs:date" fixed="1978-08-08"/>
|
||||
<xs:element name="default_date" type="xs:date" default="1978-08-08"/>
|
||||
<xs:element name="fixed_time" type="xs:time" fixed="14:45:00"/>
|
||||
<xs:element name="default_time" type="xs:time" default="14:45:00"/>
|
||||
<xs:element name="fixed_radio" type="five_string_values" fixed="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>full</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="default_radio" type="five_string_values" default="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>full</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="fixed_combobox" type="five_string_values" fixed="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="default_combobox" type="five_string_values" default="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="fixed_textarea" type="xs:string" fixed="fixed string value"/>
|
||||
<xs:element name="default_textarea" type="xs:string" default="default string value"/>
|
||||
<xs:element name="fixed_checkbox" type="xs:boolean" fixed="true"/>
|
||||
<xs:element name="default_checkbox" type="xs:boolean" default="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="attributes">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="fixed_string" type="xs:normalizedString" fixed="fixed string attribute value"/>
|
||||
<xs:attribute name="default_string" type="xs:normalizedString" default="default string attribute value"/>
|
||||
<xs:attribute name="fixed_integer" type="xs:integer" fixed="3"/>
|
||||
<xs:attribute name="default_integer" type="xs:integer" default="3"/>
|
||||
<xs:attribute name="fixed_date" type="xs:date" fixed="1978-08-08"/>
|
||||
<xs:attribute name="default_date" type="xs:date" default="1978-08-08"/>
|
||||
<xs:attribute name="fixed_time" type="xs:time" fixed="14:45:00"/>
|
||||
<xs:attribute name="default_time" type="xs:time" default="14:45:00"/>
|
||||
<xs:attribute name="fixed_radio" type="five_string_values" fixed="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>full</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="default_radio" type="five_string_values" default="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>full</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="fixed_combobox" type="five_string_values" fixed="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="default_combobox" type="five_string_values" default="three">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="fixed_textarea" type="xs:string" fixed="fixed attribute value"/>
|
||||
<xs:attribute name="default_textarea" type="xs:string" default="default attribute value"/>
|
||||
<xs:attribute name="fixed_checkbox" type="xs:boolean" fixed="true"/>
|
||||
<xs:attribute name="default_checkbox" type="xs:boolean" default="true"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -78,3 +78,13 @@
|
||||
<f:selectItem itemValue="contents" itemLabel="#{msg.delete_op_contents}" />
|
||||
</h:selectOneRadio>
|
||||
</h:panelGrid>
|
||||
|
||||
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin}">
|
||||
<h:outputText value="#{msg.options}" styleClass="mainSubTitle" />
|
||||
<h:panelGrid columns="2" cellpadding="1" cellspacing="1" border="0">
|
||||
<h:outputText value="#{msg.delete_execute_rules}:" />
|
||||
<h:selectBooleanCheckbox value="#{DialogManager.bean.executeRules}" />
|
||||
<h:outputText value="#{msg.delete_archive_nodes}:" />
|
||||
<h:selectBooleanCheckbox value="#{DialogManager.bean.archiveNodes}" />
|
||||
</h:panelGrid>
|
||||
</a:booleanEvaluator>
|
@@ -58,7 +58,7 @@
|
||||
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
|
||||
altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10"
|
||||
initialSortColumn="name" initialSortDescending="true"
|
||||
rendered="#{not empty DialogManager.bean.resources}">
|
||||
rendered="#{not empty DialogManager.bean.resources}" refreshOnBind="true">
|
||||
|
||||
<%-- Name column --%>
|
||||
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
|
||||
|
Reference in New Issue
Block a user