+*/
\ No newline at end of file
diff --git a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java
index fe95708dfa..978bf86817 100644
--- a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java
+++ b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java
@@ -266,11 +266,18 @@ public class AlfrescoNavigationHandler extends NavigationHandler
if (dispatchContext != null)
{
+ if (logger.isDebugEnabled())
+ logger.debug("Using dispatch context for dialog lookup: " +
+ dispatchContext.getType().toString());
+
// use the node to perform the lookup (this will include the global section)
config = configSvc.getConfig(dispatchContext);
}
else
{
+ if (logger.isDebugEnabled())
+ logger.debug("Looking up dialog in global config");
+
// just use the global
config = configSvc.getGlobalConfig();
}
@@ -306,11 +313,18 @@ public class AlfrescoNavigationHandler extends NavigationHandler
if (dispatchContext != null)
{
+ if (logger.isDebugEnabled())
+ logger.debug("Using dispatch context for wizard lookup: " +
+ dispatchContext.getType().toString());
+
// use the node to perform the lookup (this will include the global section)
config = configSvc.getConfig(dispatchContext);
}
else
{
+ if (logger.isDebugEnabled())
+ logger.debug("Looking up wizard in global config");
+
// just use the global
config = configSvc.getGlobalConfig();
}
diff --git a/source/java/org/alfresco/web/app/Application.java b/source/java/org/alfresco/web/app/Application.java
index 04552ed611..1f9e5b03a2 100644
--- a/source/java/org/alfresco/web/app/Application.java
+++ b/source/java/org/alfresco/web/app/Application.java
@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.web.app.servlet.AuthenticationHelper;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.ErrorBean;
+import org.alfresco.web.bean.dashboard.DashboardManager;
import org.alfresco.web.bean.dialog.DialogManager;
import org.alfresco.web.bean.repository.User;
import org.alfresco.web.bean.wizard.WizardManager;
@@ -189,6 +190,16 @@ public class Application
return (WizardManager)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "WizardManager");
}
+ /**
+ * Retrieves the DashboardManager managed bean
+ *
+ * @return DashboardManager bean
+ */
+ public static DashboardManager getDashboardManager()
+ {
+ return (DashboardManager)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "DashboardManager");
+ }
+
/**
* Retrieves the configured error page for the application
*
diff --git a/source/java/org/alfresco/web/app/servlet/BaseServlet.java b/source/java/org/alfresco/web/app/servlet/BaseServlet.java
index 7a252331bc..90b4c7c687 100644
--- a/source/java/org/alfresco/web/app/servlet/BaseServlet.java
+++ b/source/java/org/alfresco/web/app/servlet/BaseServlet.java
@@ -66,10 +66,10 @@ public abstract class BaseServlet extends HttpServlet
static
{
validRedirectJSPs.add("/jsp/browse/browse.jsp");
- validRedirectJSPs.add("/jsp/browse/dashboard.jsp");
validRedirectJSPs.add("/jsp/admin/admin-console.jsp");
validRedirectJSPs.add("/jsp/admin/node-browser.jsp");
validRedirectJSPs.add("/jsp/admin/store-browser.jsp");
+ validRedirectJSPs.add("/jsp/users/user-console.jsp");
validRedirectJSPs.add("/jsp/categories/categories.jsp");
validRedirectJSPs.add("/jsp/dialog/about.jsp");
validRedirectJSPs.add("/jsp/dialog/advanced-search.jsp");
@@ -77,6 +77,7 @@ public abstract class BaseServlet extends HttpServlet
validRedirectJSPs.add("/jsp/forums/forums.jsp");
validRedirectJSPs.add("/jsp/users/users.jsp");
validRedirectJSPs.add("/jsp/trashcan/trash-list.jsp");
+ validRedirectJSPs.add("/jsp/dashboards/container.jsp");
}
private static Log logger = LogFactory.getLog(BaseServlet.class);
@@ -103,8 +104,22 @@ public abstract class BaseServlet extends HttpServlet
*
* @throws IOException
*/
- public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res)
+ public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res)
throws IOException
+ {
+ return servletAuthenticate(req, res, true);
+ }
+
+ /**
+ * Perform an authentication for the servlet request URI. Processing any "ticket" or
+ * "guest" URL arguments.
+ *
+ * @return AuthenticationStatus
+ *
+ * @throws IOException
+ */
+ public AuthenticationStatus servletAuthenticate(HttpServletRequest req, HttpServletResponse res,
+ boolean redirectToLoginPage) throws IOException
{
AuthenticationStatus status;
@@ -124,9 +139,9 @@ public abstract class BaseServlet extends HttpServlet
}
status = AuthenticationHelper.authenticate(getServletContext(), req, res, forceGuest);
}
- if (status == AuthenticationStatus.Failure)
+ if (status == AuthenticationStatus.Failure && redirectToLoginPage)
{
- // authentication failed - now need to display the login page to the user
+ // authentication failed - now need to display the login page to the user, if asked to
redirectToLoginPage(req, res, getServletContext());
}
diff --git a/source/java/org/alfresco/web/app/servlet/CommandServlet.java b/source/java/org/alfresco/web/app/servlet/CommandServlet.java
index 2ccfb0ed40..0beb509ddc 100644
--- a/source/java/org/alfresco/web/app/servlet/CommandServlet.java
+++ b/source/java/org/alfresco/web/app/servlet/CommandServlet.java
@@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory;
* The 'processor-name' identifies the command processor to execute the command. For example the
* 'workflow' processor will execute workflow commands upon a node (e.g. "approve" or "reject").
* For example:
- * /alfresco/command/workflow/approve/workspace/SpacesStore/0000-0000-0000-0000
+ * /alfresco/command/workflow/approve/workspace/SpacesStore/0000-0000-0000-0000
* The store protocol, followed by the store ID, followed by the content Node Id used to
* identify the node to execute the workflow action upon.
*
diff --git a/source/java/org/alfresco/web/app/servlet/TemplateContentServlet.java b/source/java/org/alfresco/web/app/servlet/TemplateContentServlet.java
index 8d51790e69..11cc65633d 100644
--- a/source/java/org/alfresco/web/app/servlet/TemplateContentServlet.java
+++ b/source/java/org/alfresco/web/app/servlet/TemplateContentServlet.java
@@ -261,7 +261,8 @@ public class TemplateContentServlet extends BaseServlet
private Object getModel(ServiceRegistry services, HttpServletRequest req, NodeRef templateRef, NodeRef nodeRef)
{
// build FreeMarker default model and merge
- Map root = DefaultModelHelper.buildDefaultModel(services, Application.getCurrentUser(req.getSession()));
+ Map root = DefaultModelHelper.buildDefaultModel(
+ services, Application.getCurrentUser(req.getSession()), templateRef);
// put the current NodeRef in as "space" and "document"
TemplateNode node = new TemplateNode(nodeRef, services, this.imageResolver);
diff --git a/source/java/org/alfresco/web/app/servlet/ajax/AjaxCommand.java b/source/java/org/alfresco/web/app/servlet/ajax/AjaxCommand.java
new file mode 100644
index 0000000000..17eba223be
--- /dev/null
+++ b/source/java/org/alfresco/web/app/servlet/ajax/AjaxCommand.java
@@ -0,0 +1,37 @@
+package org.alfresco.web.app.servlet.ajax;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Interface for all Ajax commands executed by this servlet.
+ *
+ * The method is responsible for invoking the underlying managed bean
+ * and dealing with the response.
+ *
+ * @author gavinc
+ */
+public interface AjaxCommand
+{
+ /**
+ * Invokes the relevant method on the bean represented by the given
+ * expression. Parameters required to call the method can be retrieved
+ * from the request.
+ *
+ * Currently the content type of the response will always be text/html, in the
+ * future sublcasses may provide a mechanism to allow the content type to be set
+ * dynamically.
+ *
+ * @param facesContext FacesContext
+ * @param expression The binding expression
+ * @param request The request
+ * @param response The response
+ */
+ public abstract void execute(FacesContext facesContext, String expression,
+ HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException;
+}
diff --git a/source/java/org/alfresco/web/app/servlet/ajax/AjaxServlet.java b/source/java/org/alfresco/web/app/servlet/ajax/AjaxServlet.java
new file mode 100644
index 0000000000..20d5d07938
--- /dev/null
+++ b/source/java/org/alfresco/web/app/servlet/ajax/AjaxServlet.java
@@ -0,0 +1,184 @@
+package org.alfresco.web.app.servlet.ajax;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.alfresco.error.AlfrescoRuntimeException;
+import org.alfresco.web.app.servlet.AuthenticationStatus;
+import org.alfresco.web.app.servlet.BaseServlet;
+import org.alfresco.web.app.servlet.FacesHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Servlet responsible for processing AJAX requests.
+ *
+ * The URL to the servlet should be in the form:
+ *
/alfresco/ajax/command/Bean.binding.expression
+ *
+ * See http://wiki.alfresco.com/wiki/AJAX_Support for details.
+ *
+ * Like most Alfresco servlets, the URL may be followed by a valid 'ticket' argument for authentication:
+ * ?ticket=1234567890
+ *
+ * @author gavinc
+ */
+public class AjaxServlet extends BaseServlet
+{
+ public static final String AJAX_LOG_KEY = "alfresco.ajax";
+
+ protected enum Command { invoke, get, set};
+
+ private static final long serialVersionUID = -7654769105419391840L;
+ private static Log logger = LogFactory.getLog(AJAX_LOG_KEY);
+ private static Log headersLogger = LogFactory.getLog(AJAX_LOG_KEY + ".headers");
+ private static Log perfLogger = LogFactory.getLog(AJAX_LOG_KEY + ".performance");
+
+ /**
+ * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ */
+ protected void service(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ long startTime = 0;
+
+ try
+ {
+ String uri = request.getRequestURI();
+
+ if (logger.isDebugEnabled())
+ {
+ String queryString = request.getQueryString();
+ logger.debug("Processing URL: " + uri +
+ ((queryString != null && queryString.length() > 0) ? ("?" + queryString) : ""));
+ }
+
+ // dump the request headers
+ if (headersLogger.isDebugEnabled())
+ {
+ Enumeration headers = request.getHeaderNames();
+ while (headers.hasMoreElements())
+ {
+ String name = (String)headers.nextElement();
+ headersLogger.debug(name + ": " + request.getHeader(name));
+ }
+ }
+
+ // Make sure the user is authenticated, if not throw an error to return the
+ // 500 Internal Server Error code back to the client
+ AuthenticationStatus status = servletAuthenticate(request, response, false);
+ if (status == AuthenticationStatus.Failure)
+ {
+ throw new AlfrescoRuntimeException("Access Denied: User not authenticated");
+ }
+
+ uri = uri.substring(request.getContextPath().length());
+ StringTokenizer t = new StringTokenizer(uri, "/");
+ int tokenCount = t.countTokens();
+ if (tokenCount < 3)
+ {
+ throw new AlfrescoRuntimeException("Servlet URL did not contain all required args: " + uri);
+ }
+
+ // skip the servlet name
+ t.nextToken();
+
+ // retrieve the command from the URL
+ String commandName = t.nextToken();
+
+ // retrieve the binding expression from the URL
+ String expression = t.nextToken();
+
+ // setup the faces context
+ FacesContext facesContext = FacesHelper.getFacesContext(request, response, getServletContext());
+
+ // start a timer
+ if (perfLogger.isDebugEnabled())
+ startTime = System.currentTimeMillis();
+
+ // instantiate the relevant command
+ AjaxCommand command = null;
+ if (Command.invoke.toString().equals(commandName))
+ {
+ command = new InvokeCommand();
+ }
+ else if (Command.get.toString().equals(commandName))
+ {
+ command = new GetCommand();
+ }
+ else
+ {
+ throw new AlfrescoRuntimeException("Unrecognised command received: " + commandName);
+ }
+
+ // execute the command
+ command.execute(facesContext, expression, request, response);
+ }
+ catch (RuntimeException error)
+ {
+ handleError(response, error);
+ }
+ finally
+ {
+ // measure the time taken
+ if (perfLogger.isDebugEnabled())
+ {
+ long endTime = System.currentTimeMillis();
+ perfLogger.debug("Time to execute command: " + (endTime - startTime) + "ms");
+ }
+ }
+ }
+
+ /**
+ * Handles any error that occurs during the execution of the servlet
+ *
+ * @param response The response
+ * @param cause The cause of the error
+ */
+ protected void handleError(HttpServletResponse response, RuntimeException cause)
+ throws ServletException, IOException
+ {
+ // if we can send back the 500 error with the error from the top of the
+ // stack as the error status message.
+
+ // NOTE: if we use the built in support for generating error pages for
+ // 500 errors we can tailor the output for AJAX calls so that the
+ // body of the response can be used to show the error details.
+
+ if (!response.isCommitted())
+ {
+ // dump the error if debugging is enabled
+ if (logger.isDebugEnabled())
+ {
+ logger.error(cause);
+ Throwable theCause = cause.getCause();
+ if (theCause != null)
+ {
+ logger.error("caused by: ", theCause);
+ }
+ }
+
+ // extract a message from the exception
+ String msg = cause.getMessage();
+ if (msg == null)
+ {
+ msg = cause.toString();
+ }
+
+ // send the error
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
+ }
+ else
+ {
+ // the response has already been comitted, not much we can do but
+ // let the error through and let the container deal with it
+ throw cause;
+ }
+ }
+}
diff --git a/source/java/org/alfresco/web/app/servlet/ajax/BaseAjaxCommand.java b/source/java/org/alfresco/web/app/servlet/ajax/BaseAjaxCommand.java
new file mode 100644
index 0000000000..0ed97ccbc4
--- /dev/null
+++ b/source/java/org/alfresco/web/app/servlet/ajax/BaseAjaxCommand.java
@@ -0,0 +1,19 @@
+package org.alfresco.web.app.servlet.ajax;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base class for all Ajax based commands
+ *
+ * @author gavinc
+ */
+public abstract class BaseAjaxCommand implements AjaxCommand
+{
+ protected static Log logger = LogFactory.getLog(AjaxServlet.AJAX_LOG_KEY);
+
+ public String makeBindingExpression(String expression)
+ {
+ return "#{" + expression + "}";
+ }
+}
diff --git a/source/java/org/alfresco/web/app/servlet/ajax/GetCommand.java b/source/java/org/alfresco/web/app/servlet/ajax/GetCommand.java
new file mode 100644
index 0000000000..b513e27154
--- /dev/null
+++ b/source/java/org/alfresco/web/app/servlet/ajax/GetCommand.java
@@ -0,0 +1,69 @@
+package org.alfresco.web.app.servlet.ajax;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.UserTransaction;
+
+import org.alfresco.error.AlfrescoRuntimeException;
+import org.alfresco.web.bean.repository.Repository;
+
+/**
+ * Command that executes the given value binding expression.
+ *
+ * This command is intended to be used for calling existing managed
+ * bean methods. The result of the value binding is added to
+ * the response as is i.e. by calling toString().
+ * The content type of the response is always text/html.
+ *
+ * @author gavinc
+ */
+public class GetCommand extends BaseAjaxCommand
+{
+ public void execute(FacesContext facesContext, String expression,
+ HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ // create the JSF binding expression
+ String bindingExpr = makeBindingExpression(expression);
+
+ if (logger.isDebugEnabled())
+ logger.debug("Retrieving value from value binding: " + bindingExpr);
+
+ UserTransaction tx = null;
+ try
+ {
+ // create the value binding
+ ValueBinding binding = facesContext.getApplication().
+ createValueBinding(bindingExpr);
+
+ if (binding != null)
+ {
+ // setup the transaction
+ tx = Repository.getUserTransaction(facesContext, true);
+ tx.begin();
+
+ // get the value from the value binding
+ Object value = binding.getValue(facesContext);
+ if (value != null)
+ {
+ response.getWriter().write(value.toString());
+ }
+
+ // commit
+ tx.commit();
+ }
+ }
+ catch (Throwable err)
+ {
+ // rollback the transaction
+ try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
+
+ throw new AlfrescoRuntimeException("Failed to retrieve value: " + err.getMessage(), err);
+ }
+ }
+}
diff --git a/source/java/org/alfresco/web/app/servlet/ajax/InvokeCommand.java b/source/java/org/alfresco/web/app/servlet/ajax/InvokeCommand.java
new file mode 100644
index 0000000000..3c5e905804
--- /dev/null
+++ b/source/java/org/alfresco/web/app/servlet/ajax/InvokeCommand.java
@@ -0,0 +1,97 @@
+package org.alfresco.web.app.servlet.ajax;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import javax.faces.FactoryFinder;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.MethodBinding;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.UserTransaction;
+
+import org.alfresco.error.AlfrescoRuntimeException;
+import org.alfresco.repo.content.MimetypeMap;
+import org.alfresco.web.bean.repository.Repository;
+
+/**
+ * Command that invokes the method represented by the expression.
+ *
+ * The managed bean method called is responsible for writing the response
+ * by getting hold of the JSF ResponseWriter. Parameters can also be
+ * retrieved via the JSF ExternalContext object.
+ *
+ * In a future release (if required) annotations may be used to state
+ * what content type to use for the response.
+ *
+ * @author gavinc
+ */
+public class InvokeCommand extends BaseAjaxCommand
+{
+ public void execute(FacesContext facesContext, String expression,
+ HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ // setup the JSF response writer.
+
+ // NOTE: it doesn't seem to matter what the content type of the response is (at least with Dojo),
+ // it determines it's behaviour from the mimetype specified in the AJAX call on the client,
+ // therefore, for now we will always return a content type of text/html.
+ // In the future we may use annotations on the method to be called to specify what content
+ // type should be used for the response.
+
+ OutputStream os = response.getOutputStream();
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+ RenderKitFactory renderFactory = (RenderKitFactory)FactoryFinder.
+ getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ RenderKit renderKit = renderFactory.getRenderKit(facesContext,
+ viewRoot.getRenderKitId());
+ ResponseWriter writer = renderKit.createResponseWriter(
+ new OutputStreamWriter(os), MimetypeMap.MIMETYPE_HTML, "UTF-8");
+ facesContext.setResponseWriter(writer);
+ response.setContentType(writer.getContentType());
+
+ // create the JSF binding expression
+ String bindingExpr = makeBindingExpression(expression);
+
+ if (logger.isDebugEnabled())
+ logger.debug("Invoking method represented by " + bindingExpr);
+
+ UserTransaction tx = null;
+ try
+ {
+ // create the method binding from the expression
+ MethodBinding binding = facesContext.getApplication().createMethodBinding(
+ bindingExpr, new Class[] {});
+
+ if (binding != null)
+ {
+ // setup the transaction
+ tx = Repository.getUserTransaction(facesContext);
+ tx.begin();
+
+ // invoke the method
+ binding.invoke(facesContext, new Object[] {});
+
+ // commit
+ tx.commit();
+ }
+ }
+ catch (Throwable err)
+ {
+ // rollback the transaction
+ try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
+
+ throw new AlfrescoRuntimeException("Failed to execute method: " + err.getMessage(), err);
+ }
+
+ // force the output back to the client
+ writer.close();
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java b/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java
index ad3ed8102b..6084b72d36 100644
--- a/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java
+++ b/source/java/org/alfresco/web/bean/AdminNodeBrowseBean.java
@@ -768,7 +768,7 @@ public class AdminNodeBrowseBean
/**
* Permission representing the fact that "Read Permissions" has not been granted
*/
- public class NoReadPermissionGranted
+ public static class NoReadPermissionGranted
{
public String getPermission()
{
diff --git a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
index 44047c6587..05f2451530 100644
--- a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
+++ b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
@@ -1531,7 +1531,11 @@ public class AdvancedSearchBean
AspectDefinition aspectDef = dd.getAspect(aspect);
propDef = aspectDef.getProperties().get(propQName);
}
- customPropertyLookup.put(propQName.toString(), propDef.getDataType());
+
+ if (propQName != null && propDef != null)
+ {
+ customPropertyLookup.put(propQName.toString(), propDef.getDataType());
+ }
}
}
}
diff --git a/source/java/org/alfresco/web/bean/BrowseBean.java b/source/java/org/alfresco/web/bean/BrowseBean.java
index 3c8b7c57df..12e283bc33 100644
--- a/source/java/org/alfresco/web/bean/BrowseBean.java
+++ b/source/java/org/alfresco/web/bean/BrowseBean.java
@@ -1350,117 +1350,38 @@ public class BrowseBean implements IContextListener
}
/**
- * Handler called upon the completion of the Delete Space page
+ * Removes the given node from the breadcrumb i.e. following a delete
*
- * @return outcome
+ * @param node The space to remove from the breadcrumb
*/
- public String deleteSpaceOK()
+ public void removeSpaceFromBreadcrumb(Node node)
{
- String outcome = null;
-
- Node node = getActionSpace();
- if (node != null)
+ List location = navigator.getLocation();
+ IBreadcrumbHandler handler = location.get(location.size() - 1);
+ if (handler instanceof BrowseBreadcrumbHandler)
{
- try
+ // see if the current breadcrumb location is our node
+ if ( ((BrowseBreadcrumbHandler)handler).getNodeRef().equals(node.getNodeRef()) == true )
{
- if (logger.isDebugEnabled())
- logger.debug("Trying to delete space: " + node.getId());
+ location.remove(location.size() - 1);
- this.nodeService.deleteNode(node.getNodeRef());
-
- // remove this node from the breadcrumb if required
- List location = navigator.getLocation();
- IBreadcrumbHandler handler = location.get(location.size() - 1);
- if (handler instanceof BrowseBreadcrumbHandler)
+ // now work out which node to set the list to refresh against
+ if (location.size() != 0)
{
- // see if the current breadcrumb location is our node
- if ( ((BrowseBreadcrumbHandler)handler).getNodeRef().equals(node.getNodeRef()) == true )
+ handler = location.get(location.size() - 1);
+ if (handler instanceof BrowseBreadcrumbHandler)
{
- location.remove(location.size() - 1);
-
- // now work out which node to set the list to refresh against
- if (location.size() != 0)
- {
- handler = location.get(location.size() - 1);
- if (handler instanceof BrowseBreadcrumbHandler)
- {
- // change the current node Id
- navigator.setCurrentNodeId(((BrowseBreadcrumbHandler)handler).getNodeRef().getId());
- }
- else
- {
- // TODO: shouldn't do this - but for now the user home dir is the root!
- navigator.setCurrentNodeId(Application.getCurrentUser(FacesContext.getCurrentInstance()).getHomeSpaceId());
- }
- }
+ // change the current node Id
+ navigator.setCurrentNodeId(((BrowseBreadcrumbHandler)handler).getNodeRef().getId());
+ }
+ else
+ {
+ // TODO: shouldn't do this - but for now the user home dir is the root!
+ navigator.setCurrentNodeId(Application.getCurrentUser(FacesContext.getCurrentInstance()).getHomeSpaceId());
}
}
-
- // add a message to inform the user that the delete was OK
- String statusMsg = MessageFormat.format(
- Application.getMessage(FacesContext.getCurrentInstance(), "status_space_deleted"),
- new Object[]{node.getName()});
- Utils.addStatusMessage(FacesMessage.SEVERITY_INFO, statusMsg);
-
- // clear action context
- setActionSpace(null);
-
- // setting the outcome will show the browse view again
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
- AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
- }
- catch (Throwable err)
- {
- Utils.addErrorMessage(Application.getMessage(
- FacesContext.getCurrentInstance(), MSG_ERROR_DELETE_SPACE) + err.getMessage(), err);
}
}
- else
- {
- logger.warn("WARNING: deleteSpaceOK called without a current Space!");
- }
-
- return outcome;
- }
-
- /**
- * Handler called upon the completion of the Delete File page
- *
- * @return outcome
- */
- public String deleteFileOK()
- {
- String outcome = null;
-
- Node node = getDocument();
- if (node != null)
- {
- try
- {
- if (logger.isDebugEnabled())
- logger.debug("Trying to delete content node: " + node.getId());
-
- this.nodeService.deleteNode(node.getNodeRef());
-
- // clear action context
- setDocument(null);
-
- // setting the outcome will show the browse view again
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
- AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
- }
- catch (Throwable err)
- {
- Utils.addErrorMessage(Application.getMessage(
- FacesContext.getCurrentInstance(), MSG_ERROR_DELETE_FILE) + err.getMessage(), err);
- }
- }
- else
- {
- logger.warn("WARNING: deleteFileOK called without a current Document!");
- }
-
- return outcome;
}
/**
@@ -1724,8 +1645,6 @@ public class BrowseBean implements IContextListener
private static final String PAGE_NAME_BROWSE = "browse";
/** I18N messages */
- private static final String MSG_ERROR_DELETE_FILE = "error_delete_file";
- private static final String MSG_ERROR_DELETE_SPACE = "error_delete_space";
private static final String MSG_DELETE_COMPANYROOT = "delete_companyroot_confirm";
private static final String MSG_SEARCH_MINIMUM = "search_minimum";
diff --git a/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java b/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java
index c40d85ac97..4e8679ed3d 100644
--- a/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java
+++ b/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java
@@ -58,6 +58,14 @@ public class CheckinCheckoutBean
// ------------------------------------------------------------------------------
// Bean property getters and setters
+ /**
+ * @param navigator The NavigationBean to set.
+ */
+ public void setNavigator(NavigationBean navigator)
+ {
+ this.navigator = navigator;
+ }
+
/**
* @return Returns the BrowseBean.
*/
@@ -535,6 +543,7 @@ public class CheckinCheckoutBean
String id = params.get("id");
if (id != null && id.length() != 0)
{
+ boolean editingInline = false;
Node node = setupContentDocument(id);
// detect the inline editing aspect to see which edit mode to use
@@ -544,50 +553,44 @@ public class CheckinCheckoutBean
{
// retrieve the content reader for this node
ContentReader reader = getContentService().getReader(node.getNodeRef(), ContentModel.PROP_CONTENT);
- String mimetype = reader.getMimetype();
-
- // calculate which editor screen to display
- if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) ||
- MimetypeMap.MIMETYPE_XML.equals(mimetype) ||
- MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) ||
- MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
+ if (reader != null)
{
- // make content available to the editing screen
- if (reader != null)
+ editingInline = true;
+ String mimetype = reader.getMimetype();
+
+ // calculate which editor screen to display
+ if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) ||
+ MimetypeMap.MIMETYPE_XML.equals(mimetype) ||
+ MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) ||
+ MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
{
+ // make content available to the editing screen
setEditorOutput(reader.getContentString());
+
+ // navigate to appropriate screen
+ FacesContext fc = FacesContext.getCurrentInstance();
+ this.navigator.setupDispatchContext(node);
+ fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editTextInline");
}
else
{
- setEditorOutput("");
- }
-
- // navigate to appropriate screen
- FacesContext fc = FacesContext.getCurrentInstance();
- fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editTextInline");
- }
- else
- {
- // make content available to the editing screen
- if (reader != null)
- {
+ // make content available to the editing screen
setDocumentContent(reader.getContentString());
+ setEditorOutput(null);
+
+ // navigate to appropriate screen
+ FacesContext fc = FacesContext.getCurrentInstance();
+ this.navigator.setupDispatchContext(node);
+ fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editHtmlInline");
}
- else
- {
- setDocumentContent("");
- }
- setEditorOutput(null);
-
- // navigate to appropriate screen
- FacesContext fc = FacesContext.getCurrentInstance();
- fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editHtmlInline");
}
}
- else
+
+ if (editingInline == false)
{
// normal downloadable document
FacesContext fc = FacesContext.getCurrentInstance();
+ this.navigator.setupDispatchContext(node);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "editFile");
}
}
@@ -750,7 +753,6 @@ public class CheckinCheckoutBean
// we can either checkin the content from the current working copy node
// which would have been previously updated by the user
String contentUrl;
- String mimetype;
if (getCopyLocation().equals(COPYLOCATION_CURRENT))
{
ContentData contentData = (ContentData) node.getProperties().get(ContentModel.PROP_CONTENT);
@@ -785,11 +787,9 @@ public class CheckinCheckoutBean
props.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);
}
- NodeRef originalDoc = this.versionOperationsService.checkin(
- node.getNodeRef(),
- props,
- contentUrl,
- this.keepCheckedOut);
+ // perform the checkin
+ this.versionOperationsService.checkin(node.getNodeRef(),
+ props, contentUrl, this.keepCheckedOut);
// commit the transaction
tx.commit();
@@ -941,6 +941,9 @@ public class CheckinCheckoutBean
/** The BrowseBean to be used by the bean */
protected BrowseBean browseBean;
+ /** The NavigationBean bean reference */
+ protected NavigationBean navigator;
+
/** The NodeService to be used by the bean */
protected NodeService nodeService;
diff --git a/source/java/org/alfresco/web/bean/ExportBean.java b/source/java/org/alfresco/web/bean/ExportBean.java
index f719191f48..8bcc77e14e 100644
--- a/source/java/org/alfresco/web/bean/ExportBean.java
+++ b/source/java/org/alfresco/web/bean/ExportBean.java
@@ -103,7 +103,7 @@ public class ExportBean
params.put(ExporterActionExecuter.PARAM_PACKAGE_NAME, this.packageName);
params.put(ExporterActionExecuter.PARAM_ENCODING, this.encoding);
params.put(ExporterActionExecuter.PARAM_DESTINATION_FOLDER, this.destination);
- params.put(ExporterActionExecuter.PARAM_INCLUDE_CHILDREN, new Boolean(includeChildren));
+ params.put(ExporterActionExecuter.PARAM_INCLUDE_CHILDREN, Boolean.valueOf(includeChildren));
params.put(ExporterActionExecuter.PARAM_INCLUDE_SELF, new Boolean(includeSelf));
action = this.actionService.createAction(ExporterActionExecuter.NAME, params);
}
diff --git a/source/java/org/alfresco/web/bean/GroupsBean.java b/source/java/org/alfresco/web/bean/GroupsBean.java
index 58b5c1de4a..5ee6f4a2ef 100644
--- a/source/java/org/alfresco/web/bean/GroupsBean.java
+++ b/source/java/org/alfresco/web/bean/GroupsBean.java
@@ -40,6 +40,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.cmr.security.AuthorityType;
+import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.web.app.Application;
@@ -568,16 +569,21 @@ public class GroupsBean implements IContextListener
services.getNamespaceService(),
false);
- items = new SelectItem[nodes.size()];
- for (int index=0; index itemList = new ArrayList(nodes.size());
+ for (NodeRef personRef : nodes)
{
- NodeRef personRef = nodes.get(index);
- String firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
- String lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
String username = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_USERNAME);
- SelectItem item = new SortableSelectItem(username, firstName + " " + lastName, lastName);
- items[index] = item;
+ if (PermissionService.GUEST_AUTHORITY.equals(username) == false)
+ {
+ String firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
+ String lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
+
+ SelectItem item = new SortableSelectItem(username, firstName + " " + lastName, lastName);
+ itemList.add(item);
+ }
}
+ items = new SelectItem[itemList.size()];
+ itemList.toArray(items);
// commit the transaction
tx.commit();
diff --git a/source/java/org/alfresco/web/bean/LinkPropertiesBean.java b/source/java/org/alfresco/web/bean/LinkPropertiesBean.java
index f45ae9d1de..6e3c071dbc 100644
--- a/source/java/org/alfresco/web/bean/LinkPropertiesBean.java
+++ b/source/java/org/alfresco/web/bean/LinkPropertiesBean.java
@@ -137,7 +137,7 @@ public class LinkPropertiesBean
Map props = this.editableNode.getProperties();
// get the name and move the node as necessary
- String name = (String)props.get(ContentModel.PROP_NAME);
+ //String name = (String)props.get(ContentModel.PROP_NAME);
//if (name != null)
//{
// fileFolderService.rename(nodeRef, name);
diff --git a/source/java/org/alfresco/web/bean/NavigationBean.java b/source/java/org/alfresco/web/bean/NavigationBean.java
index 0cc97b2301..57a7f07158 100644
--- a/source/java/org/alfresco/web/bean/NavigationBean.java
+++ b/source/java/org/alfresco/web/bean/NavigationBean.java
@@ -62,6 +62,10 @@ import org.apache.log4j.Logger;
*/
public class NavigationBean
{
+ private static final String OUTCOME_MYALFRESCO = "myalfresco";
+
+ private static final String OUTCOME_BROWSE = "browse";
+
/**
* Default constructor
*/
@@ -394,10 +398,18 @@ public class NavigationBean
{
ContentContext contentCtx = (ContentContext) diskShare.getContext();
NodeRef rootNode = contentCtx.getRootNode();
- String cifsPath = Repository.getNamePath(this.nodeService, path, rootNode, "\\", "file:///" + getCIFSServerPath(diskShare));
+ try
+ {
+ String cifsPath = Repository.getNamePath(this.nodeService, path, rootNode, "\\", "file:///" + getCIFSServerPath(diskShare));
- node.getProperties().put("cifsPath", cifsPath);
- node.getProperties().put("cifsPathLabel", cifsPath.substring(8)); // strip file:/// part
+ node.getProperties().put("cifsPath", cifsPath);
+ node.getProperties().put("cifsPathLabel", cifsPath.substring(8)); // strip file:/// part
+ }
+ catch(AccessDeniedException ade)
+ {
+ node.getProperties().put("cifsPath", "");
+ node.getProperties().put("cifsPathLabel",""); // strip file:/// part
+ }
}
this.currentNode = node;
@@ -587,6 +599,9 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(companyHome.getNodeRef(), companyHome.getName()));
setLocation(elements);
setCurrentNodeId(companyHome.getId());
+
+ // we need to force a navigation to refresh the browse screen breadcrumb
+ context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
}
else if (LOCATION_HOME.equals(location))
{
@@ -597,6 +612,9 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(homeSpaceRef, homeSpaceName));
setLocation(elements);
setCurrentNodeId(homeSpaceRef.getId());
+
+ // we need to force a navigation to refresh the browse screen breadcrumb
+ context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
}
else if (LOCATION_GUEST.equals(location))
{
@@ -605,10 +623,31 @@ public class NavigationBean
elements.add(new NavigationBreadcrumbHandler(guestHome.getNodeRef(), guestHome.getName()));
setLocation(elements);
setCurrentNodeId(guestHome.getId());
+
+ // we need to force a navigation to refresh the browse screen breadcrumb
+ context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_BROWSE);
+ }
+ else if (LOCATION_DASHBOARD.equals(location))
+ {
+ List elements = new ArrayList(1);
+ elements.add(new IBreadcrumbHandler()
+ {
+ public String navigationOutcome(UIBreadcrumb breadcrumb)
+ {
+ setLocation( (List)breadcrumb.getValue() );
+ return OUTCOME_MYALFRESCO;
+ };
+
+ public String toString()
+ {
+ return Application.getMessage(FacesContext.getCurrentInstance(), MSG_MYALFRESCO);
+ };
+ });
+ setLocation(elements);
+
+ // we need to force a navigation to refresh the browse screen breadcrumb
+ context.getApplication().getNavigationHandler().handleNavigation(context, null, OUTCOME_MYALFRESCO);
}
-
- // we need to force a navigation to refresh the browse screen breadcrumb
- context.getApplication().getNavigationHandler().handleNavigation(context, null, "browse");
}
catch (InvalidNodeRefException refErr)
{
@@ -711,7 +750,7 @@ public class NavigationBean
}
else
{
- return "browse";
+ return OUTCOME_BROWSE;
}
}
@@ -734,6 +773,9 @@ public class NavigationBean
private static final String LOCATION_COMPANY = "company";
private static final String LOCATION_HOME = "home";
private static final String LOCATION_GUEST = "guest";
+ private static final String LOCATION_DASHBOARD = "dashboard";
+
+ private static final String MSG_MYALFRESCO = "my_alfresco";
private static final String ERROR_DELETED_FOLDER = "error_deleted_folder";
diff --git a/source/java/org/alfresco/web/bean/SearchContext.java b/source/java/org/alfresco/web/bean/SearchContext.java
index f100d0d4d8..cf5b0855e1 100644
--- a/source/java/org/alfresco/web/bean/SearchContext.java
+++ b/source/java/org/alfresco/web/bean/SearchContext.java
@@ -225,7 +225,11 @@ public final class SearchContext implements Serializable
}
// special case for AND all terms if set (apply after operator character removed)
- operatorAND = operatorAND | this.forceAndTerms;
+ // note that we can't force AND if NOT operator has been set
+ if (operatorNOT == false)
+ {
+ operatorAND = operatorAND | this.forceAndTerms;
+ }
if (term.length() != 0)
{
diff --git a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java b/source/java/org/alfresco/web/bean/SpaceDetailsBean.java
index ae8d7c67b6..d55818b869 100644
--- a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java
+++ b/source/java/org/alfresco/web/bean/SpaceDetailsBean.java
@@ -16,31 +16,28 @@
*/
package org.alfresco.web.bean;
+import java.io.Serializable;
import java.text.MessageFormat;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.NodeService;
-import org.alfresco.service.cmr.repository.TemplateImageResolver;
import org.alfresco.service.cmr.repository.TemplateNode;
-import org.alfresco.service.cmr.security.OwnableService;
import org.alfresco.service.cmr.security.PermissionService;
+import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
-import org.alfresco.web.ui.common.Utils.URLMode;
import org.alfresco.web.ui.common.component.UIActionLink;
-import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent;
/**
* Backing bean provided access to the details of a Space
@@ -50,10 +47,19 @@ import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent;
public class SpaceDetailsBean extends BaseDetailsBean
{
private static final String OUTCOME_RETURN = "showSpaceDetails";
+
+ private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories_space";
+ private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied_space";
+ private static final String MSG_ERROR_UPDATE_CATEGORY = "error_update_category";
+ private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify_space";
/** PermissionService bean reference */
protected PermissionService permissionService;
+ /** Category details */
+ private NodeRef addedCategory;
+ private List categories;
+
// ------------------------------------------------------------------------------
// Construction
@@ -161,6 +167,7 @@ public class SpaceDetailsBean extends BaseDetailsBean
*/
public void nextItem(ActionEvent event)
{
+ boolean foundNextItem = false;
UIActionLink link = (UIActionLink)event.getComponent();
Map params = link.getParameterMap();
String id = params.get("id");
@@ -191,9 +198,22 @@ public class SpaceDetailsBean extends BaseDetailsBean
// prepare for showing details for this node
this.browseBean.setupSpaceAction(next.getId(), false);
+
+ // we found a next item
+ foundNextItem = true;
}
}
- }
+ }
+
+ // if we did not find a next item make sure the current node is
+ // in the dispatch context otherwise the details screen will go back
+ // to the default one.
+ if (foundNextItem == false)
+ {
+ NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id);
+ Node currNode = new Node(currNodeRef);
+ this.navigator.setupDispatchContext(currNode);
+ }
}
}
@@ -202,6 +222,7 @@ public class SpaceDetailsBean extends BaseDetailsBean
*/
public void previousItem(ActionEvent event)
{
+ boolean foundPreviousItem = false;
UIActionLink link = (UIActionLink)event.getComponent();
Map params = link.getParameterMap();
String id = params.get("id");
@@ -229,9 +250,22 @@ public class SpaceDetailsBean extends BaseDetailsBean
// show details for this node
this.browseBean.setupSpaceAction(previous.getId(), false);
+
+ // we found a next item
+ foundPreviousItem = true;
}
}
}
+
+ // if we did not find a previous item make sure the current node is
+ // in the dispatch context otherwise the details screen will go back
+ // to the default one.
+ if (foundPreviousItem == false)
+ {
+ NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id);
+ Node currNode = new Node(currNodeRef);
+ this.navigator.setupDispatchContext(currNode);
+ }
}
}
@@ -244,4 +278,200 @@ public class SpaceDetailsBean extends BaseDetailsBean
this.navigator.resetCurrentNodeProperties();
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
}
+
+ // ------------------------------------------------------------------------------
+ // Categorised Details
+
+ /**
+ * Determines whether the current space has any categories applied
+ *
+ * @return true if the document has categories attached
+ */
+ public boolean isCategorised()
+ {
+ return getSpace().hasAspect(ContentModel.ASPECT_GEN_CLASSIFIABLE);
+ }
+
+ /**
+ * Returns a list of objects representing the categories applied to the
+ * current space
+ *
+ * @return List of categories
+ */
+ public String getCategoriesOverviewHTML()
+ {
+ String html = null;
+
+ if (isCategorised())
+ {
+ // we know for now that the general classifiable aspect only will be
+ // applied so we can retrive the categories property direclty
+ Collection categories = (Collection)this.nodeService.getProperty(getSpace().getNodeRef(),
+ ContentModel.PROP_CATEGORIES);
+
+ if (categories == null || categories.size() == 0)
+ {
+ html = Application.getMessage(FacesContext.getCurrentInstance(), MSG_NO_CATEGORIES_APPLIED);
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder(Application.getMessage(FacesContext.getCurrentInstance(),
+ MSG_HAS_FOLLOWING_CATEGORIES));
+
+ builder.append("");
+ for (Object obj : categories)
+ {
+ if (obj instanceof NodeRef)
+ {
+ if (this.nodeService.exists((NodeRef)obj))
+ {
+ builder.append("- ");
+ builder.append(Repository.getNameForNode(this.nodeService, (NodeRef)obj));
+ builder.append("
");
+ }
+ }
+ }
+ builder.append("
");
+
+ html = builder.toString();
+ }
+ }
+
+ return html;
+ }
+
+ /**
+ * Event handler called to setup the categories for editing
+ *
+ * @param event The event
+ */
+ public void setupCategoriesForEdit(ActionEvent event)
+ {
+ this.categories = (List)this.nodeService.getProperty(getSpace().getNodeRef(),
+ ContentModel.PROP_CATEGORIES);
+ }
+
+ /**
+ * Returns a Map of the initial categories on the node keyed by the NodeRef
+ *
+ * @return Map of initial categories
+ */
+ public List getCategories()
+ {
+ return this.categories;
+ }
+
+ /**
+ * Sets the categories Map
+ *
+ * @param categories
+ */
+ public void setCategories(List categories)
+ {
+ this.categories = categories;
+ }
+
+ /**
+ * Returns the last category added from the multi value editor
+ *
+ * @return The last category added
+ */
+ public NodeRef getAddedCategory()
+ {
+ return this.addedCategory;
+ }
+
+ /**
+ * Sets the category added from the multi value editor
+ *
+ * @param addedCategory The added category
+ */
+ public void setAddedCategory(NodeRef addedCategory)
+ {
+ this.addedCategory = addedCategory;
+ }
+
+ /**
+ * Updates the categories for the current document
+ *
+ * @return The outcome
+ */
+ public String saveCategories()
+ {
+ String outcome = "cancel";
+
+ UserTransaction tx = null;
+
+ try
+ {
+ tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
+ tx.begin();
+
+ // firstly retrieve all the properties for the current node
+ Map updateProps = this.nodeService.getProperties(
+ getSpace().getNodeRef());
+
+ // create a node ref representation of the selected id and set the new properties
+ updateProps.put(ContentModel.PROP_CATEGORIES, (Serializable)this.categories);
+
+ // set the properties on the node
+ this.nodeService.setProperties(getSpace().getNodeRef(), updateProps);
+
+ // commit the transaction
+ tx.commit();
+
+ // reset the state of the current document so it reflects the changes just made
+ getSpace().reset();
+
+ outcome = "finish";
+ }
+ catch (Throwable e)
+ {
+ try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
+ Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
+ FacesContext.getCurrentInstance(), MSG_ERROR_UPDATE_CATEGORY), e.getMessage()), e);
+ }
+
+ return outcome;
+ }
+
+ /**
+ * Applies the classifiable aspect to the current document
+ */
+ public void applyClassifiable()
+ {
+ UserTransaction tx = null;
+
+ try
+ {
+ tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
+ tx.begin();
+
+ // add the general classifiable aspect to the node
+ this.nodeService.addAspect(getSpace().getNodeRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, null);
+
+ // commit the transaction
+ tx.commit();
+
+ // reset the state of the current document
+ getSpace().reset();
+ }
+ catch (Throwable e)
+ {
+ // rollback the transaction
+ try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
+ Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
+ FacesContext.getCurrentInstance(), MSG_ERROR_ASPECT_CLASSIFY), e.getMessage()), e);
+ }
+ }
+
+ /**
+ * Returns whether the current sapce is locked
+ *
+ * @return true if the document is checked out
+ */
+ public boolean isLocked()
+ {
+ return getSpace().isLocked();
+ }
}
diff --git a/source/java/org/alfresco/web/bean/TrashcanBean.java b/source/java/org/alfresco/web/bean/TrashcanBean.java
index 85e5d7c6cd..aa1d88f5a1 100644
--- a/source/java/org/alfresco/web/bean/TrashcanBean.java
+++ b/source/java/org/alfresco/web/bean/TrashcanBean.java
@@ -36,6 +36,7 @@ import org.alfresco.repo.node.archive.RestoreNodeReport.RestoreStatus;
import org.alfresco.repo.search.impl.lucene.QueryParser;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
+import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -61,6 +62,8 @@ import org.alfresco.web.ui.common.component.UIModeList;
import org.alfresco.web.ui.common.component.data.UIRichList;
/**
+ * Backing bean for the Manage Deleted Items (soft delete and archiving) pages.
+ *
* @author Kevin Roast
*/
public class TrashcanBean implements IContextListener
@@ -535,6 +538,20 @@ public class TrashcanBean implements IContextListener
}
};
+ private NodePropertyResolver resolverMimetype = new NodePropertyResolver() {
+ public Object get(Node node) {
+ ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
+ return (content != null ? content.getMimetype() : null);
+ }
+ };
+
+ private NodePropertyResolver resolverSize = new NodePropertyResolver() {
+ public Object get(Node node) {
+ ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
+ return (content != null ? new Long(content.getSize()) : 0L);
+ }
+ };
+
private NodePropertyResolver resolverDeletedDate = new NodePropertyResolver() {
public Object get(Node node) {
return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE);
@@ -611,6 +628,8 @@ public class TrashcanBean implements IContextListener
node.addPropertyResolver("deletedDate", resolverDeletedDate);
node.addPropertyResolver("deletedBy", resolverDeletedBy);
node.addPropertyResolver("isFolder", resolverIsFolder);
+ node.addPropertyResolver("mimetype", resolverMimetype);
+ node.addPropertyResolver("size", resolverSize);
if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true &&
this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false)
diff --git a/source/java/org/alfresco/web/bean/UserShortcutsBean.java b/source/java/org/alfresco/web/bean/UserShortcutsBean.java
index 7934624a19..b4a04080ab 100644
--- a/source/java/org/alfresco/web/bean/UserShortcutsBean.java
+++ b/source/java/org/alfresco/web/bean/UserShortcutsBean.java
@@ -34,10 +34,9 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
-import org.alfresco.service.namespace.NamespaceService;
-import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.repository.PreferencesService;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIActionLink;
@@ -65,7 +64,7 @@ public class UserShortcutsBean
/** List of shortcut nodes */
private List shortcuts = null;
- private QName QNAME_SHORTCUTS = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "shortcuts");
+ private String PREF_SHORTCUTS = "shortcuts";
// ------------------------------------------------------------------------------
@@ -113,8 +112,7 @@ public class UserShortcutsBean
tx.begin();
// get the shortcuts from the preferences for this user
- prefRef = getShortcutsNodeRef();
- shortcuts = (List)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
+ shortcuts = (List)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
if (shortcuts != null)
{
// each shortcut node ID is persisted as a list item in a well known property
@@ -184,7 +182,7 @@ public class UserShortcutsBean
{
shortcuts.add(this.shortcuts.get(i).getId());
}
- this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
+ PreferencesService.getPreferences().setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
}
catch (Exception err)
{
@@ -246,14 +244,13 @@ public class UserShortcutsBean
tx = Repository.getUserTransaction(context);
tx.begin();
- NodeRef prefRef = getShortcutsNodeRef();
- List shortcuts = (List)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
+ List shortcuts = (List)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
if (shortcuts == null)
{
shortcuts = new ArrayList(1);
}
shortcuts.add(node.getNodeRef().getId());
- this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
+ PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
// commit the transaction
tx.commit();
@@ -280,14 +277,6 @@ public class UserShortcutsBean
}
}
- /**
- * Get the node we need to store our user preferences
- */
- private NodeRef getShortcutsNodeRef()
- {
- return Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserPreferencesRef();
- }
-
/**
* Action handler bound to the user shortcuts Shelf component called when a node is removed
*/
@@ -303,13 +292,12 @@ public class UserShortcutsBean
tx = Repository.getUserTransaction(context);
tx.begin();
- NodeRef prefRef = getShortcutsNodeRef();
- List shortcuts = (List)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
+ List shortcuts = (List)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
{
// remove the shortcut from the saved list and persist back
shortcuts.remove(shortcutEvent.Index);
- this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
+ PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
// commit the transaction
tx.commit();
@@ -380,13 +368,12 @@ public class UserShortcutsBean
tx = Repository.getUserTransaction(context);
tx.begin();
- NodeRef prefRef = getShortcutsNodeRef();
- List shortcuts = (List)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
+ List shortcuts = (List)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
{
// remove the shortcut from the saved list and persist back
shortcuts.remove(shortcutEvent.Index);
- this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
+ PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
// commit the transaction
tx.commit();
diff --git a/source/java/org/alfresco/web/bean/WorkflowUtil.java b/source/java/org/alfresco/web/bean/WorkflowUtil.java
index 86e0cc2e92..8f8ed9077d 100644
--- a/source/java/org/alfresco/web/bean/WorkflowUtil.java
+++ b/source/java/org/alfresco/web/bean/WorkflowUtil.java
@@ -124,7 +124,7 @@ public class WorkflowUtil
// first we need to take off the simpleworkflow aspect
nodeService.removeAspect(ref, ContentModel.ASPECT_SIMPLE_WORKFLOW);
- if (rejectMove.booleanValue())
+ if (rejectMove != null && rejectMove.booleanValue())
{
// move the document to the specified folder
String qname = QName.createValidLocalName(docNode.getName());
diff --git a/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java b/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java
index 373c45152f..0549966b2c 100644
--- a/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java
+++ b/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java
@@ -230,24 +230,31 @@ public abstract class BaseActionWizard extends BaseWizardBean
{
QName idQName = Repository.resolveToQName(child.getAttribute("name"));
- // try and get the display label from config
- String label = Utils.getDisplayLabel(context, child);
-
- // if there wasn't a client based label try and get it from the dictionary
- if (label == null)
+ if (idQName != null)
{
- AspectDefinition aspectDef = this.dictionaryService.getAspect(idQName);
- if (aspectDef != null)
+ // try and get the display label from config
+ String label = Utils.getDisplayLabel(context, child);
+
+ // if there wasn't a client based label try and get it from the dictionary
+ if (label == null)
{
- label = aspectDef.getTitle();
- }
- else
- {
- label = idQName.getLocalName();
+ AspectDefinition aspectDef = this.dictionaryService.getAspect(idQName);
+ if (aspectDef != null)
+ {
+ label = aspectDef.getTitle();
+ }
+ else
+ {
+ label = idQName.getLocalName();
+ }
}
+
+ this.aspects.add(new SelectItem(idQName.toString(), label));
+ }
+ else
+ {
+ logger.warn("Failed to resolve aspect '" + child.getAttribute("name") + "'");
}
-
- this.aspects.add(new SelectItem(idQName.toString(), label));
}
// make sure the list is sorted by the label
@@ -875,6 +882,11 @@ public abstract class BaseActionWizard extends BaseWizardBean
}
}
+ public int hashCode()
+ {
+ return authority.hashCode();
+ }
+
private String name;
private String authority;
}
diff --git a/source/java/org/alfresco/web/bean/actions/RunActionWizard.java b/source/java/org/alfresco/web/bean/actions/RunActionWizard.java
index d57d42955b..0f51137e1a 100644
--- a/source/java/org/alfresco/web/bean/actions/RunActionWizard.java
+++ b/source/java/org/alfresco/web/bean/actions/RunActionWizard.java
@@ -10,10 +10,12 @@ import java.util.ResourceBundle;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
+import org.alfresco.repo.action.executer.CheckInActionExecuter;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.data.IDataContainer;
import org.alfresco.web.data.QuickSort;
@@ -25,9 +27,19 @@ import org.alfresco.web.data.QuickSort;
*/
public class RunActionWizard extends BaseActionWizard
{
+ protected boolean checkinActionPresent = false;
+
// ------------------------------------------------------------------------------
// Wizard implementation
+ @Override
+ public void init(Map parameters)
+ {
+ super.init(parameters);
+
+ this.checkinActionPresent = false;
+ }
+
protected String finishImpl(FacesContext context, String outcome)
throws Exception
{
@@ -39,6 +51,12 @@ public class RunActionWizard extends BaseActionWizard
String actionName = (String)actionParams.get(PROP_ACTION_NAME);
this.action = actionName;
+ // remember the fact we have a checkin action
+ if (actionName.equals(CheckInActionExecuter.NAME))
+ {
+ this.checkinActionPresent = true;
+ }
+
// get the action handler to prepare for the save
Map repoActionParams = new HashMap();
IHandler handler = this.actionHandlers.get(this.action);
@@ -89,7 +107,27 @@ public class RunActionWizard extends BaseActionWizard
{
// reset the current document properties/aspects in case we have changed them
// during the execution of the custom action
- this.browseBean.getDocument().reset();
+ Node document = this.browseBean.getDocument();
+ if (document != null)
+ {
+ document.reset();
+ }
+
+ // reset the current space properties/aspects as well in case we have
+ // changed them during the execution of the custom action
+ Node space = this.browseBean.getActionSpace();
+ if (space != null)
+ {
+ space.reset();
+ }
+
+ // special case handling for checkin - if it was successful the working
+ // copy node the Run Action Wizard was launched against will no longer
+ // exist, we therefore need the client to go back to the main browse view.
+ if (this.checkinActionPresent)
+ {
+ outcome = "browse";
+ }
return outcome;
}
diff --git a/source/java/org/alfresco/web/bean/actions/handlers/CheckInHandler.java b/source/java/org/alfresco/web/bean/actions/handlers/CheckInHandler.java
index 174727ed6e..91dfd6cd1e 100644
--- a/source/java/org/alfresco/web/bean/actions/handlers/CheckInHandler.java
+++ b/source/java/org/alfresco/web/bean/actions/handlers/CheckInHandler.java
@@ -23,7 +23,7 @@ public class CheckInHandler extends BaseActionHandler
@Override
public void setupUIDefaults(Map actionProps)
{
- actionProps.put(PROP_CHECKIN_MINOR, new Boolean(true));
+ actionProps.put(PROP_CHECKIN_MINOR, Boolean.TRUE);
}
public String getJSPPath()
diff --git a/source/java/org/alfresco/web/bean/ajax/NodeInfoBean.java b/source/java/org/alfresco/web/bean/ajax/NodeInfoBean.java
new file mode 100644
index 0000000000..d01e995801
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/ajax/NodeInfoBean.java
@@ -0,0 +1,128 @@
+package org.alfresco.web.bean.ajax;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.alfresco.model.ContentModel;
+import org.alfresco.service.cmr.repository.ContentService;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.cmr.repository.NodeService;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.repository.Repository;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Bean used by an AJAX control to send information back on the
+ * requested node.
+ *
+ * @author gavinc
+ */
+public class NodeInfoBean
+{
+ private NodeService nodeService;
+ private ContentService contentService;
+
+ private static final Log logger = LogFactory.getLog(NodeInfoBean.class);
+
+ /**
+ * Returns information on the node identified by the 'noderef'
+ * parameter found in the ExternalContext.
+ *
+ * The result is the formatted HTML to show on the client.
+ */
+ public void sendNodeInfo() throws IOException
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResponseWriter out = context.getResponseWriter();
+
+ String nodeRef = (String)context.getExternalContext().getRequestParameterMap().get("noderef");
+
+ if (nodeRef == null || nodeRef.length() == 0)
+ {
+ throw new IllegalArgumentException("'noderef' parameter is missing");
+ }
+
+ NodeRef repoNode = new NodeRef(nodeRef);
+
+ if (this.nodeService.exists(repoNode))
+ {
+ // get the client side node representation and its properties
+ Node clientNode = new Node(repoNode);
+ Map props = clientNode.getProperties();
+
+ // get the content size
+ Object content = props.get(ContentModel.PROP_CONTENT);
+
+ // start the containing table
+ out.write("
");
+
+ // write out information about the node as table rows
+ out.write("Summary |
");
+
+ // add debug information to the summary if debug is enabled
+ if (logger.isDebugEnabled())
+ {
+ writeRow(out, "Id:", clientNode.getId());
+ writeRow(out, "Type:", clientNode.getType().toPrefixString());
+ }
+
+ writeRow(out, "Description:", (String)props.get(ContentModel.PROP_DESCRIPTION));
+ writeRow(out, "Title:", (String)props.get(ContentModel.PROP_TITLE));
+ writeRow(out, "Created:", props.get("created").toString());
+ writeRow(out, "Modified:", props.get("modified").toString());
+
+ // close the and tags
+ out.write("
");
+ }
+ else
+ {
+ out.write("Node could not be found in the repository!");
+ }
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean getters and setters
+
+ /**
+ * @param nodeService The NodeService to set.
+ */
+ public void setNodeService(NodeService nodeService)
+ {
+ this.nodeService = nodeService;
+ }
+
+ public void setContentService(ContentService contentService)
+ {
+ this.contentService = contentService;
+ }
+
+ // ------------------------------------------------------------------------------
+ // Helper methods
+
+ /**
+ * Writes a table row with the given data
+ *
+ * @param nameColumn The name of the data item
+ * @param dataColumn The data
+ */
+ protected void writeRow(ResponseWriter out, String nameColumn, String dataColumn)
+ throws IOException
+ {
+ out.write("");
+ out.write(nameColumn);
+ out.write(" | ");
+ if (dataColumn != null)
+ {
+ out.write(dataColumn);
+ }
+ else
+ {
+ out.write(" ");
+ }
+ out.write(" |
");
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java b/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java
index 69048669df..7471bd3ba2 100644
--- a/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java
+++ b/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java
@@ -311,6 +311,13 @@ public class ClipboardBean
dd.isSubClass(item.Node.getType(), ContentModel.TYPE_FOLDER))
{
// copy the file/folder
+ // first check that we are not attempting to copy a duplicate into the same parent
+ if (destRef.equals(assocRef.getParentRef()) && name.equals(item.Node.getName()))
+ {
+ // manually change the name if this occurs
+ String copyOf = Application.getMessage(FacesContext.getCurrentInstance(), MSG_COPY_OF);
+ name = copyOf + ' ' + name;
+ }
this.fileFolderService.copy(
item.Node.getNodeRef(),
destRef,
diff --git a/source/java/org/alfresco/web/bean/content/AddContentDialog.java b/source/java/org/alfresco/web/bean/content/AddContentDialog.java
index e3f6042431..dc18d4ce22 100644
--- a/source/java/org/alfresco/web/bean/content/AddContentDialog.java
+++ b/source/java/org/alfresco/web/bean/content/AddContentDialog.java
@@ -3,12 +3,17 @@ package org.alfresco.web.bean.content;
import java.io.File;
import java.io.Serializable;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
+import org.alfresco.config.Config;
+import org.alfresco.config.ConfigElement;
+import org.alfresco.config.ConfigService;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.content.filestore.FileContentReader;
@@ -26,6 +31,7 @@ import org.alfresco.web.bean.repository.Repository;
*/
public class AddContentDialog extends BaseContentWizard
{
+ protected List inlineEditableMimeTypes;
protected File file;
// ------------------------------------------------------------------------------
@@ -53,7 +59,16 @@ public class AddContentDialog extends BaseContentWizard
{
this.title = this.fileName;
}
-
+
+ // determine whether inline editing should be enabled by default.
+ // if the mime type of the added file is in the list of mime types
+ // configured in "Content Wizards" then enable inline editing
+ List mimeTypes = getInlineEditableMimeTypes();
+ if (mimeTypes.contains(this.mimeType))
+ {
+ this.inlineEdit = true;
+ }
+
saveContent(this.file, null);
// return default outcome
@@ -71,6 +86,8 @@ public class AddContentDialog extends BaseContentWizard
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
+ clearUpload();
+
// as we were successful, go to the set properties dialog if asked
// to otherwise just return
if (this.showOtherProperties)
@@ -214,4 +231,30 @@ public class AddContentDialog extends BaseContentWizard
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getExternalContext().getSessionMap().remove(FileUploadBean.FILE_UPLOAD_BEAN_NAME);
}
+
+ protected List getInlineEditableMimeTypes()
+ {
+ if (this.inlineEditableMimeTypes == null)
+ {
+ this.inlineEditableMimeTypes = new ArrayList(8);
+
+ // get the create mime types list from the config
+ ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
+ Config wizardCfg = svc.getConfig("Content Wizards");
+ if (wizardCfg != null)
+ {
+ ConfigElement typesCfg = wizardCfg.getConfigElement("create-mime-types");
+ if (typesCfg != null)
+ {
+ for (ConfigElement child : typesCfg.getChildren())
+ {
+ String currentMimeType = child.getAttribute("name");
+ this.inlineEditableMimeTypes.add(currentMimeType);
+ }
+ }
+ }
+ }
+
+ return this.inlineEditableMimeTypes;
+ }
}
diff --git a/source/java/org/alfresco/web/bean/content/DeleteContentDialog.java b/source/java/org/alfresco/web/bean/content/DeleteContentDialog.java
new file mode 100644
index 0000000000..1e48b2ea51
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/content/DeleteContentDialog.java
@@ -0,0 +1,87 @@
+package org.alfresco.web.bean.content;
+
+import java.text.MessageFormat;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.web.app.AlfrescoNavigationHandler;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.dialog.BaseDialogBean;
+import org.alfresco.web.bean.repository.Node;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Bean implementation for the "Delete Content" dialog
+ *
+ * @author gavinc
+ */
+public class DeleteContentDialog extends BaseDialogBean
+{
+ private static final Log logger = LogFactory.getLog(DeleteContentDialog.class);
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ protected String finishImpl(FacesContext context, String outcome)
+ throws Exception
+ {
+ // get the content to delete
+ Node node = this.browseBean.getDocument();
+ if (node != null)
+ {
+ if (logger.isDebugEnabled())
+ logger.debug("Trying to delete content node: " + node.getId());
+
+ // delete the node
+ this.nodeService.deleteNode(node.getNodeRef());
+ }
+ else
+ {
+ logger.warn("WARNING: delete called without a current Document!");
+ }
+
+ return outcome;
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ // clear action context
+ this.browseBean.setDocument(null);
+
+ // setting the outcome will show the browse view again
+ return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
+ AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
+ }
+
+ @Override
+ protected String getErrorMessageId()
+ {
+ return "error_delete_file";
+ }
+
+ @Override
+ public boolean getFinishButtonDisabled()
+ {
+ return false;
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean Getters and Setters
+
+ /**
+ * Returns the confirmation to display to the user before deleting the content.
+ *
+ * @return The formatted message to display
+ */
+ public String getConfirmMessage()
+ {
+ String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
+ "delete_file_confirm");
+
+ return MessageFormat.format(fileConfirmMsg,
+ new Object[] {this.browseBean.getDocument().getName()});
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/dashboard/DashboardManager.java b/source/java/org/alfresco/web/bean/dashboard/DashboardManager.java
new file mode 100644
index 0000000000..bea7e5f967
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/dashboard/DashboardManager.java
@@ -0,0 +1,404 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.bean.dashboard;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.config.ConfigService;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.PreferencesService;
+import org.alfresco.web.config.DashboardsConfigElement;
+import org.alfresco.web.config.DashboardsConfigElement.DashletDefinition;
+import org.alfresco.web.config.DashboardsConfigElement.LayoutDefinition;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Bean that manages the Dashboard framework.
+ *
+ * @author Kevin Roast
+ */
+public class DashboardManager
+{
+ private static Log logger = LogFactory.getLog(DashboardManager.class);
+
+ private static final String PREF_DASHBOARD = "dashboard";
+ static final String LAYOUT_DEFAULT = "default";
+ static final String DASHLET_DEFAULT = "getting-started";
+
+ private static final String JSP_DUMMY = "/jsp/dashboards/dummy.jsp";
+
+ private PageConfig pageConfig = null;
+ private DashletRenderingList renderingList = null;
+ private DashletTitleList titleList = null;
+
+ /**
+ * @return The layout JSP page for the current My Alfresco dashboard page
+ */
+ public String getLayoutPage()
+ {
+ String layout = null;
+ Page page = getPageConfig().getCurrentPage();
+ if (page != null)
+ {
+ layout = page.getLayoutDefinition().JSPPage;
+ }
+ return layout;
+ }
+
+ /**
+ * Helper to init the dashboard for display
+ */
+ public void initDashboard()
+ {
+ this.renderingList = null;
+ this.titleList = null;
+ }
+
+ /**
+ * @return JSF List getter to return which dashlets are available for rendering
+ */
+ public List getDashletAvailable()
+ {
+ if (this.renderingList == null)
+ {
+ this.renderingList = new DashletRenderingList(getPageConfig());
+ }
+ return this.renderingList;
+ }
+
+ /**
+ * @return JSF List getter to return dashlet title strings
+ */
+ public List getDashletTitle()
+ {
+ if (this.titleList == null)
+ {
+ this.titleList = new DashletTitleList(getPageConfig());
+ }
+ return this.titleList;
+ }
+
+ /**
+ * Return the JSP for the specified dashlet index
+ *
+ * @param index Zero based index from the left most column working top-bottom then left-right
+ *
+ * @return JSP page for the dashlet or a blank dummy page if not found
+ */
+ public String getDashletPage(int index)
+ {
+ String page = JSP_DUMMY;
+ DashletDefinition def = getDashletDefinitionByIndex(getPageConfig(), index);
+ if (def != null)
+ {
+ page = def.JSPPage;
+ }
+ return page;
+ }
+
+ /**
+ * @return the PageConfig for the current My Alfresco dashboard page
+ */
+ public PageConfig getPageConfig()
+ {
+ if (this.pageConfig == null)
+ {
+ PageConfig pageConfig;
+
+ DashboardsConfigElement config = getDashboardConfig();
+
+ // read the config for this user from the Preferences
+ String xml = (String)PreferencesService.getPreferences().getValue(PREF_DASHBOARD);
+ if (xml != null && xml.length() != 0)
+ {
+ if (logger.isDebugEnabled())
+ logger.debug("PageConfig found: " + xml);
+
+ // process the XML config and convert into a PageConfig object
+ pageConfig = new PageConfig();
+ pageConfig.fromXML(config, xml);
+ }
+ else
+ {
+ if (logger.isDebugEnabled())
+ logger.debug("No PageConfig found, creating default instance.");
+
+ // create default config for the first access for a user
+ pageConfig = new PageConfig();
+ LayoutDefinition layout = config.getLayoutDefinition(LAYOUT_DEFAULT);
+ if (layout != null)
+ {
+ Page page = new Page("default", layout);
+ Column defaultColumn = new Column();
+ DashletDefinition dashlet = config.getDashletDefinition(DASHLET_DEFAULT);
+ if (dashlet != null)
+ {
+ defaultColumn.addDashlet(dashlet);
+ page.addColumn(defaultColumn);
+ pageConfig.addPage(page);
+ }
+ }
+ }
+
+ this.pageConfig = pageConfig;
+ }
+
+ return this.pageConfig;
+ }
+
+ /**
+ * Persist the supplied PageConfig for the current user
+ */
+ public void savePageConfig(PageConfig config)
+ {
+ this.pageConfig = config;
+
+ // reset cached values
+ initDashboard();
+
+ // persist the changes
+ PreferencesService.getPreferences().setValue(PREF_DASHBOARD, this.pageConfig.toXML());
+ }
+
+ /**
+ * @return The externally configured WebClient config element for the Dashboards
+ */
+ public static DashboardsConfigElement getDashboardConfig()
+ {
+ ConfigService service = Application.getConfigService(FacesContext.getCurrentInstance());
+ DashboardsConfigElement config = (DashboardsConfigElement)service.getConfig("Dashboards").getConfigElement(
+ DashboardsConfigElement.CONFIG_ELEMENT_ID);
+ return config;
+ }
+
+ /**
+ * Helper to get the DashDefinition as the zero based index, working from the left most column
+ * top-bottom then working left-right.
+ *
+ * @param index Zero based index from the left most column working top-bottom then left-right
+ *
+ * @return DashletDefinition if found or null if no dashlet at the specified index
+ */
+ private static DashletDefinition getDashletDefinitionByIndex(PageConfig config, int index)
+ {
+ DashletDefinition def = null;
+
+ LayoutDefinition layoutDef = config.getCurrentPage().getLayoutDefinition();
+ List columns = config.getCurrentPage().getColumns();
+ int columnCount = columns.size();
+ int selectedColumn = index / layoutDef.ColumnLength;
+ if (selectedColumn < columnCount)
+ {
+ List dashlets = columns.get(selectedColumn).getDashlets();
+ if (index % layoutDef.ColumnLength < dashlets.size())
+ {
+ def = dashlets.get(index % layoutDef.ColumnLength);
+ }
+ }
+ if (logger.isDebugEnabled())
+ logger.debug("Searching for dashlet at index: " + index +
+ " and found " + (def != null ? def.JSPPage : null));
+
+ return def;
+ }
+
+
+ /**
+ * Dashlet rendering list.
+ *
+ * Returns true from the get() method if the specified dashlet is available for rendering.
+ */
+ private static class DashletRenderingList extends JSFHelperList
+ {
+ PageConfig config;
+
+ public DashletRenderingList(PageConfig config)
+ {
+ this.config = config;
+ }
+
+ /**
+ * @see java.util.List#get(int)
+ */
+ public Object get(int index)
+ {
+ return getDashletDefinitionByIndex(config, index) != null;
+ }
+ }
+
+ /**
+ * Dashlet title list.
+ *
+ * Returns the title string from the get() method if the specified dashlet is available.
+ */
+ private static class DashletTitleList extends JSFHelperList
+ {
+ PageConfig config;
+
+ public DashletTitleList(PageConfig config)
+ {
+ this.config = config;
+ }
+
+ /**
+ * @see java.util.List#get(int)
+ */
+ public Object get(int index)
+ {
+ String result = "";
+
+ DashletDefinition def = getDashletDefinitionByIndex(config, index);
+ if (def != null)
+ {
+ if (def.LabelId != null)
+ {
+ result = Application.getMessage(FacesContext.getCurrentInstance(), def.LabelId);
+ }
+ else if (def.Label != null)
+ {
+ result = def.Label;
+ }
+ }
+
+ return result;
+ }
+ }
+
+ /**
+ * Helper class that implements a dummy List contract for use by JSF List getter methods
+ */
+ private static abstract class JSFHelperList implements List
+ {
+ //
+ // Satisfy List interface contract
+ //
+
+ public void add(int arg0, Object arg1)
+ {
+ }
+
+ public boolean add(Object arg0)
+ {
+ return false;
+ }
+
+ public boolean addAll(Collection arg0)
+ {
+ return false;
+ }
+
+ public boolean addAll(int arg0, Collection arg1)
+ {
+ return false;
+ }
+
+ public void clear()
+ {
+ }
+
+ public boolean contains(Object arg0)
+ {
+ return false;
+ }
+
+ public boolean containsAll(Collection arg0)
+ {
+ return false;
+ }
+
+ public int indexOf(Object arg0)
+ {
+ return 0;
+ }
+
+ public boolean isEmpty()
+ {
+ return false;
+ }
+
+ public Iterator iterator()
+ {
+ return null;
+ }
+
+ public int lastIndexOf(Object arg0)
+ {
+ return 0;
+ }
+
+ public ListIterator listIterator()
+ {
+ return null;
+ }
+
+ public ListIterator listIterator(int arg0)
+ {
+ return null;
+ }
+
+ public Object remove(int arg0)
+ {
+ return null;
+ }
+
+ public boolean remove(Object arg0)
+ {
+ return false;
+ }
+
+ public boolean removeAll(Collection arg0)
+ {
+ return false;
+ }
+
+ public boolean retainAll(Collection arg0)
+ {
+ return false;
+ }
+
+ public Object set(int arg0, Object arg1)
+ {
+ return null;
+ }
+
+ public int size()
+ {
+ return 0;
+ }
+
+ public List subList(int arg0, int arg1)
+ {
+ return null;
+ }
+
+ public Object[] toArray()
+ {
+ return null;
+ }
+
+ public Object[] toArray(Object[] arg0)
+ {
+ return null;
+ }
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java b/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java
new file mode 100644
index 0000000000..615570d480
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java
@@ -0,0 +1,467 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.bean.dashboard;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UISelectMany;
+import javax.faces.component.UISelectOne;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.wizard.BaseWizardBean;
+import org.alfresco.web.config.DashboardsConfigElement;
+import org.alfresco.web.config.DashboardsConfigElement.DashletDefinition;
+import org.alfresco.web.config.DashboardsConfigElement.LayoutDefinition;
+import org.alfresco.web.ui.common.component.UIListItem;
+import org.alfresco.web.ui.common.component.description.UIDescription;
+
+/**
+ * @author Kevin Roast
+ */
+public class DashboardWizard extends BaseWizardBean
+{
+ private static final String COMPONENT_COLUMNDASHLETS = "column-dashlets";
+
+ private static final String COMPONENT_ALLDASHLETS = "all-dashlets";
+
+ private static final String MSG_COLUMN = "dashboard_column";
+
+ /** List of icons items to display as selectable Layout definitions */
+ private List layoutIcons = null;
+
+ /** List of descriptions of the layouts */
+ private List layoutDescriptions = null;
+
+ /** List of SelectItem objects representing the available dashlets */
+ private List dashlets = null;
+
+ /** Currently selected layout */
+ private String layout;
+
+ /** Currently selected column to edit */
+ private int column;
+
+ /** The PageConfig holding the columns/dashlets during editing */
+ private PageConfig editConfig;
+
+ /** The DashboardManager instance */
+ private DashboardManager dashboardManager;
+
+
+ // ------------------------------------------------------------------------------
+ // Bean setters
+
+ /**
+ * @param dashboardManager The dashboardManager to set.
+ */
+ public void setDashboardManager(DashboardManager dashboardManager)
+ {
+ this.dashboardManager = dashboardManager;
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Wizard implementation
+
+ /**
+ * @see org.alfresco.web.bean.dialog.BaseDialogBean#init(java.util.Map)
+ */
+ public void init(Map parameters)
+ {
+ super.init(parameters);
+
+ this.editConfig = new PageConfig(this.dashboardManager.getPageConfig());
+ this.layout = this.editConfig.getCurrentPage().getLayoutDefinition().Id;
+ this.column = 0;
+ }
+
+ /**
+ * @see org.alfresco.web.bean.dialog.BaseDialogBean#finishImpl(javax.faces.context.FacesContext, java.lang.String)
+ */
+ protected String finishImpl(FacesContext context, String outcome) throws Exception
+ {
+ this.dashboardManager.savePageConfig(this.editConfig);
+ return outcome;
+ }
+
+ /**
+ * @return Returns the summary data for the wizard.
+ */
+ public String getSummary()
+ {
+ LayoutDefinition def = DashboardManager.getDashboardConfig().getLayoutDefinition(this.layout);
+ String label = def.Label;
+ if (label == null)
+ {
+ label = Application.getMessage(FacesContext.getCurrentInstance(), def.LabelId);
+ }
+ return buildSummary(
+ new String[]{"Layout"},
+ new String[]{label});
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Dashboard Wizard bean getters
+
+ /**
+ * @return The currently selected layout ID - used by the Dynamic Description component
+ */
+ public String getLayout()
+ {
+ return this.layout;
+ }
+
+ /**
+ * Set the currently selected layout ID
+ */
+ public void setLayout(String layout)
+ {
+ this.layout = layout;
+ LayoutDefinition def = DashboardManager.getDashboardConfig().getLayoutDefinition(layout);
+ this.editConfig.getCurrentPage().setLayoutDefinition(def);
+ if (this.column >= def.Columns)
+ {
+ this.column = def.Columns - 1;
+ }
+ }
+
+ /**
+ * @return the number of columns in the selected page layout
+ */
+ public int getColumnCount()
+ {
+ return DashboardManager.getDashboardConfig().getLayoutDefinition(getLayout()).Columns;
+ }
+
+ /**
+ * @return the number of components per column supported in the selected page layout
+ */
+ public int getColumnMax()
+ {
+ return DashboardManager.getDashboardConfig().getLayoutDefinition(getLayout()).ColumnLength;
+ }
+
+ /**
+ * @return the array of UI select items representing the columns that can be configured
+ */
+ public SelectItem[] getColumns()
+ {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ LayoutDefinition layoutDef = DashboardManager.getDashboardConfig().getLayoutDefinition(getLayout());
+ SelectItem[] columns = new SelectItem[layoutDef.Columns];
+ for (int i=0; i getAllDashlets()
+ {
+ if (this.dashlets == null)
+ {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ DashboardsConfigElement config = DashboardManager.getDashboardConfig();
+ Collection dashletDefs = config.getDashlets();
+ List dashlets = new ArrayList(dashletDefs.size());
+ for (DashletDefinition dashletDef : dashletDefs)
+ {
+ String label = dashletDef.Label;
+ if (label == null)
+ {
+ label = Application.getMessage(fc, dashletDef.LabelId);
+ }
+ String description = dashletDef.Description;
+ if (description == null)
+ {
+ description = Application.getMessage(fc, dashletDef.DescriptionId);
+ }
+ if (description != null)
+ {
+ // append description of the dashlet if set
+ label = label + " (" + description + ')';
+ }
+ SelectItem item = new SelectItem(dashletDef.Id, label);
+ dashlets.add(item);
+ }
+ this.dashlets = dashlets;
+ }
+ return this.dashlets;
+ }
+
+ /**
+ * @return the List of SelectItem objects representing the dashlets displayed in the
+ * currently selected column.
+ */
+ public List getColumnDashlets()
+ {
+ FacesContext fc = FacesContext.getCurrentInstance();
+
+ Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
+ List dashlets = new ArrayList(column.getDashlets().size());
+ for (DashletDefinition dashletDef : column.getDashlets())
+ {
+ String label = dashletDef.Label;
+ if (label == null)
+ {
+ label = Application.getMessage(fc, dashletDef.LabelId);
+ }
+ dashlets.add(new SelectItem(dashletDef.Id, label));
+ }
+ return dashlets;
+ }
+
+ /**
+ * @return List of UIDescription objects for the available layouts
+ */
+ public List getLayoutDescriptions()
+ {
+ if (this.layoutDescriptions == null)
+ {
+ buildLayoutValueLists();
+ }
+ return this.layoutDescriptions;
+ }
+
+ /**
+ * @return the List of UIListItem objects representing the Layout icons
+ */
+ public List getLayoutIcons()
+ {
+ if (this.layoutIcons == null)
+ {
+ buildLayoutValueLists();
+ }
+ return this.layoutIcons;
+ }
+
+ /**
+ * Build the cached list of values for the layout page. The lists are used by the
+ * image radio picker and dynamic description components.
+ */
+ private void buildLayoutValueLists()
+ {
+ List icons = new ArrayList(4);
+ List descriptions = new ArrayList(4);
+
+ FacesContext context = FacesContext.getCurrentInstance();
+
+ DashboardsConfigElement config = DashboardManager.getDashboardConfig();
+ Iterator layoutItr = config.getLayouts().iterator();
+ while (layoutItr.hasNext())
+ {
+ LayoutDefinition layoutDef = layoutItr.next();
+
+ // build UIListItem to represent the layout image
+ String label = layoutDef.Label;
+ if (label == null)
+ {
+ label = Application.getMessage(context, layoutDef.LabelId);
+ }
+ String desc = layoutDef.Description;
+ if (desc == null)
+ {
+ desc = Application.getMessage(context, layoutDef.DescriptionId);
+ }
+ UIListItem item = new UIListItem();
+ item.setLabel(label);
+ item.setTooltip(desc);
+ item.setValue(layoutDef.Id);
+ // set the special attribute used by the imageRadioPicker component
+ item.getAttributes().put("image", layoutDef.Image);
+ icons.add(item);
+
+ // build UIDescription to represent the layout description text
+ UIDescription description = new UIDescription();
+ description.setControlValue(layoutDef.Id);
+ description.setText(desc);
+ descriptions.add(description);
+ }
+
+ this.layoutIcons = icons;
+ this.layoutDescriptions = descriptions;
+ }
+
+ /**
+ * Action event handler called to Add dashlets to the selection for a column
+ */
+ public void addDashlets(ActionEvent event)
+ {
+ UISelectMany dashletPicker = (UISelectMany)event.getComponent().findComponent(COMPONENT_ALLDASHLETS);
+ UISelectOne dashletColumn = (UISelectOne)event.getComponent().findComponent(COMPONENT_COLUMNDASHLETS);
+
+ // get the IDs of the selected Dashlet definitions
+ Object[] selected = dashletPicker.getSelectedValues();
+
+ if (selected.length != 0)
+ {
+ // get the column to add the dashlets too
+ DashboardsConfigElement config = DashboardManager.getDashboardConfig();
+ LayoutDefinition layoutDef = this.editConfig.getCurrentPage().getLayoutDefinition();
+ Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
+
+ // add each selected dashlet to the column
+ for (int i=0; i pages = new ArrayList(4);
+ private int currentPageIndex = 0;
+
+
+ /**
+ * Default constructor
+ */
+ public PageConfig()
+ {
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param copy PageConfig to copy
+ */
+ public PageConfig(PageConfig copy)
+ {
+ this.pages = new ArrayList(copy.pages.size());
+ for (Page page : copy.pages)
+ {
+ // invoke the copy constructor on each Page
+ // which in turn calls the copy constructor of child classes
+ this.pages.add(new Page(page));
+ }
+ }
+
+ /**
+ * @return The current page in the config
+ */
+ public Page getCurrentPage()
+ {
+ if (currentPageIndex < pages.size())
+ {
+ return pages.get(currentPageIndex);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Add a new Page to the list
+ *
+ * @param page Page to add
+ */
+ public void addPage(Page page)
+ {
+ pages.add(page);
+ }
+
+ /**
+ * Get a Page with the specified page Id
+ *
+ * @param pageId Of the page to return
+ *
+ * @return Page or null if not found
+ */
+ public Page getPage(String pageId)
+ {
+ Page foundPage = null;
+ for (Page page : pages)
+ {
+ if (page.getId().equals(pageId))
+ {
+ foundPage = page;
+ break;
+ }
+ }
+ return foundPage;
+ }
+
+ /**
+ * Convert this config to an XML definition which can be serialized.
+ * Example:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * @return XML for this config
+ */
+ public String toXML()
+ {
+ try
+ {
+ Document doc = DocumentHelper.createDocument();
+
+ Element root = doc.addElement(ELEMENT_DASHBOARD);
+ for (Page page : pages)
+ {
+ Element pageElement = root.addElement(ELEMENT_PAGE);
+ pageElement.addAttribute(ATTR_ID, page.getId());
+ pageElement.addAttribute(ATTR_LAYOUTID, page.getLayoutDefinition().Id);
+ for (Column column : page.getColumns())
+ {
+ Element columnElement = pageElement.addElement(ELEMENT_COLUMN);
+ for (DashletDefinition dashletDef : column.getDashlets())
+ {
+ columnElement.addElement(ELEMENT_DASHLET).addAttribute(ATTR_REFID, dashletDef.Id);
+ }
+ }
+ }
+
+ StringWriter out = new StringWriter(512);
+ XMLWriter writer = new XMLWriter(OutputFormat.createPrettyPrint());
+ writer.setWriter(out);
+ writer.write(doc);
+
+ return out.toString();
+ }
+ catch (Throwable err)
+ {
+ throw new AlfrescoRuntimeException("Unable to serialize Dashboard PageConfig to XML: " + err.getMessage(), err);
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return toXML();
+ }
+
+ /**
+ * Deserialise this PageConfig instance from the specified XML stream.
+ *
+ * @param xml
+ */
+ public void fromXML(DashboardsConfigElement config, String xml)
+ {
+ try
+ {
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(new StringReader(xml));
+ Element rootElement = document.getRootElement();
+
+ // walk the pages found in xml
+ Iterator itrPages = rootElement.elementIterator(ELEMENT_PAGE);
+ while (itrPages.hasNext())
+ {
+ Element pageElement = (Element)itrPages.next();
+ String layoutId = pageElement.attributeValue(ATTR_LAYOUTID);
+ LayoutDefinition layoutDef = config.getLayoutDefinition(layoutId);
+ if (layoutDef != null)
+ {
+ // found the layout now build the page and read the columns
+ Page page = new Page(pageElement.attributeValue(ATTR_ID), layoutDef);
+ Iterator itrColumns = pageElement.elementIterator(ELEMENT_COLUMN);
+ while (itrColumns.hasNext())
+ {
+ Column column = new Column();
+
+ // read and resolve the dashlet definitions for this column
+ Element columnElement = (Element)itrColumns.next();
+ Iterator itrDashlets = columnElement.elementIterator(ELEMENT_DASHLET);
+ while (itrDashlets.hasNext())
+ {
+ String dashletId = ((Element)itrDashlets.next()).attributeValue(ATTR_REFID);
+ DashletDefinition dashletDef = config.getDashletDefinition(dashletId);
+ if (dashletDef != null)
+ {
+ column.addDashlet(dashletDef);
+ }
+ else if (logger.isWarnEnabled())
+ {
+ logger.warn("Failed to resolve Dashboard Dashlet Definition ID: " + dashletId);
+ }
+ }
+
+ // add the column of dashlets to the page
+ page.addColumn(column);
+ }
+
+ // add the page to this config instance
+ this.addPage(page);
+ }
+ else if (logger.isWarnEnabled())
+ {
+ logger.warn("Failed to resolve Dashboard Layout Definition ID: " + layoutId);
+ }
+ }
+ }
+ catch (DocumentException docErr)
+ {
+ // if we cannot parse, then we simply revert to default
+ }
+ }
+}
+
+/**
+ * Simple class to represent a Page in a Dashboard.
+ * Each Page has a Layout associated with it, and a number of Column definitions.
+ */
+final class Page
+{
+ private String id;
+ private LayoutDefinition layoutDef;
+ private List columns = new ArrayList(4);
+
+ /**
+ * Constructor
+ *
+ * @param id
+ * @param layout
+ */
+ public Page(String id, LayoutDefinition layout)
+ {
+ if (id == null || id.length() == 0)
+ {
+ throw new IllegalArgumentException("ID for a Dashboard Page is mandatory.");
+ }
+ if (layout == null)
+ {
+ throw new IllegalArgumentException("Layout for a Dashboard Page is mandatory.");
+ }
+ this.id = id;
+ this.layoutDef = layout;
+ }
+
+ /**
+ * Copy Constructor
+ *
+ * @param copy Page to build a copy from
+ */
+ public Page(Page copy)
+ {
+ this.id = copy.id;
+ this.layoutDef = copy.layoutDef;
+ for (Column column : copy.columns)
+ {
+ Column cloneColumn = new Column(column);
+ addColumn(cloneColumn);
+ }
+ }
+
+ public String getId()
+ {
+ return this.id;
+ }
+
+ public LayoutDefinition getLayoutDefinition()
+ {
+ return this.layoutDef;
+ }
+
+ public void setLayoutDefinition(LayoutDefinition layout)
+ {
+ if (layout == null)
+ {
+ throw new IllegalArgumentException("Layout for a Dashboard Page is mandatory.");
+ }
+
+ // correct column collection based on new layout definition
+ while (this.columns.size() < layout.Columns)
+ {
+ addColumn(new Column());
+ }
+ if (this.columns.size() > layout.Columns)
+ {
+ this.columns = this.columns.subList(0, layout.Columns);
+ }
+
+ this.layoutDef = layout;
+ }
+
+ public void addColumn(Column column)
+ {
+ this.columns.add(column);
+ }
+
+ public List getColumns()
+ {
+ return this.columns;
+ }
+}
+
+/**
+ * Simple class representing a single Column in a dashboard Page.
+ * Each column contains a list of Dashlet definitions.
+ */
+final class Column
+{
+ private List dashlets = new ArrayList(4);
+
+ /**
+ * Default constructor
+ */
+ public Column()
+ {
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param copy Column to copy
+ */
+ public Column(Column copy)
+ {
+ this.dashlets = (List)((ArrayList)copy.dashlets).clone();
+ }
+
+ public void addDashlet(DashletDefinition dashlet)
+ {
+ dashlets.add(dashlet);
+ }
+
+ public List getDashlets()
+ {
+ return this.dashlets;
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/forums/CreateDiscussionDialog.java b/source/java/org/alfresco/web/bean/forums/CreateDiscussionDialog.java
index 8d42b33b30..6bf649df91 100644
--- a/source/java/org/alfresco/web/bean/forums/CreateDiscussionDialog.java
+++ b/source/java/org/alfresco/web/bean/forums/CreateDiscussionDialog.java
@@ -16,6 +16,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
@@ -154,11 +155,17 @@ public class CreateDiscussionDialog extends CreateTopicDialog
this.nodeService.removeAspect(this.discussingNodeRef, ForumModel.ASPECT_DISCUSSABLE);
// delete the forum space created when the wizard started
- this.browseBean.setActionSpace(this.navigator.getCurrentNode());
- this.browseBean.deleteSpaceOK();
-
+ Node forumNode = this.navigator.getCurrentNode();
+ this.nodeService.deleteNode(forumNode.getNodeRef());
+
// commit the transaction
tx.commit();
+
+ // remove this node from the breadcrumb if required
+ this.browseBean.removeSpaceFromBreadcrumb(forumNode);
+
+ // clear action context
+ this.browseBean.setActionSpace(null);
}
catch (Throwable e)
{
diff --git a/source/java/org/alfresco/web/bean/forums/CreateReplyDialog.java b/source/java/org/alfresco/web/bean/forums/CreateReplyDialog.java
index 6eb6c0c471..2602445122 100644
--- a/source/java/org/alfresco/web/bean/forums/CreateReplyDialog.java
+++ b/source/java/org/alfresco/web/bean/forums/CreateReplyDialog.java
@@ -5,8 +5,6 @@ import java.util.Map;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
-import org.alfresco.service.cmr.repository.ContentReader;
-import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.app.Application;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
@@ -62,32 +60,4 @@ public class CreateReplyDialog extends CreatePostDialog
{
return Application.getMessage(FacesContext.getCurrentInstance(), "reply");
}
-
- // ------------------------------------------------------------------------------
- // Bean Getters and Setters
-
- /**
- * Returns the content of the post we are replying to
- *
- * @return The content
- */
- public String getReplyContent()
- {
- if (this.replyContent == null)
- {
- // get the content reader of the node we are replying to
- NodeRef replyNode = this.browseBean.getDocument().getNodeRef();
- if (replyNode != null)
- {
- ContentReader reader = this.contentService.getReader(replyNode, ContentModel.PROP_CONTENT);
-
- if (reader != null)
- {
- this.replyContent = reader.getContentString();
- }
- }
- }
-
- return this.replyContent;
- }
}
diff --git a/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java b/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java
new file mode 100644
index 0000000000..786511cbf8
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java
@@ -0,0 +1,103 @@
+package org.alfresco.web.bean.forums;
+
+import java.text.MessageFormat;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.model.ForumModel;
+import org.alfresco.service.cmr.repository.ChildAssociationRef;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.namespace.QName;
+import org.alfresco.web.app.AlfrescoNavigationHandler;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.spaces.DeleteSpaceDialog;
+
+/**
+ * Bean implementation for the "Delete Forum" dialog
+ *
+ * @author gavinc
+ */
+public class DeleteForumDialog extends DeleteSpaceDialog
+{
+ protected boolean reDisplayForums;
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ public void init(Map parameters)
+ {
+ super.init(parameters);
+
+ // reset the reDisplayForums flag
+ this.reDisplayForums = false;
+ }
+
+ @Override
+ protected String finishImpl(FacesContext context, String outcome) throws Exception
+ {
+ // find out what the parent type of the node being deleted
+ Node node = this.browseBean.getActionSpace();
+ ChildAssociationRef assoc = this.nodeService.getPrimaryParent(node.getNodeRef());
+ if (assoc != null)
+ {
+ // get the parent node
+ NodeRef parent = assoc.getParentRef();
+
+ // get the association type
+ QName type = assoc.getTypeQName();
+ if (type.equals(ForumModel.ASSOC_DISCUSSION))
+ {
+ // if the association type is the 'discussion' association we
+ // need to remove the discussable aspect from the parent node
+ this.nodeService.removeAspect(parent, ForumModel.ASPECT_DISCUSSABLE);
+ }
+
+ // if the parent type is a forum space then we need the dialog to go
+ // back to the forums view otherwise it will use the default of 'browse',
+ // this happens when a forum being used to discuss a node is deleted.
+ QName parentType = this.nodeService.getType(parent);
+ if (parentType.equals(ForumModel.TYPE_FORUMS))
+ {
+ this.reDisplayForums = true;
+ }
+ }
+
+ return super.finishImpl(context, outcome);
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ outcome = super.doPostCommitProcessing(context, outcome);
+
+ if (this.reDisplayForums)
+ {
+ return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
+ AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "forumDeleted";
+ }
+ else
+ {
+ return outcome;
+ }
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean Getters and Setters
+
+ /**
+ * Returns the confirmation to display to the user before deleting the content.
+ *
+ * @return The formatted message to display
+ */
+ public String getConfirmMessage()
+ {
+ String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
+ "delete_forum_confirm");
+
+ return MessageFormat.format(fileConfirmMsg,
+ new Object[] {this.browseBean.getActionSpace().getName()});
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/forums/DeleteForumsDialog.java b/source/java/org/alfresco/web/bean/forums/DeleteForumsDialog.java
new file mode 100644
index 0000000000..a8902db9ee
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/forums/DeleteForumsDialog.java
@@ -0,0 +1,70 @@
+package org.alfresco.web.bean.forums;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.model.ForumModel;
+import org.alfresco.service.cmr.repository.ChildAssociationRef;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.namespace.QName;
+import org.alfresco.web.app.AlfrescoNavigationHandler;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.spaces.DeleteSpaceDialog;
+
+/**
+ * Bean implementation for the "Delete Forum Space" dialog
+ *
+ * @author gavinc
+ */
+public class DeleteForumsDialog extends DeleteSpaceDialog
+{
+ protected boolean reDisplayForums;
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ public void init(Map parameters)
+ {
+ super.init(parameters);
+
+ // reset the reDisplayForums flag
+ this.reDisplayForums = false;
+ }
+
+ @Override
+ protected String finishImpl(FacesContext context, String outcome) throws Exception
+ {
+ // find out what the parent type of the node being deleted
+ Node node = this.browseBean.getActionSpace();
+ ChildAssociationRef assoc = this.nodeService.getPrimaryParent(node.getNodeRef());
+ if (assoc != null)
+ {
+ NodeRef parent = assoc.getParentRef();
+ QName parentType = this.nodeService.getType(parent);
+ if (parentType.equals(ForumModel.TYPE_FORUMS))
+ {
+ this.reDisplayForums = true;
+ }
+ }
+
+ return super.finishImpl(context, outcome);
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ outcome = super.doPostCommitProcessing(context, outcome);
+
+ if (this.reDisplayForums)
+ {
+ return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
+ AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "forumsDeleted";
+ }
+ else
+ {
+ return outcome;
+ }
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/forums/DeletePostDialog.java b/source/java/org/alfresco/web/bean/forums/DeletePostDialog.java
new file mode 100644
index 0000000000..eded89c149
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/forums/DeletePostDialog.java
@@ -0,0 +1,44 @@
+package org.alfresco.web.bean.forums;
+
+import java.text.MessageFormat;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.content.DeleteContentDialog;
+
+/**
+ * Bean implementation for the "Delete Post" dialog.
+ *
+ * @author gavinc
+ */
+public class DeletePostDialog extends DeleteContentDialog
+{
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ super.doPostCommitProcessing(context, outcome);
+
+ return this.getDefaultFinishOutcome();
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean Getters and Setters
+
+ /**
+ * Returns the confirmation to display to the user before deleting the content.
+ *
+ * @return The formatted message to display
+ */
+ public String getConfirmMessage()
+ {
+ String postConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
+ "delete_post_confirm");
+
+ return MessageFormat.format(postConfirmMsg,
+ new Object[] {this.browseBean.getDocument().getProperties().get("creator")});
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java b/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java
new file mode 100644
index 0000000000..fcb2c93869
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java
@@ -0,0 +1,89 @@
+package org.alfresco.web.bean.forums;
+
+import java.text.MessageFormat;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.model.ForumModel;
+import org.alfresco.service.cmr.repository.ChildAssociationRef;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.namespace.QName;
+import org.alfresco.web.app.AlfrescoNavigationHandler;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.spaces.DeleteSpaceDialog;
+
+/**
+ * Bean implementation for the "Delete Topic" dialog
+ *
+ * @author gavinc
+ */
+public class DeleteTopicDialog extends DeleteSpaceDialog
+{
+ protected boolean reDisplayTopics;
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ public void init(Map parameters)
+ {
+ super.init(parameters);
+
+ // reset the reDisplayTopics flag
+ this.reDisplayTopics = false;
+ }
+
+ @Override
+ protected String finishImpl(FacesContext context, String outcome) throws Exception
+ {
+ // find out what the parent type of the node being deleted
+ Node node = this.browseBean.getActionSpace();
+ ChildAssociationRef assoc = this.nodeService.getPrimaryParent(node.getNodeRef());
+ if (assoc != null)
+ {
+ NodeRef parent = assoc.getParentRef();
+ QName parentType = this.nodeService.getType(parent);
+ if (parentType.equals(ForumModel.TYPE_FORUM))
+ {
+ this.reDisplayTopics = true;
+ }
+ }
+
+ return super.finishImpl(context, outcome);
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ outcome = super.doPostCommitProcessing(context, outcome);
+
+ if (this.reDisplayTopics)
+ {
+ return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
+ AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "topicDeleted";
+ }
+ else
+ {
+ return outcome;
+ }
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean Getters and Setters
+
+ /**
+ * Returns the confirmation to display to the user before deleting the content.
+ *
+ * @return The formatted message to display
+ */
+ public String getConfirmMessage()
+ {
+ String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
+ "delete_topic_confirm");
+
+ return MessageFormat.format(fileConfirmMsg,
+ new Object[] {this.browseBean.getActionSpace().getName()});
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/forums/ForumsBean.java b/source/java/org/alfresco/web/bean/forums/ForumsBean.java
index 3e93b12cbf..81d016fd86 100644
--- a/source/java/org/alfresco/web/bean/forums/ForumsBean.java
+++ b/source/java/org/alfresco/web/bean/forums/ForumsBean.java
@@ -17,6 +17,7 @@
package org.alfresco.web.bean.forums;
import java.io.IOException;
+import java.io.StringWriter;
import java.io.Writer;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
@@ -50,7 +51,6 @@ import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
-import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.context.IContextListener;
import org.alfresco.web.app.context.UIContextService;
@@ -536,6 +536,61 @@ public class ForumsBean implements IContextListener
}
}
+ /**
+ * Returns the HTML to represent a bubble rendition of the text of the the
+ * forum article being replied to.
+ *
+ * @return The HTML for the bubble
+ */
+ public String getReplyBubbleHTML()
+ {
+ try
+ {
+ // if the forum being replied to was a new post show the orange bubble
+ // with the user on the left otherwise show the yellow bubble with the
+ // user on the right.
+ StringWriter writer = new StringWriter();
+
+ FacesContext context = FacesContext.getCurrentInstance();
+ Node replyToNode = this.browseBean.getDocument();
+ boolean isReplyPost = this.nodeService.hasAspect(replyToNode.getNodeRef(),
+ ContentModel.ASPECT_REFERENCING);
+ String contextPath = context.getExternalContext().getRequestContextPath();
+ String colour = isReplyPost ? "yellow" : "orange";
+ String bgColour = isReplyPost ? "#FFF5A3" : "#FCC75E";
+
+ // build the HTML to represent the user that posted the article being replied to
+ StringBuilder replyPosterHTML = new StringBuilder("");
+ replyPosterHTML.append(";
+ replyPosterHTML.append(contextPath);
+ replyPosterHTML.append("/images/icons/user_large.gif) ");
+ replyPosterHTML.append((String)replyToNode.getProperties().get("creator"));
+ replyPosterHTML.append(" | ");
+
+ // start the table
+ writer.write("");
+
+ if (isReplyPost)
+ {
+ renderReplyContentHTML(context, replyToNode, writer, contextPath, colour, bgColour);
+ writer.write(replyPosterHTML.toString());
+ }
+ else
+ {
+ writer.write(replyPosterHTML.toString());
+ renderReplyContentHTML(context, replyToNode, writer, contextPath, colour, bgColour);
+ }
+
+ // finish the table
+ writer.write("
");
+
+ return writer.toString();
+ }
+ catch (IOException ioe)
+ {
+ throw new AlfrescoRuntimeException("Failed to render reply bubble HTML", ioe);
+ }
+ }
// ------------------------------------------------------------------------------
// IContextListener implementation
@@ -697,159 +752,21 @@ public class ForumsBean implements IContextListener
ForumModel.ASSOC_DISCUSSION, RegexQNamePattern.MATCH_ALL);
// there should only be one child, retrieve it if there is
- if (children.size() != 1)
+ if (children.size() == 1)
{
- throw new IllegalStateException("Node has the discussable aspect but does not have 1 child, it has " +
- children.size() + " children!");
+ // show the forum for the discussion
+ NodeRef forumNodeRef = children.get(0).getChildRef();
+ this.browseBean.clickSpace(forumNodeRef);
+ context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum");
+ }
+ else
+ {
+ // this should never happen as the action evaluator should stop the action
+ // from displaying, just in case print a warning to the console
+ logger.warn("Node has the discussable aspect but does not have 1 child, it has " +
+ children.size() + " children!");
}
-
- // show the forum for the discussion
- NodeRef forumNodeRef = children.get(0).getChildRef();
- this.browseBean.clickSpace(forumNodeRef);
- context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum");
}
-
- /**
- * Called when the user confirms they wish to delete a forum space
- *
- * @return The outcome
- */
- public String deleteForumsOK()
- {
- String outcomeOverride = "browse";
-
- // find out what the parent type of the node being deleted
- Node node = this.browseBean.getActionSpace();
- ChildAssociationRef assoc = this.nodeService.getPrimaryParent(node.getNodeRef());
- if (assoc != null)
- {
- NodeRef parent = assoc.getParentRef();
- QName parentType = this.nodeService.getType(parent);
- if (parentType.equals(ForumModel.TYPE_FORUMS))
- {
- outcomeOverride = "forumsDeleted";
- }
- }
-
- // call the generic handler
- String outcome = this.browseBean.deleteSpaceOK();
-
- // if the delete was successful update the outcome
- if (outcome != null)
- {
- // return an overidden outcome which closes the dialog with an outcome
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
- AlfrescoNavigationHandler.OUTCOME_SEPARATOR + outcomeOverride;
- }
-
- return outcome;
- }
-
- /**
- * Called when the user confirms they wish to delete a forum space
- *
- * @return The outcome
- */
- public String deleteForumOK()
- {
- String outcomeOverride = "browse";
-
- // if this forum is being used for a discussion on a node we also
- // need to remove the discussable aspect from the node.
- Node forumSpace = this.browseBean.getActionSpace();
- ChildAssociationRef assoc = this.nodeService.getPrimaryParent(forumSpace.getNodeRef());
- if (assoc != null)
- {
- // get the parent node
- NodeRef parent = assoc.getParentRef();
-
- // get the association type
- QName type = assoc.getTypeQName();
- if (type.equals(ForumModel.ASSOC_DISCUSSION))
- {
- // if the association type is the 'discussion' association we
- // need to remove the discussable aspect from the parent node
- this.nodeService.removeAspect(parent, ForumModel.ASPECT_DISCUSSABLE);
- }
-
- // if the parent type is a forum space then we need the dialog to go
- // back to the forums view otherwise it will use the default of 'browse',
- // this happens when a forum being used to discuss a node is deleted.
- QName parentType = this.nodeService.getType(parent);
- if (parentType.equals(ForumModel.TYPE_FORUMS))
- {
- outcomeOverride = "forumDeleted";
- }
- }
-
- // call the generic handler
- String outcome = this.browseBean.deleteSpaceOK();
-
- // if the delete was successful update the outcome
- if (outcome != null)
- {
- // return an overidden outcome which closes the dialog with an outcome
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
- AlfrescoNavigationHandler.OUTCOME_SEPARATOR + outcomeOverride;
- }
-
- return outcome;
- }
-
- /**
- * Called when the user confirms they wish to delete a forum space
- *
- * @return The outcome
- */
- public String deleteTopicOK()
- {
- String outcomeOverride = "browse";
-
- // find out what the parent type of the node being deleted
- Node node = this.browseBean.getActionSpace();
- ChildAssociationRef assoc = this.nodeService.getPrimaryParent(node.getNodeRef());
- if (assoc != null)
- {
- NodeRef parent = assoc.getParentRef();
- QName parentType = this.nodeService.getType(parent);
- if (parentType.equals(ForumModel.TYPE_FORUM))
- {
- outcomeOverride = "topicDeleted";
- }
- }
-
- // call the generic handler
- String outcome = this.browseBean.deleteSpaceOK();
-
- // if the delete was successful update the outcome
- if (outcome != null)
- {
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
- AlfrescoNavigationHandler.OUTCOME_SEPARATOR + outcomeOverride;
- }
-
- return outcome;
- }
-
- /**
- * Called when the user confirms they wish to delete a forum space
- *
- * @return The outcome
- */
- public String deletePostOK()
- {
- // call the generic handler
- String outcome = this.browseBean.deleteFileOK();
-
- // if the delete was successful update the outcome
- if (outcome != null)
- {
- outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
- }
-
- return outcome;
- }
-
// ------------------------------------------------------------------------------
// Property Resolvers
@@ -943,7 +860,7 @@ public class ForumsBean implements IContextListener
// ------------------------------------------------------------------------------
- // Private helpers
+ // Helpers
/**
* Initialise default values from client configuration
@@ -980,6 +897,37 @@ public class ForumsBean implements IContextListener
}
}
+ protected void renderReplyContentHTML(FacesContext context,
+ Node replyToNode, StringWriter writer,
+ String contextPath, String colour, String bgColour)
+ throws IOException
+ {
+ // get the content of the article being replied to
+ String replyContent = "";
+ ContentReader reader = this.contentService.getReader(replyToNode.getNodeRef(),
+ ContentModel.PROP_CONTENT);
+ if (reader != null)
+ {
+ replyContent = reader.getContentString();
+ }
+
+ // get the date of the article being replied to
+ String postedDate = Utils.getDateTimeFormat(context).
+ format(replyToNode.getProperties().get("created"));
+
+ // generate the HTML
+ writer.write("");
+ TopicBubbleViewRenderer.renderBubbleTop(writer, contextPath, colour, bgColour);
+ writer.write("");
+ writer.write(Application.getMessage(context, "posted"));
+ writer.write(": ");
+ writer.write(postedDate);
+ TopicBubbleViewRenderer.renderBubbleMiddle(writer, contextPath, colour);
+ writer.write(replyContent);
+ TopicBubbleViewRenderer.renderBubbleBottom(writer, contextPath, colour);
+ writer.write(" | ");
+ }
+
/**
* Class to implement a bubble view for the RichList component used in the topics screen
*
diff --git a/source/java/org/alfresco/web/bean/repository/DataDictionary.java b/source/java/org/alfresco/web/bean/repository/DataDictionary.java
index 3d3927e19e..dd92c04593 100644
--- a/source/java/org/alfresco/web/bean/repository/DataDictionary.java
+++ b/source/java/org/alfresco/web/bean/repository/DataDictionary.java
@@ -24,10 +24,7 @@ import org.alfresco.service.cmr.dictionary.AssociationDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
-import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* Lighweight client side representation of the repository data dictionary.
@@ -38,9 +35,7 @@ import org.apache.commons.logging.LogFactory;
*/
public final class DataDictionary
{
- private static Log logger = LogFactory.getLog(DataDictionary.class);
private DictionaryService dictionaryService;
- private NamespaceService namespaceService;
private Map types = new HashMap(11, 1.0f);
/**
diff --git a/source/java/org/alfresco/web/bean/repository/Node.java b/source/java/org/alfresco/web/bean/repository/Node.java
index 237b2e6ca2..f0a6e49e12 100644
--- a/source/java/org/alfresco/web/bean/repository/Node.java
+++ b/source/java/org/alfresco/web/bean/repository/Node.java
@@ -48,7 +48,7 @@ public class Node implements Serializable
{
private static final long serialVersionUID = 3544390322739034169L;
- protected static Log logger = LogFactory.getLog(Node.class);
+ protected static final Log logger = LogFactory.getLog(Node.class);
protected NodeRef nodeRef;
private String name;
diff --git a/source/java/org/alfresco/web/bean/repository/Preferences.java b/source/java/org/alfresco/web/bean/repository/Preferences.java
new file mode 100644
index 0000000000..71ad18778e
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/repository/Preferences.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.bean.repository;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.cmr.repository.NodeService;
+import org.alfresco.service.namespace.NamespaceService;
+import org.alfresco.service.namespace.QName;
+
+/**
+ * Wraps the notion of preferences and settings for a User.
+ * Caches values until they are overwritten with a new value.
+ *
+ * @author Kevin Roast
+ */
+public final class Preferences
+{
+ private NodeRef preferencesRef;
+ private NodeService nodeService;
+ private Map cache = new HashMap(16, 1.0f);
+
+ /**
+ * Package level constructor
+ */
+ Preferences(NodeRef prefRef)
+ {
+ if (prefRef == null)
+ {
+ throw new IllegalArgumentException("Preferences NodeRef cannot be null.");
+ }
+ this.preferencesRef = prefRef;
+ }
+
+ /**
+ * Get a serialized preferences value.
+ *
+ * @param name Name of the value to retrieve.
+ *
+ * @return The value or null if not found/set.
+ */
+ public Serializable getValue(String name)
+ {
+ Serializable value = this.cache.get(name);
+ if (value == null)
+ {
+ QName qname = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, name);
+ value = getNodeService().getProperty(this.preferencesRef, qname);
+ this.cache.put(name, value);
+ }
+ return value;
+ }
+
+ /**
+ * Set a serialized preference value.
+ *
+ * @param name Name of the value to set.
+ * @param value Value to set.
+ */
+ public void setValue(String name, Serializable value)
+ {
+ QName qname = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, name);
+ // persist the property to the repo
+ getNodeService().setProperty(this.preferencesRef, qname, value);
+ // update the cache
+ this.cache.put(name, value);
+ }
+
+ /**
+ * @return the NodeService instance.
+ */
+ private NodeService getNodeService()
+ {
+ if (this.nodeService == null)
+ {
+ this.nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
+ }
+ return this.nodeService;
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/repository/PreferencesService.java b/source/java/org/alfresco/web/bean/repository/PreferencesService.java
new file mode 100644
index 0000000000..84796a9bd9
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/repository/PreferencesService.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.bean.repository;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.web.app.Application;
+
+/**
+ * Simple client service to retrieve the Preferences object for the current User.
+ *
+ * @author Kevin Roast
+ */
+public final class PreferencesService
+{
+ /**
+ * Private constructor
+ */
+ private PreferencesService()
+ {
+ }
+
+ /**
+ * @return The Preferences for the current User instance.
+ */
+ public static Preferences getPreferences()
+ {
+ return getPreferences(FacesContext.getCurrentInstance());
+ }
+
+ /**
+ * @param fc FacesContext
+ * @return The Preferences for the current User instance.
+ */
+ public static Preferences getPreferences(FacesContext fc)
+ {
+ User user = Application.getCurrentUser(fc);
+ return getPreferences(user);
+ }
+
+ /**
+ * @param user User instance
+ * @return The Preferences for the current User instance.
+ */
+ public static Preferences getPreferences(User user)
+ {
+ return user.getPreferences();
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/repository/User.java b/source/java/org/alfresco/web/bean/repository/User.java
index c6f794649c..cfcb58a2bb 100644
--- a/source/java/org/alfresco/web/bean/repository/User.java
+++ b/source/java/org/alfresco/web/bean/repository/User.java
@@ -45,8 +45,7 @@ public final class User
private String fullName = null;
private Boolean administrator = null;
- /** cached ref to our user preferences node */
- private NodeRef preferencesFolderRef = null;
+ private Preferences preferences = null;
/**
* Constructor
@@ -139,63 +138,70 @@ public final class User
return administrator;
}
+ /**
+ * @return The Preferences for the User
+ */
+ Preferences getPreferences()
+ {
+ if (this.preferences == null)
+ {
+ this.preferences = new Preferences(getUserPreferencesRef());
+ }
+ return this.preferences;
+ }
+
/**
* Get or create the node used to store user preferences.
* Utilises the 'configurable' aspect on the Person linked to this user.
*/
- public synchronized NodeRef getUserPreferencesRef()
+ synchronized NodeRef getUserPreferencesRef()
{
- if (this.preferencesFolderRef == null)
+ FacesContext fc = FacesContext.getCurrentInstance();
+ ServiceRegistry registry = Repository.getServiceRegistry(fc);
+ NodeService nodeService = registry.getNodeService();
+ SearchService searchService = registry.getSearchService();
+ NamespaceService namespaceService = registry.getNamespaceService();
+ ConfigurableService configurableService = Repository.getConfigurableService(fc);
+
+ NodeRef person = Application.getCurrentUser(fc).getPerson();
+ if (nodeService.hasAspect(person, ContentModel.ASPECT_CONFIGURABLE) == false)
{
- FacesContext fc = FacesContext.getCurrentInstance();
- ServiceRegistry registry = Repository.getServiceRegistry(fc);
- NodeService nodeService = registry.getNodeService();
- SearchService searchService = registry.getSearchService();
- NamespaceService namespaceService = registry.getNamespaceService();
- ConfigurableService configurableService = Repository.getConfigurableService(fc);
-
- NodeRef person = Application.getCurrentUser(fc).getPerson();
- if (nodeService.hasAspect(person, ContentModel.ASPECT_CONFIGURABLE) == false)
- {
- // create the configuration folder for this Person node
- configurableService.makeConfigurable(person);
- }
-
- // target of the assoc is the configurations folder ref
- NodeRef configRef = configurableService.getConfigurationFolder(person);
- if (configRef == null)
- {
- throw new IllegalStateException("Unable to find associated 'configurations' folder for node: " + person);
- }
-
- String xpath = NamespaceService.APP_MODEL_PREFIX + ":" + "preferences";
- List nodes = searchService.selectNodes(
- configRef,
- xpath,
- null,
- namespaceService,
- false);
-
- NodeRef prefRef;
- if (nodes.size() == 1)
- {
- prefRef = nodes.get(0);
- }
- else
- {
- // create the preferences Node for this user
- ChildAssociationRef childRef = nodeService.createNode(
- configRef,
- ContentModel.ASSOC_CONTAINS,
- QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "preferences"),
- ContentModel.TYPE_CMOBJECT);
-
- prefRef = childRef.getChildRef();
- }
-
- this.preferencesFolderRef = prefRef;
+ // create the configuration folder for this Person node
+ configurableService.makeConfigurable(person);
}
- return this.preferencesFolderRef;
+ // target of the assoc is the configurations folder ref
+ NodeRef configRef = configurableService.getConfigurationFolder(person);
+ if (configRef == null)
+ {
+ throw new IllegalStateException("Unable to find associated 'configurations' folder for node: " + person);
+ }
+
+ String xpath = NamespaceService.APP_MODEL_PREFIX + ":" + "preferences";
+ List nodes = searchService.selectNodes(
+ configRef,
+ xpath,
+ null,
+ namespaceService,
+ false);
+
+ NodeRef prefRef;
+ if (nodes.size() == 1)
+ {
+ prefRef = nodes.get(0);
+ }
+ else
+ {
+ // create the preferences Node for this user
+ ChildAssociationRef childRef = nodeService.createNode(
+ configRef,
+ ContentModel.ASSOC_CONTAINS,
+ QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "preferences"),
+ ContentModel.TYPE_CMOBJECT);
+
+ prefRef = childRef.getChildRef();
+ }
+
+ return prefRef;
}
}
diff --git a/source/java/org/alfresco/web/bean/rules/RulesBean.java b/source/java/org/alfresco/web/bean/rules/RulesBean.java
index de3cbecc77..e3dc802b17 100644
--- a/source/java/org/alfresco/web/bean/rules/RulesBean.java
+++ b/source/java/org/alfresco/web/bean/rules/RulesBean.java
@@ -327,7 +327,7 @@ public class RulesBean implements IContextListener
* Inner class to wrap the Rule objects so we can expose a flag to indicate whether
* the rule is a local or inherited rule
*/
- public class WrappedRule
+ public static class WrappedRule
{
private Rule rule;
private NodeRef ruleNode;
diff --git a/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java b/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java
index ce66577e4c..6fffd00e31 100644
--- a/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java
+++ b/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java
@@ -95,6 +95,24 @@ public class CreateSpaceWizard extends BaseWizardBean
this.saveAsTemplate = false;
}
+ public String next()
+ {
+ // if the user has chosen to create the space from an existing
+ // space or from a template we need to find it's type to show
+ // the current set of icons.
+ if (this.createFrom.equals("existing") && this.existingSpaceId != null)
+ {
+ this.spaceType = this.nodeService.getType(this.existingSpaceId).toString();
+ }
+ else if (this.createFrom.equals("template") && this.templateSpaceId != null)
+ {
+ NodeRef templateNode = new NodeRef(Repository.getStoreRef(), this.templateSpaceId);
+ this.spaceType = this.nodeService.getType(templateNode).toString();
+ }
+
+ return null;
+ }
+
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
@@ -611,6 +629,7 @@ public class CreateSpaceWizard extends BaseWizardBean
// which the user can change during the advanced space wizard
List icons = null;
+ List iconNames = new ArrayList(8);
QName type = QName.createQName(this.spaceType);
String typePrefixForm = type.toPrefixString(this.namespaceService);
@@ -648,6 +667,7 @@ public class CreateSpaceWizard extends BaseWizardBean
item.setValue(iconName);
item.getAttributes().put("image", iconPath);
icons.add(item);
+ iconNames.add(iconName);
}
}
}
@@ -660,9 +680,17 @@ public class CreateSpaceWizard extends BaseWizardBean
this.icon = DEFAULT_SPACE_ICON_NAME;
UIListItem item = new UIListItem();
- item.setValue("space-icon-default");
+ item.setValue(DEFAULT_SPACE_ICON_NAME);
item.getAttributes().put("image", "/images/icons/space-icon-default.gif");
icons.add(item);
+ iconNames.add(DEFAULT_SPACE_ICON_NAME);
+ }
+
+ // make sure the current value for the icon is valid for the
+ // current list of icons about to be displayed
+ if (iconNames.contains(this.icon) == false)
+ {
+ this.icon = iconNames.get(0);
}
return icons;
diff --git a/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java b/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java
new file mode 100644
index 0000000000..5001db6ca6
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java
@@ -0,0 +1,100 @@
+package org.alfresco.web.bean.spaces;
+
+import java.text.MessageFormat;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.alfresco.web.app.AlfrescoNavigationHandler;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.content.DeleteContentDialog;
+import org.alfresco.web.bean.dialog.BaseDialogBean;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.ui.common.Utils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Bean implementation for the "Delete Space" dialog
+ *
+ * @author gavinc
+ */
+public class DeleteSpaceDialog extends BaseDialogBean
+{
+ private static final Log logger = LogFactory.getLog(DeleteContentDialog.class);
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ @Override
+ protected String finishImpl(FacesContext context, String outcome)
+ throws Exception
+ {
+ // get the space to delete
+ Node node = this.browseBean.getActionSpace();
+ if (node != null)
+ {
+ if (logger.isDebugEnabled())
+ logger.debug("Trying to delete space: " + node.getId());
+
+ this.nodeService.deleteNode(node.getNodeRef());
+ }
+ else
+ {
+ logger.warn("WARNING: delete called without a current Space!");
+ }
+
+ return outcome;
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ Node node = this.browseBean.getActionSpace();
+
+ // remove this node from the breadcrumb if required
+ this.browseBean.removeSpaceFromBreadcrumb(node);
+
+ // add a message to inform the user that the delete was OK
+ String statusMsg = MessageFormat.format(
+ Application.getMessage(FacesContext.getCurrentInstance(), "status_space_deleted"),
+ new Object[]{node.getName()});
+ Utils.addStatusMessage(FacesMessage.SEVERITY_INFO, statusMsg);
+
+ // clear action context
+ this.browseBean.setActionSpace(null);
+
+ // setting the outcome will show the browse view again
+ return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
+ AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
+ }
+
+ @Override
+ protected String getErrorMessageId()
+ {
+ return "error_delete_space";
+ }
+
+ @Override
+ public boolean getFinishButtonDisabled()
+ {
+ return false;
+ }
+
+ // ------------------------------------------------------------------------------
+ // Bean Getters and Setters
+
+ /**
+ * Returns the confirmation to display to the user before deleting the content.
+ *
+ * @return The formatted message to display
+ */
+ public String getConfirmMessage()
+ {
+ String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
+ "delete_space_confirm");
+
+ return MessageFormat.format(fileConfirmMsg,
+ new Object[] {this.browseBean.getActionSpace().getName()});
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/users/UsersBean.java b/source/java/org/alfresco/web/bean/users/UsersBean.java
index e6f906cfc3..a03197a32d 100644
--- a/source/java/org/alfresco/web/bean/users/UsersBean.java
+++ b/source/java/org/alfresco/web/bean/users/UsersBean.java
@@ -59,6 +59,7 @@ public class UsersBean implements IContextListener
private static final String ERROR_USER_DELETE = "error_delete_user_object";
private static final String DEFAULT_OUTCOME = "manageUsers";
+ private static final String DIALOG_CLOSE = "dialog:close";
/** NodeService bean reference */
protected NodeService nodeService;
@@ -81,6 +82,7 @@ public class UsersBean implements IContextListener
private List users = Collections.emptyList();
private String password = null;
+ private String oldPassword = null;
private String confirm = null;
private String searchCriteria = null;
@@ -208,6 +210,22 @@ public class UsersBean implements IContextListener
{
this.password = password;
}
+
+ /**
+ * @return Returns the old password.
+ */
+ public String getOldPassword()
+ {
+ return this.oldPassword;
+ }
+
+ /**
+ * @param oldPassword The old password to set.
+ */
+ public void setOldPassword(String oldPassword)
+ {
+ this.oldPassword = oldPassword;
+ }
/**
* @return Returns the person context.
@@ -271,14 +289,9 @@ public class UsersBean implements IContextListener
*/
public String deleteOK()
{
- UserTransaction tx = null;
-
+ FacesContext context = FacesContext.getCurrentInstance();
try
{
- FacesContext context = FacesContext.getCurrentInstance();
- tx = Repository.getUserTransaction(context);
- tx.begin();
-
String userName = (String)getPerson().getProperties().get("userName");
// we only delete the user auth if Alfresco is managing the authentication
@@ -292,28 +305,24 @@ public class UsersBean implements IContextListener
}
catch (AuthenticationException authErr)
{
- Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), ERROR_USER_DELETE));
+ Utils.addErrorMessage(Application.getMessage(context, ERROR_USER_DELETE));
}
}
// delete the associated Person
this.personService.deletePerson(userName);
- // commit the transaction
- tx.commit();
-
// re-do the search to refresh the list
search();
}
catch (Throwable e)
{
// rollback the transaction
- try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
- Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext
- .getCurrentInstance(), ERROR_DELETE), e.getMessage()), e);
+ Utils.addErrorMessage(MessageFormat.format(Application.getMessage(context,
+ ERROR_DELETE), e.getMessage()), e);
}
- return DEFAULT_OUTCOME;
+ return DIALOG_CLOSE;
}
/**
@@ -321,7 +330,7 @@ public class UsersBean implements IContextListener
*/
public String changePasswordOK()
{
- String outcome = DEFAULT_OUTCOME;
+ String outcome = DIALOG_CLOSE;
if (this.password != null && this.confirm != null && this.password.equals(this.confirm))
{
@@ -346,6 +355,39 @@ public class UsersBean implements IContextListener
return outcome;
}
+
+ /**
+ * Action handler called for OK button press on Change My Password screen
+ * For this screen the user is required to enter their old password - effectively login.
+ */
+ public String changeMyPasswordOK()
+ {
+ String outcome = DIALOG_CLOSE;
+
+ if (this.password != null && this.confirm != null && this.password.equals(this.confirm))
+ {
+ try
+ {
+ String userName = (String)this.person.getProperties().get(ContentModel.PROP_USERNAME);
+ this.authenticationService.updateAuthentication(userName, this.oldPassword.toCharArray(), this.password.toCharArray());
+ }
+ catch (Exception e)
+ {
+ outcome = null;
+ Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext
+ .getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
+ }
+ }
+ else
+ {
+ outcome = null;
+ Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(),
+ ERROR_PASSWORD_MATCH));
+ }
+
+ return outcome;
+ }
+
/**
* Event handler called when the user wishes to search for a user
diff --git a/source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java b/source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java
index 4ed69c1065..8d1a1e914f 100644
--- a/source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java
+++ b/source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java
@@ -15,6 +15,16 @@ public abstract class BaseWizardBean extends BaseDialogBean implements IWizardBe
{
private static final String MSG_NOT_SET = "value_not_set";
+ public String next()
+ {
+ return null;
+ }
+
+ public String back()
+ {
+ return null;
+ }
+
public boolean getNextButtonDisabled()
{
return false;
diff --git a/source/java/org/alfresco/web/bean/wizard/IWizardBean.java b/source/java/org/alfresco/web/bean/wizard/IWizardBean.java
index b1e436a495..d8f46a7f0e 100644
--- a/source/java/org/alfresco/web/bean/wizard/IWizardBean.java
+++ b/source/java/org/alfresco/web/bean/wizard/IWizardBean.java
@@ -9,6 +9,20 @@ import org.alfresco.web.bean.dialog.IDialogBean;
*/
public interface IWizardBean extends IDialogBean
{
+ /**
+ * Called when the next button is pressed by the user
+ *
+ * @return Reserved for future use
+ */
+ public String next();
+
+ /**
+ * Called when the back button is pressed by the user
+ *
+ * @return Reserved for future use
+ */
+ public String back();
+
/**
* Returns the label to use for the next button
*
diff --git a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java b/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
index 0f38fee2aa..df0afdfb48 100644
--- a/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
+++ b/source/java/org/alfresco/web/bean/wizard/InviteUsersWizard.java
@@ -297,7 +297,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.usingTemplate);
ServiceRegistry services = Repository.getServiceRegistry(fc);
Map model = DefaultModelHelper.buildDefaultModel(
- services, Application.getCurrentUser(fc));
+ services, Application.getCurrentUser(fc), templateRef);
model.put("role", roleText);
model.put("space", new TemplateNode(node, Repository.getServiceRegistry(fc), null));
diff --git a/source/java/org/alfresco/web/bean/wizard/WizardManager.java b/source/java/org/alfresco/web/bean/wizard/WizardManager.java
index 79c587f8c7..f708413da4 100644
--- a/source/java/org/alfresco/web/bean/wizard/WizardManager.java
+++ b/source/java/org/alfresco/web/bean/wizard/WizardManager.java
@@ -412,8 +412,8 @@ public class WizardManager
if (logger.isDebugEnabled())
logger.debug("next called, current step is now: " + this.currentStep);
- // TODO: place a hook in here to call the wizard bean so it can override
- // what step comes next thus overrriding the wizard manager
+ // tell the wizard the next button has been pressed
+ this.currentWizard.next();
determineCurrentPage();
}
@@ -430,8 +430,8 @@ public class WizardManager
if (logger.isDebugEnabled())
logger.debug("back called, current step is now: " + this.currentStep);
- // TODO: place a hook in here to call the wizard bean so it can override
- // what step comes next thus overrriding the wizard manager
+ // tell the wizard the back button has been pressed
+ this.currentWizard.back();
determineCurrentPage();
}
diff --git a/source/java/org/alfresco/web/config/ActionsConfigElement.java b/source/java/org/alfresco/web/config/ActionsConfigElement.java
index 4331d6b85a..b57336ff36 100644
--- a/source/java/org/alfresco/web/config/ActionsConfigElement.java
+++ b/source/java/org/alfresco/web/config/ActionsConfigElement.java
@@ -288,7 +288,7 @@ public class ActionsConfigElement extends ConfigElementAdapter
return this.actions;
}
- /*pacakge*/ Set getHiddenActions()
+ /*package*/ Set getHiddenActions()
{
return this.hiddenActions;
}
diff --git a/source/java/org/alfresco/web/config/AspectEvaluator.java b/source/java/org/alfresco/web/config/AspectEvaluator.java
index 2c52f24bf7..164228e1e8 100644
--- a/source/java/org/alfresco/web/config/AspectEvaluator.java
+++ b/source/java/org/alfresco/web/config/AspectEvaluator.java
@@ -28,7 +28,7 @@ import org.alfresco.web.bean.repository.Repository;
*
* @author gavinc
*/
-public class AspectEvaluator implements Evaluator
+public final class AspectEvaluator implements Evaluator
{
/**
* Determines whether the given aspect is applied to the given object
@@ -51,5 +51,4 @@ public class AspectEvaluator implements Evaluator
return result;
}
-
}
diff --git a/source/java/org/alfresco/web/config/ClientConfigElement.java b/source/java/org/alfresco/web/config/ClientConfigElement.java
index fc7488ceea..4c75bfcc8d 100644
--- a/source/java/org/alfresco/web/config/ClientConfigElement.java
+++ b/source/java/org/alfresco/web/config/ClientConfigElement.java
@@ -39,6 +39,7 @@ public class ClientConfigElement extends ConfigElementAdapter
private String helpUrl = null;
private String editLinkType = "http";
private String homeSpacePermission = null;
+ private boolean ajaxEnabled = false;
/**
* Default Constructor
@@ -329,4 +330,22 @@ public class ClientConfigElement extends ConfigElementAdapter
{
this.homeSpacePermission = homeSpacePermission;
}
+
+ /**
+ * @return Returns whether AJAX support is enabled in the client
+ */
+ public boolean isAjaxEnabled()
+ {
+ return this.ajaxEnabled;
+ }
+
+ /**
+ * Sets whether AJAX support is enabled in the client
+ *
+ * @param ajaxEnabled
+ */
+ /*package*/ void setAjaxEnabled(boolean ajaxEnabled)
+ {
+ this.ajaxEnabled = ajaxEnabled;
+ }
}
diff --git a/source/java/org/alfresco/web/config/ClientElementReader.java b/source/java/org/alfresco/web/config/ClientElementReader.java
index 73cf1ecc5c..00feb8377f 100644
--- a/source/java/org/alfresco/web/config/ClientElementReader.java
+++ b/source/java/org/alfresco/web/config/ClientElementReader.java
@@ -39,6 +39,7 @@ public class ClientElementReader implements ConfigElementReader
public static final String ELEMENT_HOMESPACEPERMISSION = "home-space-permission";
public static final String ELEMENT_FROMEMAILADDRESS = "from-email-address";
public static final String ELEMENT_SHELFVISIBLE = "shelf-visible";
+ public static final String ELEMENT_AJAX_ENABLED = "ajax-enabled";
/**
* @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element)
@@ -136,6 +137,13 @@ public class ClientElementReader implements ConfigElementReader
{
configElement.setLoginPage(loginPage.getTextTrim());
}
+
+ // get the ajax enabled flag
+ Element ajaxEnabled = element.element(ELEMENT_AJAX_ENABLED);
+ if (ajaxEnabled != null)
+ {
+ configElement.setAjaxEnabled(Boolean.parseBoolean(ajaxEnabled.getTextTrim()));
+ }
}
return configElement;
diff --git a/source/java/org/alfresco/web/config/DashboardsConfigElement.java b/source/java/org/alfresco/web/config/DashboardsConfigElement.java
new file mode 100644
index 0000000000..d35e0256e5
--- /dev/null
+++ b/source/java/org/alfresco/web/config/DashboardsConfigElement.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.config;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.alfresco.config.ConfigElement;
+import org.alfresco.config.ConfigException;
+import org.alfresco.config.element.ConfigElementAdapter;
+
+/**
+ * Dashboard config element.
+ *
+ * @author Kevin Roast
+ */
+public class DashboardsConfigElement extends ConfigElementAdapter
+{
+ public static final String CONFIG_ELEMENT_ID = "dashboards";
+
+ private Map layoutDefs = new LinkedHashMap(4, 1.0f);
+ private Map dashletDefs = new LinkedHashMap(8, 1.0f);
+
+ /**
+ * Default constructor
+ */
+ public DashboardsConfigElement()
+ {
+ super(CONFIG_ELEMENT_ID);
+ }
+
+ /**
+ * @param name
+ */
+ public DashboardsConfigElement(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * @see org.alfresco.config.element.ConfigElementAdapter#getChildren()
+ */
+ public List getChildren()
+ {
+ throw new ConfigException("Reading the Dashboards config via the generic interfaces is not supported");
+ }
+
+ /**
+ * @see org.alfresco.config.element.ConfigElementAdapter#combine(org.alfresco.config.ConfigElement)
+ */
+ public ConfigElement combine(ConfigElement configElement)
+ {
+ DashboardsConfigElement newElement = (DashboardsConfigElement)configElement;
+ DashboardsConfigElement combinedElement = new DashboardsConfigElement();
+
+ // put all into combined from this and then from new to override any already present
+ combinedElement.dashletDefs.putAll(this.dashletDefs);
+ combinedElement.dashletDefs.putAll(newElement.dashletDefs);
+
+ combinedElement.layoutDefs.putAll(this.layoutDefs);
+ combinedElement.layoutDefs.putAll(newElement.layoutDefs);
+
+ return combinedElement;
+ }
+
+ /*package*/ void addLayoutDefinition(LayoutDefinition def)
+ {
+ this.layoutDefs.put(def.Id, def);
+ }
+
+ public LayoutDefinition getLayoutDefinition(String id)
+ {
+ return this.layoutDefs.get(id);
+ }
+
+ /*package*/ void addDashletDefinition(DashletDefinition def)
+ {
+ this.dashletDefs.put(def.Id, def);
+ }
+
+ public DashletDefinition getDashletDefinition(String id)
+ {
+ return this.dashletDefs.get(id);
+ }
+
+ public Collection getLayouts()
+ {
+ return this.layoutDefs.values();
+ }
+
+ public Collection getDashlets()
+ {
+ return this.dashletDefs.values();
+ }
+
+ /**
+ * Structure class for the definition of a dashboard page layout
+ */
+ public static class LayoutDefinition
+ {
+ LayoutDefinition(String id)
+ {
+ this.Id = id;
+ }
+
+ public String Id;
+ public String Image;
+ public int Columns;
+ public int ColumnLength;
+ public String Label;
+ public String LabelId;
+ public String Description;
+ public String DescriptionId;
+ public String JSPPage;
+ }
+
+ /**
+ * Structure class for the definition of a dashboard dashlet component
+ */
+ public static class DashletDefinition
+ {
+ DashletDefinition(String id)
+ {
+ this.Id = id;
+ }
+
+ public String Id;
+ public boolean AllowNarrow = true;
+ public String Label;
+ public String LabelId;
+ public String Description;
+ public String DescriptionId;
+ public String JSPPage;
+ }
+}
diff --git a/source/java/org/alfresco/web/config/DashboardsElementReader.java b/source/java/org/alfresco/web/config/DashboardsElementReader.java
new file mode 100644
index 0000000000..b9e3e08079
--- /dev/null
+++ b/source/java/org/alfresco/web/config/DashboardsElementReader.java
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.config;
+
+import java.util.Iterator;
+
+import org.alfresco.config.ConfigElement;
+import org.alfresco.config.ConfigException;
+import org.alfresco.config.xml.elementreader.ConfigElementReader;
+import org.alfresco.web.config.DashboardsConfigElement.DashletDefinition;
+import org.alfresco.web.config.DashboardsConfigElement.LayoutDefinition;
+import org.dom4j.Element;
+
+/**
+ * Reader for the 'dashboards' config element and child elements.
+ *
+ * @author Kevin Roast
+ */
+public class DashboardsElementReader implements ConfigElementReader
+{
+ public static final String ELEMENT_DASHBOARDS = "dashboards";
+ public static final String ELEMENT_LAYOUTS = "layouts";
+ public static final String ELEMENT_LAYOUT = "layout";
+ public static final String ELEMENT_DASHLETS = "dashlets";
+ public static final String ELEMENT_DASHLET = "dashlet";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_COLUMNS = "columns";
+ public static final String ATTR_COLUMNLENGTH = "column-length";
+ public static final String ATTR_IMAGE = "image";
+ public static final String ATTR_LABEL = "label";
+ public static final String ATTR_DESCRIPTION = "description";
+ public static final String ATTR_LABELID = "label-id";
+ public static final String ATTR_DESCRIPTIONID = "description-id";
+ public static final String ATTR_JSP = "jsp";
+ public static final String ATTR_ALLOWNARROW = "allow-narrow";
+
+ /**
+ * @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element)
+ */
+ @SuppressWarnings("unchecked")
+ public ConfigElement parse(Element element)
+ {
+ DashboardsConfigElement configElement = new DashboardsConfigElement();
+
+ if (element != null)
+ {
+ if (DashboardsConfigElement.CONFIG_ELEMENT_ID.equals(element.getName()) == false)
+ {
+ throw new ConfigException("DashboardsElementReader can only process elements of type 'dashboards'");
+ }
+
+ Element layoutsElement = element.element(ELEMENT_LAYOUTS);
+ if (layoutsElement != null)
+ {
+ Iterator layoutsItr = layoutsElement.elementIterator(ELEMENT_LAYOUT);
+ while (layoutsItr.hasNext())
+ {
+ LayoutDefinition layoutDef = parseLayoutDefinition(layoutsItr.next());
+ configElement.addLayoutDefinition(layoutDef);
+ }
+ }
+
+ Element dashletsElement = element.element(ELEMENT_DASHLETS);
+ if (dashletsElement != null)
+ {
+ Iterator dashletsItr = dashletsElement.elementIterator(ELEMENT_DASHLET);
+ while (dashletsItr.hasNext())
+ {
+ DashletDefinition dashletDef = parseDashletDefinition(dashletsItr.next());
+ configElement.addDashletDefinition(dashletDef);
+ }
+ }
+ }
+
+ return configElement;
+ }
+
+ /**
+ * Parse a single Layout definition from config.
+ *
+ * @param config
+ *
+ * @return LayoutDefinition for the specified config element.
+ */
+ private static LayoutDefinition parseLayoutDefinition(Element config)
+ {
+ String id = getMandatoryLayoutAttributeValue(config, ATTR_ID);
+
+ LayoutDefinition def = new LayoutDefinition(id);
+
+ String columns = getMandatoryLayoutAttributeValue(config, ATTR_COLUMNS);
+ def.Columns = Integer.parseInt(columns);
+ String columnLength = getMandatoryLayoutAttributeValue(config, ATTR_COLUMNLENGTH);
+ def.ColumnLength = Integer.parseInt(columnLength);
+ def.Image = getMandatoryLayoutAttributeValue(config, ATTR_IMAGE);
+ def.JSPPage = getMandatoryLayoutAttributeValue(config, ATTR_JSP);
+ String label = config.attributeValue(ATTR_LABEL);
+ String labelId = config.attributeValue(ATTR_LABELID);
+ if ((label == null || label.length() == 0) && (labelId == null || labelId.length() == 0))
+ {
+ throw new ConfigException("Either 'label' or 'label-id' attribute must be specified for Dashboard 'layout' configuration element.");
+ }
+ def.Label = label;
+ def.LabelId = labelId;
+ String description = config.attributeValue(ATTR_DESCRIPTION);
+ String descriptionId = config.attributeValue(ATTR_DESCRIPTIONID);
+ if ((description == null || description.length() == 0) && (descriptionId == null || descriptionId.length() == 0))
+ {
+ throw new ConfigException("Either 'description' or 'description-id' attribute must be specified for Dashboard 'layout' configuration element.");
+ }
+ def.Description = description;
+ def.DescriptionId = descriptionId;
+
+ return def;
+ }
+
+ /**
+ * Return a mandatory layout attribute layout. Throw an exception if the value is not found.
+ *
+ * @param config
+ * @param attr
+ *
+ * @return String value
+ */
+ private static String getMandatoryLayoutAttributeValue(Element config, String attr)
+ {
+ String value = config.attributeValue(attr);
+ if (value == null || value.length() == 0)
+ {
+ throw new ConfigException("Missing mandatory '" + attr + "' attribute for Dashboard 'layout' configuration element.");
+ }
+ return value;
+ }
+
+ /**
+ * Parse a single Dashlet definition from config.
+ *
+ * @param config
+ *
+ * @return DashletDefinition for the specified config element.
+ */
+ private static DashletDefinition parseDashletDefinition(Element config)
+ {
+ String id = getMandatoryDashletAttributeValue(config, ATTR_ID);
+
+ DashletDefinition def = new DashletDefinition(id);
+
+ String allowNarrow = config.attributeValue(ATTR_ALLOWNARROW);
+ if (allowNarrow != null && allowNarrow.length() != 0)
+ {
+ def.AllowNarrow = Boolean.parseBoolean(allowNarrow);
+ }
+ def.JSPPage = getMandatoryDashletAttributeValue(config, ATTR_JSP);
+ String label = config.attributeValue(ATTR_LABEL);
+ String labelId = config.attributeValue(ATTR_LABELID);
+ if ((label == null || label.length() == 0) && (labelId == null || labelId.length() == 0))
+ {
+ throw new ConfigException("Either 'label' or 'label-id' attribute must be specified for Dashboard 'dashlet' configuration element.");
+ }
+ def.Label = label;
+ def.LabelId = labelId;
+ String description = config.attributeValue(ATTR_DESCRIPTION);
+ String descriptionId = config.attributeValue(ATTR_DESCRIPTIONID);
+ if ((description == null || description.length() == 0) && (descriptionId == null || descriptionId.length() == 0))
+ {
+ throw new ConfigException("Either 'description' or 'description-id' attribute must be specified for Dashboard 'dashlet' configuration element.");
+ }
+ def.Description = description;
+ def.DescriptionId = descriptionId;
+
+ return def;
+ }
+
+ /**
+ * Return a mandatory dashlet attribute layout. Throw an exception if the value is not found.
+ *
+ * @param config
+ * @param attr
+ *
+ * @return String value
+ */
+ private static String getMandatoryDashletAttributeValue(Element config, String attr)
+ {
+ String value = config.attributeValue(attr);
+ if (value == null || value.length() == 0)
+ {
+ throw new ConfigException("Missing mandatory '" + attr + "' attribute for Dashboard 'dashlet' configuration element.");
+ }
+ return value;
+ }
+}
diff --git a/source/java/org/alfresco/web/data/Sort.java b/source/java/org/alfresco/web/data/Sort.java
index 67bc8fac81..fce5bcaca2 100644
--- a/source/java/org/alfresco/web/data/Sort.java
+++ b/source/java/org/alfresco/web/data/Sort.java
@@ -94,6 +94,7 @@ public abstract class Sort
*
* @param collator the Collator object to use to build String keys
*/
+ @SuppressWarnings("unchecked")
protected List buildCollationKeys(Collator collator)
{
List data = this.data;
@@ -260,6 +261,7 @@ public abstract class Sort
* Given the array and two indices, swap the two items in the
* array.
*/
+ @SuppressWarnings("unchecked")
protected void swap(final List v, final int a, final int b)
{
Object temp = v.get(a);
@@ -294,7 +296,7 @@ public abstract class Sort
// ------------------------------------------------------------------------------
// Inner classes for data type comparison
- private class SimpleComparator implements Comparator
+ private static class SimpleComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -308,7 +310,7 @@ public abstract class Sort
}
}
- private class SimpleStringComparator implements Comparator
+ private static class SimpleStringComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -322,7 +324,7 @@ public abstract class Sort
}
}
- private class StringComparator implements Comparator
+ private static class StringComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -336,7 +338,7 @@ public abstract class Sort
}
}
- private class IntegerComparator implements Comparator
+ private static class IntegerComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -350,7 +352,7 @@ public abstract class Sort
}
}
- private class FloatComparator implements Comparator
+ private static class FloatComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -364,7 +366,7 @@ public abstract class Sort
}
}
- private class LongComparator implements Comparator
+ private static class LongComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -378,7 +380,7 @@ public abstract class Sort
}
}
- private class BooleanComparator implements Comparator
+ private static class BooleanComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
@@ -392,7 +394,7 @@ public abstract class Sort
}
}
- private class DateComparator implements Comparator
+ private static class DateComparator implements Comparator
{
/**
* @see org.alfresco.web.data.IDataComparator#compare(java.lang.Object, java.lang.Object)
diff --git a/source/java/org/alfresco/web/ui/common/Utils.java b/source/java/org/alfresco/web/ui/common/Utils.java
index 7f7ee84716..182fd34003 100644
--- a/source/java/org/alfresco/web/ui/common/Utils.java
+++ b/source/java/org/alfresco/web/ui/common/Utils.java
@@ -88,6 +88,8 @@ public final class Utils
private static final String DEFAULT_FILE_IMAGE16 = IMAGE_PREFIX16 + "_default" + IMAGE_POSTFIX;
private static final String DEFAULT_FILE_IMAGE32 = IMAGE_PREFIX32 + "_default" + IMAGE_POSTFIX;
+ private static final String AJAX_SCRIPTS_WRITTEN = "_alfAjaxScriptsWritten";
+
private static final Map s_fileExtensionMap = new HashMap(89, 1.0f);
private static Log logger = LogFactory.getLog(Utils.class);
@@ -1238,4 +1240,37 @@ public final class Utils
return description;
}
+
+ /**
+ * Writes the script tags for including AJAX support, ensuring they
+ * only get written once per page render.
+ *
+ * @param context Faces context
+ * @param out The response writer
+ */
+ @SuppressWarnings("unchecked")
+ public static void writeAjaxScripts(FacesContext context, ResponseWriter out)
+ throws IOException
+ {
+ Object present = context.getExternalContext().getRequestMap().get(AJAX_SCRIPTS_WRITTEN);
+
+ if (present == null)
+ {
+ // write out the scripts
+ out.write("\n\n");
+ out.write("\n");
+
+ // write out a global variable to hold the webapp context path
+ out.write("\n");
+
+ // add marker to request
+ context.getExternalContext().getRequestMap().put(AJAX_SCRIPTS_WRITTEN, Boolean.TRUE);
+ }
+ }
}
diff --git a/source/java/org/alfresco/web/ui/common/component/UIImagePicker.java b/source/java/org/alfresco/web/ui/common/component/UIImagePicker.java
index c6864714e6..c26a045415 100644
--- a/source/java/org/alfresco/web/ui/common/component/UIImagePicker.java
+++ b/source/java/org/alfresco/web/ui/common/component/UIImagePicker.java
@@ -19,9 +19,6 @@ package org.alfresco.web.ui.common.component;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* Component to represent a selectable list of images
*
@@ -29,8 +26,6 @@ import org.apache.commons.logging.LogFactory;
*/
public class UIImagePicker extends UIInput
{
- private static Log logger = LogFactory.getLog(UIImagePicker.class);
-
/**
* Default constructor
*/
diff --git a/source/java/org/alfresco/web/ui/common/component/data/UISortLink.java b/source/java/org/alfresco/web/ui/common/component/data/UISortLink.java
index 1f8777cc0c..26befaef28 100644
--- a/source/java/org/alfresco/web/ui/common/component/data/UISortLink.java
+++ b/source/java/org/alfresco/web/ui/common/component/data/UISortLink.java
@@ -65,7 +65,7 @@ public class UISortLink extends UICommand
boolean bPreviouslySorted = false;
boolean descending = true;
String lastSortedColumn = dataContainer.getCurrentSortColumn();
- if (lastSortedColumn == (String)getValue())
+ if (lastSortedColumn != null && lastSortedColumn.equals(getValue()))
{
descending = !dataContainer.isCurrentSortDescending();
bPreviouslySorted = true;
diff --git a/source/java/org/alfresco/web/ui/common/component/description/UIDynamicDescription.java b/source/java/org/alfresco/web/ui/common/component/description/UIDynamicDescription.java
index ad5bdc2f68..cce124be19 100644
--- a/source/java/org/alfresco/web/ui/common/component/description/UIDynamicDescription.java
+++ b/source/java/org/alfresco/web/ui/common/component/description/UIDynamicDescription.java
@@ -28,8 +28,6 @@ import javax.faces.el.ValueBinding;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.SelfRenderingComponent;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* Dynamic description component that switches text based on the events
@@ -39,7 +37,6 @@ import org.apache.commons.logging.LogFactory;
*/
public class UIDynamicDescription extends SelfRenderingComponent
{
- private static Log logger = LogFactory.getLog(UIDynamicDescription.class);
private String selected;
private String functionName;
@@ -141,6 +138,7 @@ public class UIDynamicDescription extends SelfRenderingComponent
/**
* @see javax.faces.component.UIComponent#encodeChildren(javax.faces.context.FacesContext)
*/
+ @SuppressWarnings("unchecked")
public void encodeChildren(FacesContext context) throws IOException
{
if (this.isRendered() == false)
@@ -240,6 +238,7 @@ public class UIDynamicDescription extends SelfRenderingComponent
* @param context The faces context
* @param descriptions The descriptions to render
*/
+ @SuppressWarnings("unchecked")
private void renderDescriptions(FacesContext context, UIDescriptions descriptions)
throws IOException
{
diff --git a/source/java/org/alfresco/web/ui/common/component/evaluator/BaseEvaluator.java b/source/java/org/alfresco/web/ui/common/component/evaluator/BaseEvaluator.java
index 58d38b667a..98c14651cf 100644
--- a/source/java/org/alfresco/web/ui/common/component/evaluator/BaseEvaluator.java
+++ b/source/java/org/alfresco/web/ui/common/component/evaluator/BaseEvaluator.java
@@ -129,7 +129,7 @@ public abstract class BaseEvaluator extends SelfRenderingComponent
public abstract boolean evaluate();
- protected static Logger s_logger = Logger.getLogger(BaseEvaluator.class);
+ protected static final Logger s_logger = Logger.getLogger(BaseEvaluator.class);
/** the value to be evaluated against */
private Object value;
diff --git a/source/java/org/alfresco/web/ui/common/tag/ActionLinkTag.java b/source/java/org/alfresco/web/ui/common/tag/ActionLinkTag.java
index 979872f661..e3931a3a86 100644
--- a/source/java/org/alfresco/web/ui/common/tag/ActionLinkTag.java
+++ b/source/java/org/alfresco/web/ui/common/tag/ActionLinkTag.java
@@ -57,7 +57,7 @@ public class ActionLinkTag extends HtmlComponentTag
setStringProperty(component, "value", this.value);
setStringProperty(component, "target", this.target);
setStringProperty(component, "onclick", this.onclick);
-
+ setBooleanProperty(component, "immediate", this.immediate);
// TODO: Add image width/height properties
}
@@ -77,6 +77,7 @@ public class ActionLinkTag extends HtmlComponentTag
this.href = null;
this.target = null;
this.onclick = null;
+ this.immediate = null;
}
/**
@@ -178,6 +179,11 @@ public class ActionLinkTag extends HtmlComponentTag
{
this.onclick = onclick;
}
+
+ public void setImmediate(String immediate)
+ {
+ this.immediate = immediate;
+ }
/** the target */
private String target;
@@ -208,4 +214,7 @@ public class ActionLinkTag extends HtmlComponentTag
/** the onclick handler */
private String onclick;
+
+ /** the immediate flag */
+ private String immediate;
}
diff --git a/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java b/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java
new file mode 100644
index 0000000000..e894e5bf19
--- /dev/null
+++ b/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java
@@ -0,0 +1,137 @@
+package org.alfresco.web.ui.repo.component;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.ValueBinding;
+
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.repository.Repository;
+import org.alfresco.web.ui.common.Utils;
+import org.alfresco.web.ui.common.component.SelfRenderingComponent;
+
+/**
+ * JSF component that displays information about a node.
+ *
+ * The node to show information on
+ *
+ * @author gavinc
+ */
+public class UINodeInfo extends SelfRenderingComponent
+{
+ protected final static String NODE_INFO_SCRIPTS_WRITTEN = "_alfNodeInfoScripts";
+
+ protected Object value = null;
+
+ // ------------------------------------------------------------------------------
+ // Component Impl
+
+ @Override
+ public String getFamily()
+ {
+ return "org.alfresco.faces.NodeInfo";
+ }
+
+ @Override
+ public void restoreState(FacesContext context, Object state)
+ {
+ Object values[] = (Object[])state;
+ // standard component attributes are restored by the super class
+ super.restoreState(context, values[0]);
+ this.value = values[1];
+ }
+
+ @Override
+ public Object saveState(FacesContext context)
+ {
+ Object values[] = new Object[8];
+ // standard component attributes are saved by the super class
+ values[0] = super.saveState(context);
+ values[1] = this.value;
+ return values;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void encodeBegin(FacesContext context) throws IOException
+ {
+ if (!isRendered()) return;
+
+ // if AJAX is disabled don't render anything
+ if (Application.getClientConfig(context).isAjaxEnabled())
+ {
+ ResponseWriter out = context.getResponseWriter();
+
+ // output the scripts required by the component (checks are
+ // made to make sure the scripts are only written once)
+ Utils.writeAjaxScripts(context, out);
+
+ // write out the JavaScript specific to the NodeInfo component,
+ // again, make sure it's only done once
+ Object present = context.getExternalContext().getRequestMap().
+ get(NODE_INFO_SCRIPTS_WRITTEN);
+ if (present == null)
+ {
+ out.write("\n");
+
+ context.getExternalContext().getRequestMap().put(
+ NODE_INFO_SCRIPTS_WRITTEN, Boolean.TRUE);
+ }
+
+ // wrap the child components in a that has the onmouseover
+ // event which kicks off the request for node information
+ String id = (String)this.getValue();
+ out.write("");
+ }
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context) throws IOException
+ {
+ if (!isRendered()) return;
+
+ // if AJAX is disabled don't render anything
+ if (Application.getClientConfig(context).isAjaxEnabled())
+ {
+ context.getResponseWriter().write("");
+ }
+ }
+
+ // ------------------------------------------------------------------------------
+ // Strongly typed component property accessors
+
+ /**
+ * Get the value - the value is used in a equals() match against the current value in the
+ * parent ModeList component to set the selected item.
+ *
+ * @return the value
+ */
+ public Object getValue()
+ {
+ ValueBinding vb = getValueBinding("value");
+ if (vb != null)
+ {
+ this.value = vb.getValue(getFacesContext());
+ }
+
+ return this.value;
+ }
+
+ /**
+ * Set the value - the value is used in a equals() match against the current value in the
+ * parent ModeList component to set the selected item.
+ *
+ * @param value the value
+ */
+ public void setValue(Object value)
+ {
+ this.value = value;
+ }
+}
diff --git a/source/java/org/alfresco/web/ui/repo/component/property/UIPropertySheet.java b/source/java/org/alfresco/web/ui/repo/component/property/UIPropertySheet.java
index cdd6cf3218..d7d4b75bef 100644
--- a/source/java/org/alfresco/web/ui/repo/component/property/UIPropertySheet.java
+++ b/source/java/org/alfresco/web/ui/repo/component/property/UIPropertySheet.java
@@ -739,37 +739,40 @@ public class UIPropertySheet extends UIPanel implements NamingContainer
}
// now setup the common stuff across all component types
- FacesHelper.setupComponentId(context, propSheetItem, id);
- propSheetItem.setName(item.getName());
- propSheetItem.setConverter(item.getConverter());
- propSheetItem.setComponentGenerator(item.getComponentGenerator());
- propSheetItem.setIgnoreIfMissing(item.getIgnoreIfMissing());
-
- String displayLabel = item.getDisplayLabel();
- if (item.getDisplayLabelId() != null)
+ if (propSheetItem != null)
{
- String label = Application.getMessage(context, item.getDisplayLabelId());
- if (label != null)
+ FacesHelper.setupComponentId(context, propSheetItem, id);
+ propSheetItem.setName(item.getName());
+ propSheetItem.setConverter(item.getConverter());
+ propSheetItem.setComponentGenerator(item.getComponentGenerator());
+ propSheetItem.setIgnoreIfMissing(item.getIgnoreIfMissing());
+
+ String displayLabel = item.getDisplayLabel();
+ if (item.getDisplayLabelId() != null)
{
- displayLabel = label;
+ String label = Application.getMessage(context, item.getDisplayLabelId());
+ if (label != null)
+ {
+ displayLabel = label;
+ }
}
+ propSheetItem.setDisplayLabel(displayLabel);
+
+ // if this property sheet is set as read only or the config says the property
+ // should be read only set it as such
+ if (isReadOnly() || item.isReadOnly())
+ {
+ propSheetItem.setReadOnly(true);
+ }
+
+ this.getChildren().add(propSheetItem);
+
+ if (logger.isDebugEnabled())
+ logger.debug("Created property sheet item component " + propSheetItem + "(" +
+ propSheetItem.getClientId(context) +
+ ") for '" + item.getName() +
+ "' and added it to property sheet " + this);
}
- propSheetItem.setDisplayLabel(displayLabel);
-
- // if this property sheet is set as read only or the config says the property
- // should be read only set it as such
- if (isReadOnly() || item.isReadOnly())
- {
- propSheetItem.setReadOnly(true);
- }
-
- this.getChildren().add(propSheetItem);
-
- if (logger.isDebugEnabled())
- logger.debug("Created property sheet item component " + propSheetItem + "(" +
- propSheetItem.getClientId(context) +
- ") for '" + item.getName() +
- "' and added it to property sheet " + this);
}
}
diff --git a/source/java/org/alfresco/web/ui/repo/component/template/DefaultModelHelper.java b/source/java/org/alfresco/web/ui/repo/component/template/DefaultModelHelper.java
index 22721ceb8b..f7676bbcc7 100644
--- a/source/java/org/alfresco/web/ui/repo/component/template/DefaultModelHelper.java
+++ b/source/java/org/alfresco/web/ui/repo/component/template/DefaultModelHelper.java
@@ -58,7 +58,7 @@ public class DefaultModelHelper
*
* @return Map containing the default model.
*/
- public static Map buildDefaultModel(ServiceRegistry services, User user)
+ public static Map buildDefaultModel(ServiceRegistry services, User user, NodeRef template)
{
if (services == null)
{
@@ -85,6 +85,12 @@ public class DefaultModelHelper
// supply the current user Node as "person"
root.put("person", new TemplateNode(user.getPerson(), services, imageResolver));
+ // add the template itself as "template" if it comes from content on a node
+ if (template != null)
+ {
+ root.put("template", new TemplateNode(template, services, imageResolver));
+ }
+
// current date/time is useful to have and isn't supplied by FreeMarker by default
root.put("date", new Date());
@@ -97,7 +103,7 @@ public class DefaultModelHelper
}
/** Template Image resolver helper */
- public static TemplateImageResolver imageResolver = new TemplateImageResolver()
+ public static final TemplateImageResolver imageResolver = new TemplateImageResolver()
{
public String resolveImagePathForName(String filename, boolean small)
{
diff --git a/source/java/org/alfresco/web/ui/repo/component/template/UITemplate.java b/source/java/org/alfresco/web/ui/repo/component/template/UITemplate.java
index fc429f431d..0c362c3793 100644
--- a/source/java/org/alfresco/web/ui/repo/component/template/UITemplate.java
+++ b/source/java/org/alfresco/web/ui/repo/component/template/UITemplate.java
@@ -17,21 +17,16 @@
package org.alfresco.web.ui.repo.component.template;
import java.io.IOException;
-import java.util.Date;
-import java.util.HashMap;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
-import org.alfresco.repo.template.DateCompareMethod;
-import org.alfresco.repo.template.HasAspectMethod;
-import org.alfresco.repo.template.I18NMessageMethod;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.repository.TemplateException;
import org.alfresco.service.cmr.repository.TemplateImageResolver;
-import org.alfresco.service.cmr.repository.TemplateNode;
import org.alfresco.service.cmr.repository.TemplateService;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
@@ -108,9 +103,6 @@ public class UITemplate extends SelfRenderingComponent
return;
}
- // get the data model to use - building default if required
- Object model = getModel();
-
// get the template to process
String template = getTemplate();
if (template != null && template.length() != 0)
@@ -125,6 +117,9 @@ public class UITemplate extends SelfRenderingComponent
startTime = System.currentTimeMillis();
}
+ // get the data model to use - building default if required
+ Object model = getModel();
+
// process the template against the model
try
{
@@ -195,7 +190,16 @@ public class UITemplate extends SelfRenderingComponent
FacesContext fc = FacesContext.getCurrentInstance();
ServiceRegistry services = Repository.getServiceRegistry(fc);
User user = Application.getCurrentUser(fc);
- Map root = DefaultModelHelper.buildDefaultModel(services, user);
+
+ // add the template itself to the model
+ NodeRef templateRef = null;
+ if (getTemplate().indexOf(StoreRef.URI_FILLER) != -1)
+ {
+ // found a noderef template
+ templateRef = new NodeRef(getTemplate());
+ }
+
+ Map root = DefaultModelHelper.buildDefaultModel(services, user, templateRef);
// merge models
if (model instanceof Map)
diff --git a/source/java/org/alfresco/web/ui/repo/renderer/NodeDescendantsLinkRenderer.java b/source/java/org/alfresco/web/ui/repo/renderer/NodeDescendantsLinkRenderer.java
index ce762fcf7e..f2d2ee56dd 100644
--- a/source/java/org/alfresco/web/ui/repo/renderer/NodeDescendantsLinkRenderer.java
+++ b/source/java/org/alfresco/web/ui/repo/renderer/NodeDescendantsLinkRenderer.java
@@ -67,7 +67,6 @@ public class NodeDescendantsLinkRenderer extends BaseRenderer
int separatorIndex = value.indexOf(NamingContainer.SEPARATOR_CHAR);
String selectedNodeId = value.substring(0, separatorIndex);
boolean isParent = Boolean.parseBoolean(value.substring(separatorIndex + 1));
- NodeService service = getNodeService(context);
NodeRef ref = new NodeRef(Repository.getStoreRef(), selectedNodeId);
UINodeDescendants.NodeSelectedEvent event = new UINodeDescendants.NodeSelectedEvent(component, ref, isParent);
diff --git a/source/java/org/alfresco/web/ui/repo/tag/NodeInfoTag.java b/source/java/org/alfresco/web/ui/repo/tag/NodeInfoTag.java
new file mode 100644
index 0000000000..5796edbe0a
--- /dev/null
+++ b/source/java/org/alfresco/web/ui/repo/tag/NodeInfoTag.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.ui.repo.tag;
+
+import javax.faces.component.UIComponent;
+
+import org.alfresco.web.ui.common.tag.HtmlComponentTag;
+
+/**
+ * Tag class for the UINodeInfo component
+ *
+ * @author gavinc
+ */
+public class NodeInfoTag extends HtmlComponentTag
+{
+ private String value;
+
+ /**
+ * @see javax.faces.webapp.UIComponentTag#getComponentType()
+ */
+ public String getComponentType()
+ {
+ return "org.alfresco.faces.NodeInfo";
+ }
+
+ /**
+ * @see javax.faces.webapp.UIComponentTag#getRendererType()
+ */
+ public String getRendererType()
+ {
+ return null;
+ }
+
+ /**
+ * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
+ */
+ protected void setProperties(UIComponent component)
+ {
+ super.setProperties(component);
+
+ setStringBindingProperty(component, "value", this.value);
+ }
+
+ /**
+ * @see org.alfresco.web.ui.common.tag.HtmlComponentTag#release()
+ */
+ public void release()
+ {
+ super.release();
+
+ this.value = null;
+ }
+
+ /**
+ * Set the value
+ *
+ * @param value the value
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
diff --git a/source/web/WEB-INF/alfresco.tld b/source/web/WEB-INF/alfresco.tld
index 6d3d9e2a23..cf592f757b 100644
--- a/source/web/WEB-INF/alfresco.tld
+++ b/source/web/WEB-INF/alfresco.tld
@@ -657,6 +657,12 @@
false
true
+
+
+ immediate
+ false
+ true
+
diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml
index d6c63c3fff..296811df9b 100644
--- a/source/web/WEB-INF/faces-config-beans.xml
+++ b/source/web/WEB-INF/faces-config-beans.xml
@@ -179,6 +179,43 @@
+
+
+ The bean that backs up the Delete Space Dialog
+
+ DeleteSpaceDialog
+ org.alfresco.web.bean.spaces.DeleteSpaceDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
The bean that holds a users Clipboard state.
@@ -495,6 +532,43 @@
+
+
+ The bean that backs up the Delete Content Dialog
+
+ DeleteContentDialog
+ org.alfresco.web.bean.content.DeleteContentDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
The bean that backs up the Link Properties Dialog
@@ -883,6 +957,10 @@
browseBean
#{BrowseBean}
+
+ navigator
+ #{NavigationBean}
+
nodeService
#{NodeService}
@@ -1398,6 +1476,154 @@
+
+
+ The bean that backs up the Delete Forum Space Dialog
+
+ DeleteForumsDialog
+ org.alfresco.web.bean.forums.DeleteForumsDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
+
+
+ The bean that backs up the Delete Forum Dialog
+
+ DeleteForumDialog
+ org.alfresco.web.bean.forums.DeleteForumDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
+
+
+ The bean that backs up the Delete Topic Dialog
+
+ DeleteTopicDialog
+ org.alfresco.web.bean.forums.DeleteTopicDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
+
+
+ The bean that backs up the Delete Post Dialog
+
+ DeletePostDialog
+ org.alfresco.web.bean.forums.DeletePostDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ searchService
+ #{SearchService}
+
+
+ navigator
+ #{NavigationBean}
+
+
+ browseBean
+ #{BrowseBean}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ namespaceService
+ #{NamespaceService}
+
+
+
The bean that holds state for the Manage Deleted Items screen.
@@ -1433,6 +1659,30 @@
session
+
+ Bean that manages the Dashboard framework
+ DashboardManager
+ org.alfresco.web.bean.dashboard.DashboardManager
+ session
+
+
+
+
+ The bean that backs up the Dashboard Config Wizard
+
+ DashboardWizard
+ org.alfresco.web.bean.dashboard.DashboardWizard
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ dashboardManager
+ #{DashboardManager}
+
+
+
@@ -1525,4 +1775,23 @@
request
+
+
+
+
+ Bean that returns information on a node
+
+ NodeInfoBean
+ org.alfresco.web.bean.ajax.NodeInfoBean
+ request
+
+ nodeService
+ #{NodeService}
+
+
+ contentService
+ #{ContentService}
+
+
+
diff --git a/source/web/WEB-INF/faces-config-enterprise.xml b/source/web/WEB-INF/faces-config-enterprise.xml
new file mode 100644
index 0000000000..1c89638123
--- /dev/null
+++ b/source/web/WEB-INF/faces-config-enterprise.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+ The bean that holds state for the License Manager.
+
+ LicenseBean
+ org.alfresco.web.bean.LicenseBean
+ session
+
+ descriptorService
+ #{DescriptorService}
+
+
+
+
+
+
+
diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml
index e9dcf7a6c3..5ca6e3a9c2 100644
--- a/source/web/WEB-INF/faces-config-navigation.xml
+++ b/source/web/WEB-INF/faces-config-navigation.xml
@@ -32,6 +32,10 @@
browse
/jsp/browse/browse.jsp
+
+ myalfresco
+ /jsp/dashboards/container.jsp
+
about
/jsp/dialog/about.jsp
@@ -77,26 +81,22 @@
-
+
/jsp/*
-
+
adminConsole
/jsp/admin/admin-console.jsp
+
+ userConsole
+ /jsp/users/user-console.jsp
+
/jsp/browse/browse.jsp
-
- deleteSpace
- /jsp/dialog/delete-space.jsp
-
-
- deleteFile
- /jsp/dialog/delete-file.jsp
-
addContent
/jsp/content/add-content-dialog.jsp
@@ -259,10 +259,6 @@
manageRules
/jsp/dialog/rules.jsp
-
- deleteSpace
- /jsp/dialog/delete-space.jsp
-
import
/jsp/dialog/import.jsp
@@ -283,6 +279,10 @@
showForum
/jsp/forums/forum.jsp
+
+ editCategories
+ /jsp/dialog/edit-space-category.jsp
+
@@ -303,10 +303,6 @@
updateFile
/jsp/dialog/update-file.jsp
-
- deleteFile
- /jsp/dialog/delete-file.jsp
-
editFile
/jsp/dialog/edit-file.jsp
@@ -327,10 +323,6 @@
editCategories
/jsp/dialog/edit-category.jsp
-
- createAction
- /jsp/wizard/create-action/action.jsp
-
previewContent
/jsp/dialog/preview-file.jsp
@@ -373,6 +365,18 @@
+
+ /jsp/dialog/edit-space-category.jsp
+
+ cancel
+ /jsp/dialog/space-details.jsp
+
+
+ finish
+ /jsp/dialog/space-details.jsp
+
+
+
/jsp/dialog/rules.jsp
@@ -408,10 +412,6 @@
manageContentUsers
/jsp/roles/manage-content-users.jsp
-
- deleteFile
- /jsp/dialog/delete-file.jsp
-
@@ -425,10 +425,6 @@
manageContentUsers
/jsp/roles/manage-content-users.jsp
-
- deleteFile
- /jsp/dialog/delete-file.jsp
-
@@ -600,6 +596,15 @@
+
+
+ /jsp/users/user-console.jsp
+
+ changePassword
+ /jsp/users/change-my-password.jsp
+
+
+
/jsp/wizard/new-user/*
@@ -790,24 +795,6 @@
showTopicDetails
/jsp/forums/topic-details.jsp
-
-
- deleteForums
- /jsp/forums/delete-forums.jsp
-
-
- deleteForum
- /jsp/forums/delete-forum.jsp
-
-
- deleteTopic
- /jsp/forums/delete-topic.jsp
-
-
- deletePost
- /jsp/forums/delete-post.jsp
-
-
manageInvitedUsers
/jsp/roles/manage-invited-users.jsp
@@ -822,34 +809,6 @@
-
- /jsp/forums/delete-forums.jsp
-
- forumsDeleted
- /jsp/forums/forums.jsp
-
-
- browse
- /jsp/browse/browse.jsp
-
-
-
-
- /jsp/forums/delete-forum.jsp
-
- forumDeleted
- /jsp/forums/forums.jsp
-
-
-
-
- /jsp/forums/delete-topic.jsp
-
- topicDeleted
- /jsp/forums/forum.jsp
-
-
-
/jsp/trashcan/*
@@ -887,4 +846,21 @@
+
+
+ /jsp/dialog/container.jsp
+
+ forumsDeleted
+ /jsp/forums/forums.jsp
+
+
+ forumDeleted
+ /jsp/forums/forums.jsp
+
+
+ topicDeleted
+ /jsp/forums/forum.jsp
+
+
+
diff --git a/source/web/WEB-INF/faces-config-repo.xml b/source/web/WEB-INF/faces-config-repo.xml
index 1fd9dece11..e4d3bd38ab 100644
--- a/source/web/WEB-INF/faces-config-repo.xml
+++ b/source/web/WEB-INF/faces-config-repo.xml
@@ -124,6 +124,11 @@
org.alfresco.web.ui.repo.component.evaluator.ActionInstanceEvaluator
+
+ org.alfresco.faces.NodeInfo
+ org.alfresco.web.ui.repo.component.UINodeInfo
+
+
diff --git a/source/web/WEB-INF/repo.tld b/source/web/WEB-INF/repo.tld
index ac35d51978..02c03607b6 100644
--- a/source/web/WEB-INF/repo.tld
+++ b/source/web/WEB-INF/repo.tld
@@ -1514,4 +1514,28 @@
+
+ nodeInfo
+ org.alfresco.web.ui.repo.tag.NodeInfoTag
+ JSP
+
+
+ The nodeInfo component wraps another component, typically an
+ action link, to provide a floating pop up panel containing
+ information on a particular node.
+
+
+
+ id
+ false
+ true
+
+
+
+ value
+ true
+ true
+
+
+
diff --git a/source/web/WEB-INF/web.xml b/source/web/WEB-INF/web.xml
index 0f53fbdbb6..45e03798a7 100644
--- a/source/web/WEB-INF/web.xml
+++ b/source/web/WEB-INF/web.xml
@@ -16,7 +16,7 @@
javax.faces.CONFIG_FILES
- /WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml
+ /WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml,/WEB-INF/faces-config-enterprise.xml
@@ -155,6 +155,11 @@
org.alfresco.web.app.servlet.CommandServlet
+
+ ajaxServlet
+ org.alfresco.web.app.servlet.ajax.AjaxServlet
+
+
axis
org.apache.axis.transport.http.AxisServlet
@@ -205,6 +210,11 @@
/command/*
+
+ ajaxServlet
+ /ajax/*
+
+
axis
/api/*
diff --git a/source/web/css/main.css b/source/web/css/main.css
index b9ae62af06..7f2e713ba6 100644
--- a/source/web/css/main.css
+++ b/source/web/css/main.css
@@ -488,3 +488,34 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl
{
vertical-align: top;
}
+
+.alignMiddle
+{
+ vertical-align: middle;
+}
+
+.tableThirdWidth
+{
+ width: 33%;
+ vertical-align: top;
+}
+
+.tableNarrowWidth
+{
+ width: 30%;
+ vertical-align: top;
+}
+
+.tableWideWidth
+{
+ width: 70%;
+ vertical-align: top;
+}
+
+.summaryPopupPanel
+{
+ background-color: #e9f0f4;
+ border: 1px solid #999999;
+ padding: 4px;
+ -moz-border-radius: 4px;
+}
diff --git a/source/web/images/filetypes/odf.gif b/source/web/images/filetypes/odf.gif
new file mode 100644
index 0000000000..d5bc5e0083
Binary files /dev/null and b/source/web/images/filetypes/odf.gif differ
diff --git a/source/web/images/filetypes/odg.gif b/source/web/images/filetypes/odg.gif
new file mode 100644
index 0000000000..a63083ed2c
Binary files /dev/null and b/source/web/images/filetypes/odg.gif differ
diff --git a/source/web/images/filetypes/odp.gif b/source/web/images/filetypes/odp.gif
new file mode 100644
index 0000000000..a8bceca5ae
Binary files /dev/null and b/source/web/images/filetypes/odp.gif differ
diff --git a/source/web/images/filetypes/ods.gif b/source/web/images/filetypes/ods.gif
new file mode 100644
index 0000000000..0758aa2aaf
Binary files /dev/null and b/source/web/images/filetypes/ods.gif differ
diff --git a/source/web/images/filetypes/odt.gif b/source/web/images/filetypes/odt.gif
index 0371d01493..e89833a22d 100644
Binary files a/source/web/images/filetypes/odt.gif and b/source/web/images/filetypes/odt.gif differ
diff --git a/source/web/images/filetypes32/odf.gif b/source/web/images/filetypes32/odf.gif
new file mode 100644
index 0000000000..8f052c52f8
Binary files /dev/null and b/source/web/images/filetypes32/odf.gif differ
diff --git a/source/web/images/filetypes32/odg.gif b/source/web/images/filetypes32/odg.gif
new file mode 100644
index 0000000000..f4dbaf33ec
Binary files /dev/null and b/source/web/images/filetypes32/odg.gif differ
diff --git a/source/web/images/filetypes32/odp.gif b/source/web/images/filetypes32/odp.gif
new file mode 100644
index 0000000000..9ceb1260d9
Binary files /dev/null and b/source/web/images/filetypes32/odp.gif differ
diff --git a/source/web/images/filetypes32/ods.gif b/source/web/images/filetypes32/ods.gif
new file mode 100644
index 0000000000..0e3c81775c
Binary files /dev/null and b/source/web/images/filetypes32/ods.gif differ
diff --git a/source/web/images/filetypes32/odt.gif b/source/web/images/filetypes32/odt.gif
index 34e0bea33d..b920c40f0b 100644
Binary files a/source/web/images/filetypes32/odt.gif and b/source/web/images/filetypes32/odt.gif differ
diff --git a/source/web/images/icons/configure.gif b/source/web/images/icons/configure.gif
new file mode 100644
index 0000000000..374f787193
Binary files /dev/null and b/source/web/images/icons/configure.gif differ
diff --git a/source/web/images/icons/configure_dashboard.gif b/source/web/images/icons/configure_dashboard.gif
new file mode 100644
index 0000000000..d79e1a233b
Binary files /dev/null and b/source/web/images/icons/configure_dashboard.gif differ
diff --git a/source/web/images/icons/configure_dashboard_large.gif b/source/web/images/icons/configure_dashboard_large.gif
new file mode 100644
index 0000000000..336f7967dd
Binary files /dev/null and b/source/web/images/icons/configure_dashboard_large.gif differ
diff --git a/source/web/images/icons/dashboard.gif b/source/web/images/icons/dashboard.gif
new file mode 100644
index 0000000000..d79e1a233b
Binary files /dev/null and b/source/web/images/icons/dashboard.gif differ
diff --git a/source/web/images/icons/dashboard_large.gif b/source/web/images/icons/dashboard_large.gif
new file mode 100644
index 0000000000..336f7967dd
Binary files /dev/null and b/source/web/images/icons/dashboard_large.gif differ
diff --git a/source/web/images/icons/layout_narrow_left_2column.gif b/source/web/images/icons/layout_narrow_left_2column.gif
new file mode 100644
index 0000000000..37ca9d0841
Binary files /dev/null and b/source/web/images/icons/layout_narrow_left_2column.gif differ
diff --git a/source/web/images/icons/layout_narrow_right_2column.gif b/source/web/images/icons/layout_narrow_right_2column.gif
new file mode 100644
index 0000000000..b129f738bc
Binary files /dev/null and b/source/web/images/icons/layout_narrow_right_2column.gif differ
diff --git a/source/web/images/icons/layout_single_column.gif b/source/web/images/icons/layout_single_column.gif
new file mode 100644
index 0000000000..b02e7269e2
Binary files /dev/null and b/source/web/images/icons/layout_single_column.gif differ
diff --git a/source/web/images/icons/layout_three_column.gif b/source/web/images/icons/layout_three_column.gif
new file mode 100644
index 0000000000..7204f5a5fc
Binary files /dev/null and b/source/web/images/icons/layout_three_column.gif differ
diff --git a/source/web/images/icons/user_console.gif b/source/web/images/icons/user_console.gif
new file mode 100644
index 0000000000..39a7969d3c
Binary files /dev/null and b/source/web/images/icons/user_console.gif differ
diff --git a/source/web/images/icons/user_console_large.gif b/source/web/images/icons/user_console_large.gif
new file mode 100644
index 0000000000..0f0cd28945
Binary files /dev/null and b/source/web/images/icons/user_console_large.gif differ
diff --git a/source/web/images/logo/jooreports.png b/source/web/images/logo/jooreports.png
new file mode 100644
index 0000000000..1335ee7bc3
Binary files /dev/null and b/source/web/images/logo/jooreports.png differ
diff --git a/source/web/jsp/admin/admin-console.jsp b/source/web/jsp/admin/admin-console.jsp
index 963009709d..1afb36f029 100644
--- a/source/web/jsp/admin/admin-console.jsp
+++ b/source/web/jsp/admin/admin-console.jsp
@@ -98,13 +98,13 @@
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "ballongrey", "#EEEEEE"); %>
- |
+ |
- |
+ |
- |
+ |
@@ -121,10 +121,10 @@
|
- |
+ |
- |
+ |
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
@@ -136,7 +136,7 @@
diff --git a/source/web/jsp/browse/browse.jsp b/source/web/jsp/browse/browse.jsp
index dd66b092c5..2bc57ab8d3 100644
--- a/source/web/jsp/browse/browse.jsp
+++ b/source/web/jsp/browse/browse.jsp
@@ -137,11 +137,6 @@
<%-- More actions menu --%>
@@ -268,9 +263,11 @@
-
-
-
+
+
+
+
+
<%-- Description column for all view modes --%>
diff --git a/source/web/jsp/categories/categories.jsp b/source/web/jsp/categories/categories.jsp
index 952eb2df95..c6d550745b 100644
--- a/source/web/jsp/categories/categories.jsp
+++ b/source/web/jsp/categories/categories.jsp
@@ -189,7 +189,7 @@
diff --git a/source/web/jsp/dashboard.jsp b/source/web/jsp/dashboard.jsp
deleted file mode 100644
index 190c6fcef7..0000000000
--- a/source/web/jsp/dashboard.jsp
+++ /dev/null
@@ -1,169 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Main --%>
-
- |
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/dialog/delete-file.jsp b/source/web/jsp/dashboards/container.jsp
similarity index 60%
rename from source/web/jsp/dialog/delete-file.jsp
rename to source/web/jsp/dashboards/container.jsp
index 228626540a..f5b8745a55 100644
--- a/source/web/jsp/dialog/delete-file.jsp
+++ b/source/web/jsp/dashboards/container.jsp
@@ -1,157 +1,126 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
-
-
-
-
- |
-
-
-
- <%-- Error Messages --%>
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
+<%--
+ Copyright (C) 2005 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
+<%@ page isELIgnored="false" %>
+<%@ page import="org.alfresco.web.app.Application" %>
+<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
+
+
+
+
+
+ <%-- load a bundle of properties with I18N strings --%>
+
+
+
+
+ <%-- Main outer table --%>
+
+
+ <%-- Title bar --%>
+
+
+ <%@ include file="../parts/titlebar.jsp" %>
+ |
+
+
+ <%-- Main area --%>
+
+ <%-- Shelf --%>
+
+ <%@ include file="../parts/shelf.jsp" %>
+ |
+
+ <%-- Work Area --%>
+
+
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/web/jsp/dashboards/dashlets/calculator.jsp b/source/web/jsp/dashboards/dashlets/calculator.jsp
new file mode 100644
index 0000000000..9a2b566850
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/calculator.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dashlets/calculator.png b/source/web/jsp/dashboards/dashlets/calculator.png
new file mode 100644
index 0000000000..4cc80aeba9
Binary files /dev/null and b/source/web/jsp/dashboards/dashlets/calculator.png differ
diff --git a/source/web/jsp/dashboards/dashlets/calendar.jsp b/source/web/jsp/dashboards/dashlets/calendar.jsp
new file mode 100644
index 0000000000..90ebf9ae5a
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/calendar.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dashlets/calendar.png b/source/web/jsp/dashboards/dashlets/calendar.png
new file mode 100644
index 0000000000..7ce352135e
Binary files /dev/null and b/source/web/jsp/dashboards/dashlets/calendar.png differ
diff --git a/source/web/jsp/dashboards/dashlets/content-checkedout.jsp b/source/web/jsp/dashboards/dashlets/content-checkedout.jsp
new file mode 100644
index 0000000000..a70b1fb3e0
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/content-checkedout.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dashlets/content-checkedout.png b/source/web/jsp/dashboards/dashlets/content-checkedout.png
new file mode 100644
index 0000000000..8063f8b4a5
Binary files /dev/null and b/source/web/jsp/dashboards/dashlets/content-checkedout.png differ
diff --git a/source/web/jsp/dashboards/dashlets/getting-started.jsp b/source/web/jsp/dashboards/dashlets/getting-started.jsp
new file mode 100644
index 0000000000..f7dd0ffa14
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/getting-started.jsp
@@ -0,0 +1,57 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
+
+
+<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellow", "#ffffcc"); %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellow"); %>
+
diff --git a/source/web/jsp/dashboards/dashlets/my-completed-tasks.png b/source/web/jsp/dashboards/dashlets/my-completed-tasks.png
new file mode 100644
index 0000000000..f53c1bbd04
Binary files /dev/null and b/source/web/jsp/dashboards/dashlets/my-completed-tasks.png differ
diff --git a/source/web/jsp/dashboards/dashlets/my-docs.jsp b/source/web/jsp/dashboards/dashlets/my-docs.jsp
new file mode 100644
index 0000000000..e79ba1c20a
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/my-docs.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dashlets/my-tasks-todo.png b/source/web/jsp/dashboards/dashlets/my-tasks-todo.png
new file mode 100644
index 0000000000..e34ceee2aa
Binary files /dev/null and b/source/web/jsp/dashboards/dashlets/my-tasks-todo.png differ
diff --git a/source/web/jsp/dashboards/dashlets/tasklist-completed.jsp b/source/web/jsp/dashboards/dashlets/tasklist-completed.jsp
new file mode 100644
index 0000000000..8ce35a5ae2
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/tasklist-completed.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dashlets/tasklist-todo.jsp b/source/web/jsp/dashboards/dashlets/tasklist-todo.jsp
new file mode 100644
index 0000000000..22d7f0c020
--- /dev/null
+++ b/source/web/jsp/dashboards/dashlets/tasklist-todo.jsp
@@ -0,0 +1,22 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+
diff --git a/source/web/jsp/dashboards/dummy.jsp b/source/web/jsp/dashboards/dummy.jsp
new file mode 100644
index 0000000000..2893239647
--- /dev/null
+++ b/source/web/jsp/dashboards/dummy.jsp
@@ -0,0 +1,16 @@
+<%--
+ Copyright (C) 2005 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
\ No newline at end of file
diff --git a/source/web/jsp/dashboards/layouts/narrow-left-2column.jsp b/source/web/jsp/dashboards/layouts/narrow-left-2column.jsp
new file mode 100644
index 0000000000..37a2f2f8c7
--- /dev/null
+++ b/source/web/jsp/dashboards/layouts/narrow-left-2column.jsp
@@ -0,0 +1,84 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.app.Application" %>
+
+
+ <% Application.getDashboardManager().initDashboard(); %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dashboards/layouts/narrow-right-2column.jsp b/source/web/jsp/dashboards/layouts/narrow-right-2column.jsp
new file mode 100644
index 0000000000..d56814c8ca
--- /dev/null
+++ b/source/web/jsp/dashboards/layouts/narrow-right-2column.jsp
@@ -0,0 +1,84 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.app.Application" %>
+
+
+ <% Application.getDashboardManager().initDashboard(); %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dashboards/layouts/single-column.jsp b/source/web/jsp/dashboards/layouts/single-column.jsp
new file mode 100644
index 0000000000..c9c597bdab
--- /dev/null
+++ b/source/web/jsp/dashboards/layouts/single-column.jsp
@@ -0,0 +1,56 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.app.Application" %>
+
+<% Application.getDashboardManager().initDashboard(); %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dashboards/layouts/three-column.jsp b/source/web/jsp/dashboards/layouts/three-column.jsp
new file mode 100644
index 0000000000..586705cbe0
--- /dev/null
+++ b/source/web/jsp/dashboards/layouts/three-column.jsp
@@ -0,0 +1,113 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.app.Application" %>
+
+
+ <% Application.getDashboardManager().initDashboard(); %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dashboards/wizard/columns.jsp b/source/web/jsp/dashboards/wizard/columns.jsp
new file mode 100644
index 0000000000..eb34724772
--- /dev/null
+++ b/source/web/jsp/dashboards/wizard/columns.jsp
@@ -0,0 +1,76 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- note this component ID is referenced in DashboardWizard --%>
+
+
+
+
+
+
+
+
+
+
+ <%-- note this component ID is referenced in DashboardWizard --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dashboards/wizard/layout.jsp b/source/web/jsp/dashboards/wizard/layout.jsp
new file mode 100644
index 0000000000..1433a08f43
--- /dev/null
+++ b/source/web/jsp/dashboards/wizard/layout.jsp
@@ -0,0 +1,56 @@
+<%--
+ Copyright (C) 2006 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
+
+
+
+
+
+
+
+
+
+
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
+
+
+
+
diff --git a/source/web/jsp/dialog/about.jsp b/source/web/jsp/dialog/about.jsp
index 45bccbc610..34669e0241 100644
--- a/source/web/jsp/dialog/about.jsp
+++ b/source/web/jsp/dialog/about.jsp
@@ -158,6 +158,9 @@
+
+
+
diff --git a/source/web/jsp/dialog/delete-space.jsp b/source/web/jsp/dialog/delete-space.jsp
deleted file mode 100644
index 2126763bb7..0000000000
--- a/source/web/jsp/dialog/delete-space.jsp
+++ /dev/null
@@ -1,173 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
- |
-
-
-
-
-
-
-
- |
-
-
-
- <%-- Error Messages --%>
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
diff --git a/source/web/jsp/dialog/delete.jsp b/source/web/jsp/dialog/delete.jsp
new file mode 100644
index 0000000000..d14067c888
--- /dev/null
+++ b/source/web/jsp/dialog/delete.jsp
@@ -0,0 +1,26 @@
+<%--
+ Copyright (C) 2005 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
+<%@ page isELIgnored="false" %>
+
+
\ No newline at end of file
diff --git a/source/web/jsp/wizard/create-content/create-text.jsp b/source/web/jsp/dialog/edit-space-category.jsp
similarity index 70%
rename from source/web/jsp/wizard/create-content/create-text.jsp
rename to source/web/jsp/dialog/edit-space-category.jsp
index 564def1d9e..f53b648b2b 100644
--- a/source/web/jsp/wizard/create-content/create-text.jsp
+++ b/source/web/jsp/dialog/edit-space-category.jsp
@@ -1,176 +1,169 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- Error Messages --%>
-
- |
-
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
+<%--
+ Copyright (C) 2005 Alfresco, Inc.
+
+ Licensed under the Mozilla Public License version 1.1
+ with a permitted attribution clause. You may obtain a
+ copy of the License at
+
+ http://www.alfresco.org/legal/license.txt
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied. See the License for the specific
+ language governing permissions and limitations under the
+ License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
+<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
+
+<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
+<%@ page isELIgnored="false" %>
+<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
+
+
+
+
+
+ <%-- load a bundle of properties with I18N strings --%>
+
+
+
+
+ <%-- Main outer table --%>
+
+
+ <%-- Title bar --%>
+
+
+ <%@ include file="../parts/titlebar.jsp" %>
+ |
+
+
+ <%-- Main area --%>
+
+ <%-- Shelf --%>
+
+ <%@ include file="../parts/shelf.jsp" %>
+ |
+
+ <%-- Work Area --%>
+
+
+ <%-- Breadcrumb --%>
+ <%@ include file="../parts/breadcrumb.jsp" %>
+
+ <%-- Status and Actions --%>
+
+ |
+
+
+ <%-- Status and Actions inner contents table --%>
+ <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
+
+
+ |
+ |
+
+
+ <%-- separator row with gradient shadow --%>
+
+ %>/images/parts/statuspanel_7.gif) |
+ |
+ %>/images/parts/statuspanel_9.gif) |
+
+
+ <%-- Details --%>
+
+ |
+
+
+
+
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
+
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
+ |
+
+
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
+
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
+ |
+
+
+ |
+ |
+
+
+ <%-- Error Messages --%>
+
+ |
+
+ <%-- messages tag to show messages not handled by other specific message tags --%>
+
+ |
+ |
+
+
+ <%-- separator row with bottom panel graphics --%>
+
+ %>/images/parts/whitepanel_7.gif) |
+ |
+ %>/images/parts/whitepanel_9.gif) |
+
+
+
+ |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/web/jsp/dialog/export.jsp b/source/web/jsp/dialog/export.jsp
index 6d14a5a33e..b8891ed0ab 100644
--- a/source/web/jsp/dialog/export.jsp
+++ b/source/web/jsp/dialog/export.jsp
@@ -92,7 +92,7 @@
- ''
+ ''
|
diff --git a/source/web/jsp/dialog/import.jsp b/source/web/jsp/dialog/import.jsp
index 744de2a57a..0d7750c9c6 100644
--- a/source/web/jsp/dialog/import.jsp
+++ b/source/web/jsp/dialog/import.jsp
@@ -73,7 +73,7 @@
- ''
+ ''
|
diff --git a/source/web/jsp/dialog/space-details.jsp b/source/web/jsp/dialog/space-details.jsp
index 3aad33d109..3efc490c35 100644
--- a/source/web/jsp/dialog/space-details.jsp
+++ b/source/web/jsp/dialog/space-details.jsp
@@ -202,6 +202,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/web/jsp/dialog/system-info.jsp b/source/web/jsp/dialog/system-info.jsp
index d17ca33fe1..4632eee183 100644
--- a/source/web/jsp/dialog/system-info.jsp
+++ b/source/web/jsp/dialog/system-info.jsp
@@ -151,7 +151,7 @@
diff --git a/source/web/jsp/forums/create-reply-dialog.jsp b/source/web/jsp/forums/create-reply-dialog.jsp
index b6494456ae..08b120880d 100644
--- a/source/web/jsp/forums/create-reply-dialog.jsp
+++ b/source/web/jsp/forums/create-reply-dialog.jsp
@@ -19,8 +19,6 @@
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-<%@ page import="org.alfresco.web.bean.forums.ForumsBean.TopicBubbleViewRenderer" %>
-
+
+
+
+ <%-- load a bundle of properties with I18N strings --%>
+
+
+ <%-- set the form name here --%>
+
+
+ <%-- Main outer table --%>
+
+
+ <%-- Title bar --%>
+
+
+ <%@ include file="../parts/titlebar.jsp" %>
+ |
+
+
+ <%-- Main area --%>
+
+ <%-- Shelf --%>
+
+ <%@ include file="../parts/shelf.jsp" %>
+ |
+
+ <%-- Work Area --%>
+
+
+ <%-- Breadcrumb --%>
+ <%@ include file="../parts/breadcrumb.jsp" %>
+
+ <%-- Status and Actions --%>
+
+ |
+
+
+ <%-- Status and Actions inner contents table --%>
+ <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
+
+
+ |
+ |
+
+
+ <%-- separator row with gradient shadow --%>
+
+ %>/images/parts/statuspanel_7.gif) |
+ |
+ %>/images/parts/statuspanel_9.gif) |
+
+
+ <%-- Details --%>
+
+ |
+
+
+
+
+
+
+
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
+
+
+ |
+
+ |
+
+ : |
+
+
+ |
+
+
+ : |
+
+ *
+
+ |
+
+
+ : |
+
+ *
+
+ |
+
+
+ : |
+
+ *
+
+ |
+
+
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
+ |
+
+
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
+
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
+ |
+
+
+ |
+ |
+
+
+ <%-- separator row with bottom panel graphics --%>
+
+ %>/images/parts/whitepanel_7.gif) |
+ |
+ %>/images/parts/whitepanel_9.gif) |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/web/jsp/users/change-password.jsp b/source/web/jsp/users/change-password.jsp
index 87f9164f93..a2f5dc6e35 100644
--- a/source/web/jsp/users/change-password.jsp
+++ b/source/web/jsp/users/change-password.jsp
@@ -162,7 +162,7 @@
|
-
+
|
diff --git a/source/web/jsp/users/delete-user.jsp b/source/web/jsp/users/delete-user.jsp
index b4cdf4ca4d..7030d0a549 100644
--- a/source/web/jsp/users/delete-user.jsp
+++ b/source/web/jsp/users/delete-user.jsp
@@ -126,7 +126,7 @@
|
-
+
|
diff --git a/source/web/jsp/forums/delete-forums.jsp b/source/web/jsp/users/user-console.jsp
similarity index 53%
rename from source/web/jsp/forums/delete-forums.jsp
rename to source/web/jsp/users/user-console.jsp
index b8784137a0..877c84bf6d 100644
--- a/source/web/jsp/forums/delete-forums.jsp
+++ b/source/web/jsp/users/user-console.jsp
@@ -24,15 +24,14 @@
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
+
<%-- load a bundle of properties with I18N strings --%>
- <%-- set the form name here --%>
-
+
<%-- Main outer table --%>
@@ -61,17 +60,17 @@
|
-
+
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
@@ -90,45 +89,65 @@
<%-- Details --%>
|
|
-
-
+
+
+
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
- |
-
-
-
-
-
-
-
- |
-
-
-
- <%-- Error Messages --%>
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
+ <%-- wrapper comment used by the panel to add additional component facets --%>
+
+
+ <%----%>
+
+ <%----%>
+
+
+
+
+
+
+ :
+ |
+
+
+ |
+
+
+
+ :
+ |
+
+
+ |
+
+
+
+ :
+ |
+
+
+ |
+
+
+
+ <%-- context for current user is setup on entry to user console --%>
+
+
+
+
+
+
+ <%----%>
+
+ <%----%>
+
+
+
+
+
|
@@ -136,20 +155,16 @@
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
|
+
+
|
|
@@ -170,4 +185,4 @@
-
+
\ No newline at end of file
diff --git a/source/web/jsp/users/users.jsp b/source/web/jsp/users/users.jsp
index cec237c38e..28839341af 100644
--- a/source/web/jsp/users/users.jsp
+++ b/source/web/jsp/users/users.jsp
@@ -189,11 +189,11 @@
-
+
-
+
@@ -211,7 +211,7 @@
diff --git a/source/web/jsp/wizard/add-content/properties.jsp b/source/web/jsp/wizard/add-content/properties.jsp
deleted file mode 100644
index cc7736519d..0000000000
--- a/source/web/jsp/wizard/add-content/properties.jsp
+++ /dev/null
@@ -1,267 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
- |
-
-
- |
-
- |
-
- |
-
-
- : |
-
- *
- |
-
-
- : |
-
-
-
- *
- |
-
-
- : |
-
-
-
- *
- |
-
-
- : |
-
- *
- |
-
-
- : |
-
-
- |
-
-
- : |
-
-
- |
-
- |
-
- |
-
-
- |
- |
-
-
-
-
-
-
-
- |
-
- |
-
- |
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/add-content/summary.jsp b/source/web/jsp/wizard/add-content/summary.jsp
deleted file mode 100644
index c788f0189b..0000000000
--- a/source/web/jsp/wizard/add-content/summary.jsp
+++ /dev/null
@@ -1,173 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/add-content/upload.jsp b/source/web/jsp/wizard/add-content/upload.jsp
deleted file mode 100644
index 3dbb6aa678..0000000000
--- a/source/web/jsp/wizard/add-content/upload.jsp
+++ /dev/null
@@ -1,212 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-<%@ page import="org.alfresco.web.bean.wizard.AddContentWizard" %>
-<%@ page import="org.alfresco.web.app.Application" %>
-<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %>
-<%@ page import="javax.faces.context.FacesContext" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/container.jsp b/source/web/jsp/wizard/container.jsp
index 64d64be191..fdaa72d1b4 100644
--- a/source/web/jsp/wizard/container.jsp
+++ b/source/web/jsp/wizard/container.jsp
@@ -163,7 +163,7 @@
+ action="#{WizardManager.cancel}" immediate="true" />
|
diff --git a/source/web/jsp/wizard/create-content/create-html.jsp b/source/web/jsp/wizard/create-content/create-html.jsp
deleted file mode 100644
index 8b7e82f0c0..0000000000
--- a/source/web/jsp/wizard/create-content/create-html.jsp
+++ /dev/null
@@ -1,208 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
-
-
-
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- Error Messages --%>
-
- |
-
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/create-content/properties.jsp b/source/web/jsp/wizard/create-content/properties.jsp
deleted file mode 100644
index af92e807f2..0000000000
--- a/source/web/jsp/wizard/create-content/properties.jsp
+++ /dev/null
@@ -1,251 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
- |
-
-
- |
-
- |
-
- |
-
-
- : |
-
- *
- |
-
-
- : |
-
-
-
- *
- |
-
-
- : |
-
-
-
- *
- |
-
-
- : |
-
- *
- |
-
-
- : |
-
-
- |
-
-
- : |
-
-
- |
-
- |
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/create-content/select-type.jsp b/source/web/jsp/wizard/create-content/select-type.jsp
deleted file mode 100644
index b0776acecf..0000000000
--- a/source/web/jsp/wizard/create-content/select-type.jsp
+++ /dev/null
@@ -1,191 +0,0 @@
-<%--
- Copyright (C) 2005 Alfresco, Inc.
-
- Licensed under the Mozilla Public License version 1.1
- with a permitted attribution clause. You may obtain a
- copy of the License at
-
- http://www.alfresco.org/legal/license.txt
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- either express or implied. See the License for the specific
- language governing permissions and limitations under the
- License.
---%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
-<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
-<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false" %>
-<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
-
-
-
-
-
- <%-- load a bundle of properties with I18N strings --%>
-
-
- <%-- set the form name here --%>
-
-
- <%-- Main outer table --%>
-
-
- <%-- Title bar --%>
-
-
- <%@ include file="../../parts/titlebar.jsp" %>
- |
-
-
- <%-- Main area --%>
-
- <%-- Shelf --%>
-
- <%@ include file="../../parts/shelf.jsp" %>
- |
-
- <%-- Work Area --%>
-
-
- <%-- Breadcrumb --%>
- <%@ include file="../../parts/breadcrumb.jsp" %>
-
- <%-- Status and Actions --%>
-
- |
-
-
- <%-- Status and Actions inner contents table --%>
- <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
-
-
- |
- |
-
-
- <%-- separator row with gradient shadow --%>
-
- %>/images/parts/statuspanel_7.gif) |
- |
- %>/images/parts/statuspanel_9.gif) |
-
-
- <%-- Details --%>
-
- |
-
-
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
-
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
-
-
-
-
- |
-
-
- |
-
- |
-
-
-
-
-
-
- |
-
- |
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
- |
-
-
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
-
-
-
-
- |
-
-
-
-
- |
-
- |
-
-
-
- |
-
-
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
- |
-
-
- |
- |
-
-
- <%-- Error Messages --%>
-
- |
-
- <%-- messages tag to show messages not handled by other specific message tags --%>
-
- |
- |
-
-
- <%-- separator row with bottom panel graphics --%>
-
- %>/images/parts/whitepanel_7.gif) |
- |
- %>/images/parts/whitepanel_9.gif) |
-
-
-
- |
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/source/web/jsp/wizard/summary.jsp b/source/web/jsp/wizard/summary.jsp
index 3a70c45eeb..2472e7c75d 100644
--- a/source/web/jsp/wizard/summary.jsp
+++ b/source/web/jsp/wizard/summary.jsp
@@ -20,4 +20,8 @@
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/source/web/scripts/ajax/common.js b/source/web/scripts/ajax/common.js
new file mode 100644
index 0000000000..0675817a56
--- /dev/null
+++ b/source/web/scripts/ajax/common.js
@@ -0,0 +1,22 @@
+//
+// Alfresco AJAX support library
+// Gavin Cornwell 14-07-2006
+//
+
+/**
+ * Default handler for errors
+ */
+function handleErrorDojo(type, errObj)
+{
+ // remove the dojo prefix from the message
+ var errorStart = "XMLHttpTransport Error: 500 ";
+ var msg = errObj.message;
+
+ if (msg.indexOf(errorStart) != -1)
+ {
+ msg = msg.substring(errorStart.length);
+ }
+
+ // TODO: Show a nicer error page, an alert will do for now!
+ alert(msg);
+}
\ No newline at end of file
diff --git a/source/web/scripts/ajax/dojo.js b/source/web/scripts/ajax/dojo.js
new file mode 100644
index 0000000000..038afe584f
--- /dev/null
+++ b/source/web/scripts/ajax/dojo.js
@@ -0,0 +1,5593 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*
+ This is a compiled version of Dojo, built for deployment and not for
+ development. To get an editable version, please visit:
+
+ http://dojotoolkit.org
+
+ for documentation and information on getting the source.
+*/
+
+if(typeof dojo=="undefined"){
+var dj_global=this;
+function dj_undef(_1,_2){
+if(_2==null){
+_2=dj_global;
+}
+return (typeof _2[_1]=="undefined");
+}
+if(dj_undef("djConfig")){
+var djConfig={};
+}
+if(dj_undef("dojo")){
+var dojo={};
+}
+dojo.version={major:0,minor:3,patch:1,flag:"",revision:Number("$Rev: 4342 $".match(/[0-9]+/)[0]),toString:function(){
+with(dojo.version){
+return major+"."+minor+"."+patch+flag+" ("+revision+")";
+}
+}};
+dojo.evalProp=function(_3,_4,_5){
+return (_4&&!dj_undef(_3,_4)?_4[_3]:(_5?(_4[_3]={}):undefined));
+};
+dojo.parseObjPath=function(_6,_7,_8){
+var _9=(_7!=null?_7:dj_global);
+var _a=_6.split(".");
+var _b=_a.pop();
+for(var i=0,l=_a.length;i1){
+dh.modulesLoadedListeners.push(function(){
+obj[_3d]();
+});
+}
+}
+if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
+dh.callLoaded();
+}
+};
+dojo.addOnUnload=function(obj,_40){
+var dh=dojo.hostenv;
+if(arguments.length==1){
+dh.unloadListeners.push(obj);
+}else{
+if(arguments.length>1){
+dh.unloadListeners.push(function(){
+obj[_40]();
+});
+}
+}
+};
+dojo.hostenv.modulesLoaded=function(){
+if(this.post_load_){
+return;
+}
+if((this.loadUriStack.length==0)&&(this.getTextStack.length==0)){
+if(this.inFlightCount>0){
+dojo.debug("files still in flight!");
+return;
+}
+dojo.hostenv.callLoaded();
+}
+};
+dojo.hostenv.callLoaded=function(){
+if(typeof setTimeout=="object"){
+setTimeout("dojo.hostenv.loaded();",0);
+}else{
+dojo.hostenv.loaded();
+}
+};
+dojo.hostenv.getModuleSymbols=function(_42){
+var _43=_42.split(".");
+for(var i=_43.length-1;i>0;i--){
+var _45=_43.slice(0,i).join(".");
+var _46=this.getModulePrefix(_45);
+if(_46!=_45){
+_43.splice(0,i,_46);
+break;
+}
+}
+return _43;
+};
+dojo.hostenv._global_omit_module_check=false;
+dojo.hostenv.loadModule=function(_47,_48,_49){
+if(!_47){
+return;
+}
+_49=this._global_omit_module_check||_49;
+var _4a=this.findModule(_47,false);
+if(_4a){
+return _4a;
+}
+if(dj_undef(_47,this.loading_modules_)){
+this.addedToLoadingCount.push(_47);
+}
+this.loading_modules_[_47]=1;
+var _4b=_47.replace(/\./g,"/")+".js";
+var _4c=this.getModuleSymbols(_47);
+var _4d=((_4c[0].charAt(0)!="/")&&(!_4c[0].match(/^\w+:/)));
+var _4e=_4c[_4c.length-1];
+var _4f=_47.split(".");
+if(_4e=="*"){
+_47=(_4f.slice(0,-1)).join(".");
+while(_4c.length){
+_4c.pop();
+_4c.push(this.pkgFileName);
+_4b=_4c.join("/")+".js";
+if(_4d&&(_4b.charAt(0)=="/")){
+_4b=_4b.slice(1);
+}
+ok=this.loadPath(_4b,((!_49)?_47:null));
+if(ok){
+break;
+}
+_4c.pop();
+}
+}else{
+_4b=_4c.join("/")+".js";
+_47=_4f.join(".");
+var ok=this.loadPath(_4b,((!_49)?_47:null));
+if((!ok)&&(!_48)){
+_4c.pop();
+while(_4c.length){
+_4b=_4c.join("/")+".js";
+ok=this.loadPath(_4b,((!_49)?_47:null));
+if(ok){
+break;
+}
+_4c.pop();
+_4b=_4c.join("/")+"/"+this.pkgFileName+".js";
+if(_4d&&(_4b.charAt(0)=="/")){
+_4b=_4b.slice(1);
+}
+ok=this.loadPath(_4b,((!_49)?_47:null));
+if(ok){
+break;
+}
+}
+}
+if((!ok)&&(!_49)){
+dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
+}
+}
+if(!_49&&!this["isXDomain"]){
+_4a=this.findModule(_47,false);
+if(!_4a){
+dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
+}
+}
+return _4a;
+};
+dojo.hostenv.startPackage=function(_51){
+var _52=dojo.evalObjPath((_51.split(".").slice(0,-1)).join("."));
+this.loaded_modules_[(new String(_51)).toLowerCase()]=_52;
+var _53=_51.split(/\./);
+if(_53[_53.length-1]=="*"){
+_53.pop();
+}
+return dojo.evalObjPath(_53.join("."),true);
+};
+dojo.hostenv.findModule=function(_54,_55){
+var lmn=(new String(_54)).toLowerCase();
+if(this.loaded_modules_[lmn]){
+return this.loaded_modules_[lmn];
+}
+var _57=dojo.evalObjPath(_54);
+if((_54)&&(typeof _57!="undefined")&&(_57)){
+this.loaded_modules_[lmn]=_57;
+return _57;
+}
+if(_55){
+dojo.raise("no loaded module named '"+_54+"'");
+}
+return null;
+};
+dojo.kwCompoundRequire=function(_58){
+var _59=_58["common"]||[];
+var _5a=(_58[dojo.hostenv.name_])?_59.concat(_58[dojo.hostenv.name_]||[]):_59.concat(_58["default"]||[]);
+for(var x=0;x<_5a.length;x++){
+var _5c=_5a[x];
+if(_5c.constructor==Array){
+dojo.hostenv.loadModule.apply(dojo.hostenv,_5c);
+}else{
+dojo.hostenv.loadModule(_5c);
+}
+}
+};
+dojo.require=function(){
+dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
+};
+dojo.requireIf=function(){
+if((arguments[0]===true)||(arguments[0]=="common")||(arguments[0]&&dojo.render[arguments[0]].capable)){
+var _5d=[];
+for(var i=1;i1){
+var _67=_66[1];
+var _68=_67.split("&");
+for(var x in _68){
+var sp=_68[x].split("=");
+if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
+var opt=sp[0].substr(9);
+try{
+djConfig[opt]=eval(sp[1]);
+}
+catch(e){
+djConfig[opt]=sp[1];
+}
+}
+}
+}
+}
+if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
+var _6c=document.getElementsByTagName("script");
+var _6d=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
+for(var i=0;i<_6c.length;i++){
+var src=_6c[i].getAttribute("src");
+if(!src){
+continue;
+}
+var m=src.match(_6d);
+if(m){
+var _71=src.substring(0,m.index);
+if(src.indexOf("bootstrap1")>-1){
+_71+="../";
+}
+if(!this["djConfig"]){
+djConfig={};
+}
+if(djConfig["baseScriptUri"]==""){
+djConfig["baseScriptUri"]=_71;
+}
+if(djConfig["baseRelativePath"]==""){
+djConfig["baseRelativePath"]=_71;
+}
+break;
+}
+}
+}
+var dr=dojo.render;
+var drh=dojo.render.html;
+var drs=dojo.render.svg;
+var dua=drh.UA=navigator.userAgent;
+var dav=drh.AV=navigator.appVersion;
+var t=true;
+var f=false;
+drh.capable=t;
+drh.support.builtin=t;
+dr.ver=parseFloat(drh.AV);
+dr.os.mac=dav.indexOf("Macintosh")>=0;
+dr.os.win=dav.indexOf("Windows")>=0;
+dr.os.linux=dav.indexOf("X11")>=0;
+drh.opera=dua.indexOf("Opera")>=0;
+drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
+drh.safari=dav.indexOf("Safari")>=0;
+var _79=dua.indexOf("Gecko");
+drh.mozilla=drh.moz=(_79>=0)&&(!drh.khtml);
+if(drh.mozilla){
+drh.geckoVersion=dua.substring(_79+6,_79+14);
+}
+drh.ie=(document.all)&&(!drh.opera);
+drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
+drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
+drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
+drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
+dojo.locale=(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
+dr.vml.capable=drh.ie;
+drs.capable=f;
+drs.support.plugin=f;
+drs.support.builtin=f;
+if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("org.w3c.dom.svg","1.0")){
+drs.capable=t;
+drs.support.builtin=t;
+drs.support.plugin=f;
+}
+})();
+dojo.hostenv.startPackage("dojo.hostenv");
+dojo.render.name=dojo.hostenv.name_="browser";
+dojo.hostenv.searchIds=[];
+dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
+dojo.hostenv.getXmlhttpObject=function(){
+var _7a=null;
+var _7b=null;
+try{
+_7a=new XMLHttpRequest();
+}
+catch(e){
+}
+if(!_7a){
+for(var i=0;i<3;++i){
+var _7d=dojo.hostenv._XMLHTTP_PROGIDS[i];
+try{
+_7a=new ActiveXObject(_7d);
+}
+catch(e){
+_7b=e;
+}
+if(_7a){
+dojo.hostenv._XMLHTTP_PROGIDS=[_7d];
+break;
+}
+}
+}
+if(!_7a){
+return dojo.raise("XMLHTTP not available",_7b);
+}
+return _7a;
+};
+dojo.hostenv.getText=function(uri,_7f,_80){
+var _81=this.getXmlhttpObject();
+if(_7f){
+_81.onreadystatechange=function(){
+if(4==_81.readyState){
+if((!_81["status"])||((200<=_81.status)&&(300>_81.status))){
+_7f(_81.responseText);
+}
+}
+};
+}
+_81.open("GET",uri,_7f?true:false);
+try{
+_81.send(null);
+if(_7f){
+return null;
+}
+if((_81["status"])&&((200>_81.status)||(300<=_81.status))){
+throw Error("Unable to load "+uri+" status:"+_81.status);
+}
+}
+catch(e){
+if((_80)&&(!_7f)){
+return null;
+}else{
+throw e;
+}
+}
+return _81.responseText;
+};
+dojo.hostenv.defaultDebugContainerId="dojoDebug";
+dojo.hostenv._println_buffer=[];
+dojo.hostenv._println_safe=false;
+dojo.hostenv.println=function(_82){
+if(!dojo.hostenv._println_safe){
+dojo.hostenv._println_buffer.push(_82);
+}else{
+try{
+var _83=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
+if(!_83){
+_83=document.getElementsByTagName("body")[0]||document.body;
+}
+var div=document.createElement("div");
+div.appendChild(document.createTextNode(_82));
+_83.appendChild(div);
+}
+catch(e){
+try{
+document.write(""+_82+" ");
+}
+catch(e2){
+window.status=_82;
+}
+}
+}
+};
+dojo.addOnLoad(function(){
+dojo.hostenv._println_safe=true;
+while(dojo.hostenv._println_buffer.length>0){
+dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
+}
+});
+function dj_addNodeEvtHdlr(_85,_86,fp,_88){
+var _89=_85["on"+_86]||function(){
+};
+_85["on"+_86]=function(){
+fp.apply(_85,arguments);
+_89.apply(_85,arguments);
+};
+return true;
+}
+dj_addNodeEvtHdlr(window,"load",function(){
+if(arguments.callee.initialized){
+return;
+}
+arguments.callee.initialized=true;
+var _8a=function(){
+if(dojo.render.html.ie){
+dojo.hostenv.makeWidgets();
+}
+};
+if(dojo.hostenv.inFlightCount==0){
+_8a();
+dojo.hostenv.modulesLoaded();
+}else{
+dojo.addOnLoad(_8a);
+}
+});
+dj_addNodeEvtHdlr(window,"unload",function(){
+dojo.hostenv.unloaded();
+});
+dojo.hostenv.makeWidgets=function(){
+var _8b=[];
+if(djConfig.searchIds&&djConfig.searchIds.length>0){
+_8b=_8b.concat(djConfig.searchIds);
+}
+if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
+_8b=_8b.concat(dojo.hostenv.searchIds);
+}
+if((djConfig.parseWidgets)||(_8b.length>0)){
+if(dojo.evalObjPath("dojo.widget.Parse")){
+var _8c=new dojo.xml.Parse();
+if(_8b.length>0){
+for(var x=0;x<_8b.length;x++){
+var _8e=document.getElementById(_8b[x]);
+if(!_8e){
+continue;
+}
+var _8f=_8c.parseElement(_8e,null,true);
+dojo.widget.getParser().createComponents(_8f);
+}
+}else{
+if(djConfig.parseWidgets){
+var _8f=_8c.parseElement(document.getElementsByTagName("body")[0]||document.body,null,true);
+dojo.widget.getParser().createComponents(_8f);
+}
+}
+}
+}
+};
+dojo.addOnLoad(function(){
+if(!dojo.render.html.ie){
+dojo.hostenv.makeWidgets();
+}
+});
+try{
+if(dojo.render.html.ie){
+document.write("");
+document.write("");
+}
+}
+catch(e){
+}
+dojo.hostenv.writeIncludes=function(){
+};
+dojo.byId=function(id,doc){
+if(id&&(typeof id=="string"||id instanceof String)){
+if(!doc){
+doc=document;
+}
+return doc.getElementById(id);
+}
+return id;
+};
+(function(){
+if(typeof dj_usingBootstrap!="undefined"){
+return;
+}
+var _92=false;
+var _93=false;
+var _94=false;
+if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){
+_92=true;
+}else{
+if(typeof this["load"]=="function"){
+_93=true;
+}else{
+if(window.widget){
+_94=true;
+}
+}
+}
+var _95=[];
+if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
+_95.push("debug.js");
+}
+if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_92)&&(!_94)){
+_95.push("browser_debug.js");
+}
+if((this["djConfig"])&&(djConfig["compat"])){
+_95.push("compat/"+djConfig["compat"]+".js");
+}
+var _96=djConfig["baseScriptUri"];
+if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
+_96=djConfig["baseLoaderUri"];
+}
+for(var x=0;x<_95.length;x++){
+var _98=_96+"src/"+_95[x];
+if(_92||_93){
+load(_98);
+}else{
+try{
+document.write("");
+}
+catch(e){
+var _99=document.createElement("script");
+_99.src=_98;
+document.getElementsByTagName("head")[0].appendChild(_99);
+}
+}
+}
+})();
+dojo.fallback_locale="en";
+dojo.normalizeLocale=function(_9a){
+return _9a?_9a.toLowerCase():dojo.locale;
+};
+dojo.requireLocalization=function(_9b,_9c,_9d){
+dojo.debug("EXPERIMENTAL: dojo.requireLocalization");
+var _9e=dojo.hostenv.getModuleSymbols(_9b);
+var _9f=_9e.concat("nls").join("/");
+_9d=dojo.normalizeLocale(_9d);
+var _a0=_9d.split("-");
+var _a1=[];
+for(var i=_a0.length;i>0;i--){
+_a1.push(_a0.slice(0,i).join("-"));
+}
+if(_a1[_a1.length-1]!=dojo.fallback_locale){
+_a1.push(dojo.fallback_locale);
+}
+var _a3=[_9b,"_nls",_9c].join(".");
+var _a4=dojo.hostenv.startPackage(_a3);
+dojo.hostenv.loaded_modules_[_a3]=_a4;
+var _a5=false;
+for(var i=_a1.length-1;i>=0;i--){
+var loc=_a1[i];
+var pkg=[_a3,loc].join(".");
+var _a8=false;
+if(!dojo.hostenv.findModule(pkg)){
+dojo.hostenv.loaded_modules_[pkg]=null;
+var _a9=[_9f,loc,_9c].join("/")+".js";
+_a8=dojo.hostenv.loadPath(_a9,null,function(_aa){
+_a4[loc]=_aa;
+if(_a5){
+for(var x in _a5){
+if(!_a4[loc][x]){
+_a4[loc][x]=_a5[x];
+}
+}
+}
+});
+}else{
+_a8=true;
+}
+if(_a8&&_a4[loc]){
+_a5=_a4[loc];
+}
+}
+};
+dojo.provide("dojo.string.common");
+dojo.require("dojo.string");
+dojo.string.trim=function(str,wh){
+if(!str.replace){
+return str;
+}
+if(!str.length){
+return str;
+}
+var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
+return str.replace(re,"");
+};
+dojo.string.trimStart=function(str){
+return dojo.string.trim(str,1);
+};
+dojo.string.trimEnd=function(str){
+return dojo.string.trim(str,-1);
+};
+dojo.string.repeat=function(str,_b2,_b3){
+var out="";
+for(var i=0;i<_b2;i++){
+out+=str;
+if(_b3&&i<_b2-1){
+out+=_b3;
+}
+}
+return out;
+};
+dojo.string.pad=function(str,len,c,dir){
+var out=String(str);
+if(!c){
+c="0";
+}
+if(!dir){
+dir=1;
+}
+while(out.length0){
+out=c+out;
+}else{
+out+=c;
+}
+}
+return out;
+};
+dojo.string.padLeft=function(str,len,c){
+return dojo.string.pad(str,len,c,1);
+};
+dojo.string.padRight=function(str,len,c){
+return dojo.string.pad(str,len,c,-1);
+};
+dojo.provide("dojo.string");
+dojo.require("dojo.string.common");
+dojo.provide("dojo.lang.common");
+dojo.require("dojo.lang");
+dojo.lang._mixin=function(obj,_c2){
+var _c3={};
+for(var x in _c2){
+if(typeof _c3[x]=="undefined"||_c3[x]!=_c2[x]){
+obj[x]=_c2[x];
+}
+}
+if(dojo.render.html.ie&&dojo.lang.isFunction(_c2["toString"])&&_c2["toString"]!=obj["toString"]){
+obj.toString=_c2.toString;
+}
+return obj;
+};
+dojo.lang.mixin=function(obj,_c6){
+for(var i=1,l=arguments.length;i-1;
+};
+dojo.lang.isObject=function(wh){
+if(typeof wh=="undefined"){
+return false;
+}
+return (typeof wh=="object"||wh===null||dojo.lang.isArray(wh)||dojo.lang.isFunction(wh));
+};
+dojo.lang.isArray=function(wh){
+return (wh instanceof Array||typeof wh=="array");
+};
+dojo.lang.isArrayLike=function(wh){
+if(dojo.lang.isString(wh)){
+return false;
+}
+if(dojo.lang.isFunction(wh)){
+return false;
+}
+if(dojo.lang.isArray(wh)){
+return true;
+}
+if(typeof wh!="undefined"&&wh&&dojo.lang.isNumber(wh.length)&&isFinite(wh.length)){
+return true;
+}
+return false;
+};
+dojo.lang.isFunction=function(wh){
+if(!wh){
+return false;
+}
+return (wh instanceof Function||typeof wh=="function");
+};
+dojo.lang.isString=function(wh){
+return (wh instanceof String||typeof wh=="string");
+};
+dojo.lang.isAlien=function(wh){
+if(!wh){
+return false;
+}
+return !dojo.lang.isFunction()&&/\{\s*\[native code\]\s*\}/.test(String(wh));
+};
+dojo.lang.isBoolean=function(wh){
+return (wh instanceof Boolean||typeof wh=="boolean");
+};
+dojo.lang.isNumber=function(wh){
+return (wh instanceof Number||typeof wh=="number");
+};
+dojo.lang.isUndefined=function(wh){
+return ((wh==undefined)&&(typeof wh=="undefined"));
+};
+dojo.provide("dojo.lang.extras");
+dojo.require("dojo.lang.common");
+dojo.lang.setTimeout=function(_e2,_e3){
+var _e4=window,argsStart=2;
+if(!dojo.lang.isFunction(_e2)){
+_e4=_e2;
+_e2=_e3;
+_e3=arguments[2];
+argsStart++;
+}
+if(dojo.lang.isString(_e2)){
+_e2=_e4[_e2];
+}
+var _e5=[];
+for(var i=argsStart;i=4){
+this.changeUrl=_f7;
+}
+}
+};
+dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,load:function(_f8,_f9,evt){
+},error:function(_fb,_fc){
+},timeout:function(_fd){
+},handle:function(){
+},timeoutSeconds:0,abort:function(){
+},fromKwArgs:function(_fe){
+if(_fe["url"]){
+_fe.url=_fe.url.toString();
+}
+if(_fe["formNode"]){
+_fe.formNode=dojo.byId(_fe.formNode);
+}
+if(!_fe["method"]&&_fe["formNode"]&&_fe["formNode"].method){
+_fe.method=_fe["formNode"].method;
+}
+if(!_fe["handle"]&&_fe["handler"]){
+_fe.handle=_fe.handler;
+}
+if(!_fe["load"]&&_fe["loaded"]){
+_fe.load=_fe.loaded;
+}
+if(!_fe["changeUrl"]&&_fe["changeURL"]){
+_fe.changeUrl=_fe.changeURL;
+}
+_fe.encoding=dojo.lang.firstValued(_fe["encoding"],djConfig["bindEncoding"],"");
+_fe.sendTransport=dojo.lang.firstValued(_fe["sendTransport"],djConfig["ioSendTransport"],false);
+var _ff=dojo.lang.isFunction;
+for(var x=0;x0){
+dojo.io.bind(dojo.io._bindQueue.shift());
+}else{
+dojo.io._queueBindInFlight=false;
+}
+}
+};
+dojo.io._bindQueue=[];
+dojo.io._queueBindInFlight=false;
+dojo.io.argsFromMap=function(map,_110,last){
+var enc=/utf/i.test(_110||"")?encodeURIComponent:dojo.string.encodeAscii;
+var _113=[];
+var _114=new Object();
+for(var name in map){
+var _116=function(elt){
+var val=enc(name)+"="+enc(elt);
+_113[(last==name)?"push":"unshift"](val);
+};
+if(!_114[name]){
+var _119=map[name];
+if(dojo.lang.isArray(_119)){
+dojo.lang.forEach(_119,_116);
+}else{
+_116(_119);
+}
+}
+}
+return _113.join("&");
+};
+dojo.io.setIFrameSrc=function(_11a,src,_11c){
+try{
+var r=dojo.render.html;
+if(!_11c){
+if(r.safari){
+_11a.location=src;
+}else{
+frames[_11a.name].location=src;
+}
+}else{
+var idoc;
+if(r.ie){
+idoc=_11a.contentWindow.document;
+}else{
+if(r.safari){
+idoc=_11a.document;
+}else{
+idoc=_11a.contentWindow;
+}
+}
+if(!idoc){
+_11a.location=src;
+return;
+}else{
+idoc.location.replace(src);
+}
+}
+}
+catch(e){
+dojo.debug(e);
+dojo.debug("setIFrameSrc: "+e);
+}
+};
+dojo.provide("dojo.lang.array");
+dojo.require("dojo.lang.common");
+dojo.lang.has=function(obj,name){
+try{
+return (typeof obj[name]!="undefined");
+}
+catch(e){
+return false;
+}
+};
+dojo.lang.isEmpty=function(obj){
+if(dojo.lang.isObject(obj)){
+var tmp={};
+var _123=0;
+for(var x in obj){
+if(obj[x]&&(!tmp[x])){
+_123++;
+break;
+}
+}
+return (_123==0);
+}else{
+if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
+return obj.length==0;
+}
+}
+};
+dojo.lang.map=function(arr,obj,_127){
+var _128=dojo.lang.isString(arr);
+if(_128){
+arr=arr.split("");
+}
+if(dojo.lang.isFunction(obj)&&(!_127)){
+_127=obj;
+obj=dj_global;
+}else{
+if(dojo.lang.isFunction(obj)&&_127){
+var _129=obj;
+obj=_127;
+_127=_129;
+}
+}
+if(Array.map){
+var _12a=Array.map(arr,_127,obj);
+}else{
+var _12a=[];
+for(var i=0;i=3){
+dojo.raise("thisObject doesn't exist!");
+}
+_13e=dj_global;
+}
+var _140=[];
+for(var i=0;i/gm,">").replace(/"/gm,""");
+if(!_183){
+str=str.replace(/'/gm,"'");
+}
+return str;
+};
+dojo.string.escapeSql=function(str){
+return str.replace(/'/gm,"''");
+};
+dojo.string.escapeRegExp=function(str){
+return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
+};
+dojo.string.escapeJavaScript=function(str){
+return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
+};
+dojo.string.escapeString=function(str){
+return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
+};
+dojo.string.summary=function(str,len){
+if(!len||str.length<=len){
+return str;
+}else{
+return str.substring(0,len).replace(/\.+$/,"")+"...";
+}
+};
+dojo.string.endsWith=function(str,end,_18c){
+if(_18c){
+str=str.toLowerCase();
+end=end.toLowerCase();
+}
+if((str.length-end.length)<0){
+return false;
+}
+return str.lastIndexOf(end)==str.length-end.length;
+};
+dojo.string.endsWithAny=function(str){
+for(var i=1;i-1){
+return true;
+}
+}
+return false;
+};
+dojo.string.normalizeNewlines=function(text,_197){
+if(_197=="\n"){
+text=text.replace(/\r\n/g,"\n");
+text=text.replace(/\r/g,"\n");
+}else{
+if(_197=="\r"){
+text=text.replace(/\r\n/g,"\r");
+text=text.replace(/\n/g,"\r");
+}else{
+text=text.replace(/([^\r])\n/g,"$1\r\n");
+text=text.replace(/\r([^\n])/g,"\r\n$1");
+}
+}
+return text;
+};
+dojo.string.splitEscaped=function(str,_199){
+var _19a=[];
+for(var i=0,prevcomma=0;i5)&&(_1a1[x].indexOf("dojo-")>=0)){
+return "dojo:"+_1a1[x].substr(5).toLowerCase();
+}
+}
+}
+}
+}
+return _19e.toLowerCase();
+};
+dojo.dom.getUniqueId=function(){
+do{
+var id="dj_unique_"+(++arguments.callee._idIncrement);
+}while(document.getElementById(id));
+return id;
+};
+dojo.dom.getUniqueId._idIncrement=0;
+dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_1a4,_1a5){
+var node=_1a4.firstChild;
+while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
+node=node.nextSibling;
+}
+if(_1a5&&node&&node.tagName&&node.tagName.toLowerCase()!=_1a5.toLowerCase()){
+node=dojo.dom.nextElement(node,_1a5);
+}
+return node;
+};
+dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_1a7,_1a8){
+var node=_1a7.lastChild;
+while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
+node=node.previousSibling;
+}
+if(_1a8&&node&&node.tagName&&node.tagName.toLowerCase()!=_1a8.toLowerCase()){
+node=dojo.dom.prevElement(node,_1a8);
+}
+return node;
+};
+dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_1ab){
+if(!node){
+return null;
+}
+do{
+node=node.nextSibling;
+}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
+if(node&&_1ab&&_1ab.toLowerCase()!=node.tagName.toLowerCase()){
+return dojo.dom.nextElement(node,_1ab);
+}
+return node;
+};
+dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_1ad){
+if(!node){
+return null;
+}
+if(_1ad){
+_1ad=_1ad.toLowerCase();
+}
+do{
+node=node.previousSibling;
+}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
+if(node&&_1ad&&_1ad.toLowerCase()!=node.tagName.toLowerCase()){
+return dojo.dom.prevElement(node,_1ad);
+}
+return node;
+};
+dojo.dom.moveChildren=function(_1ae,_1af,trim){
+var _1b1=0;
+if(trim){
+while(_1ae.hasChildNodes()&&_1ae.firstChild.nodeType==dojo.dom.TEXT_NODE){
+_1ae.removeChild(_1ae.firstChild);
+}
+while(_1ae.hasChildNodes()&&_1ae.lastChild.nodeType==dojo.dom.TEXT_NODE){
+_1ae.removeChild(_1ae.lastChild);
+}
+}
+while(_1ae.hasChildNodes()){
+_1af.appendChild(_1ae.firstChild);
+_1b1++;
+}
+return _1b1;
+};
+dojo.dom.copyChildren=function(_1b2,_1b3,trim){
+var _1b5=_1b2.cloneNode(true);
+return this.moveChildren(_1b5,_1b3,trim);
+};
+dojo.dom.removeChildren=function(node){
+var _1b7=node.childNodes.length;
+while(node.hasChildNodes()){
+node.removeChild(node.firstChild);
+}
+return _1b7;
+};
+dojo.dom.replaceChildren=function(node,_1b9){
+dojo.dom.removeChildren(node);
+node.appendChild(_1b9);
+};
+dojo.dom.removeNode=function(node){
+if(node&&node.parentNode){
+return node.parentNode.removeChild(node);
+}
+};
+dojo.dom.getAncestors=function(node,_1bc,_1bd){
+var _1be=[];
+var _1bf=dojo.lang.isFunction(_1bc);
+while(node){
+if(!_1bf||_1bc(node)){
+_1be.push(node);
+}
+if(_1bd&&_1be.length>0){
+return _1be[0];
+}
+node=node.parentNode;
+}
+if(_1bd){
+return null;
+}
+return _1be;
+};
+dojo.dom.getAncestorsByTag=function(node,tag,_1c2){
+tag=tag.toLowerCase();
+return dojo.dom.getAncestors(node,function(el){
+return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
+},_1c2);
+};
+dojo.dom.getFirstAncestorByTag=function(node,tag){
+return dojo.dom.getAncestorsByTag(node,tag,true);
+};
+dojo.dom.isDescendantOf=function(node,_1c7,_1c8){
+if(_1c8&&node){
+node=node.parentNode;
+}
+while(node){
+if(node==_1c7){
+return true;
+}
+node=node.parentNode;
+}
+return false;
+};
+dojo.dom.innerXML=function(node){
+if(node.innerXML){
+return node.innerXML;
+}else{
+if(node.xml){
+return node.xml;
+}else{
+if(typeof XMLSerializer!="undefined"){
+return (new XMLSerializer()).serializeToString(node);
+}
+}
+}
+};
+dojo.dom.createDocument=function(){
+var doc=null;
+if(!dj_undef("ActiveXObject")){
+var _1cb=["MSXML2","Microsoft","MSXML","MSXML3"];
+for(var i=0;i<_1cb.length;i++){
+try{
+doc=new ActiveXObject(_1cb[i]+".XMLDOM");
+}
+catch(e){
+}
+if(doc){
+break;
+}
+}
+}else{
+if((document.implementation)&&(document.implementation.createDocument)){
+doc=document.implementation.createDocument("","",null);
+}
+}
+return doc;
+};
+dojo.dom.createDocumentFromText=function(str,_1ce){
+if(!_1ce){
+_1ce="text/xml";
+}
+if(!dj_undef("DOMParser")){
+var _1cf=new DOMParser();
+return _1cf.parseFromString(str,_1ce);
+}else{
+if(!dj_undef("ActiveXObject")){
+var _1d0=dojo.dom.createDocument();
+if(_1d0){
+_1d0.async=false;
+_1d0.loadXML(str);
+return _1d0;
+}else{
+dojo.debug("toXml didn't work?");
+}
+}else{
+if(document.createElement){
+var tmp=document.createElement("xml");
+tmp.innerHTML=str;
+if(document.implementation&&document.implementation.createDocument){
+var _1d2=document.implementation.createDocument("foo","",null);
+for(var i=0;i");
+}
+}
+catch(e){
+}
+if(dojo.render.html.opera){
+dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
+}
+dojo.undo.browser={initialHref:window.location.href,initialHash:window.location.hash,moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
+this.initialState={"url":this.initialHref,"kwArgs":args,"urlHash":this.initialHash};
+},addToHistory:function(args){
+var hash=null;
+if(!this.historyIframe){
+this.historyIframe=window.frames["djhistory"];
+}
+if(!this.bookmarkAnchor){
+this.bookmarkAnchor=document.createElement("a");
+(document.body||document.getElementsByTagName("body")[0]).appendChild(this.bookmarkAnchor);
+this.bookmarkAnchor.style.display="none";
+}
+if((!args["changeUrl"])||(dojo.render.html.ie)){
+var url=dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
+this.moveForward=true;
+dojo.io.setIFrameSrc(this.historyIframe,url,false);
+}
+if(args["changeUrl"]){
+this.changingUrl=true;
+hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
+setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
+this.bookmarkAnchor.href=hash;
+if(dojo.render.html.ie){
+var _1f4=args["back"]||args["backButton"]||args["handle"];
+var tcb=function(_1f6){
+if(window.location.hash!=""){
+setTimeout("window.location.href = '"+hash+"';",1);
+}
+_1f4.apply(this,[_1f6]);
+};
+if(args["back"]){
+args.back=tcb;
+}else{
+if(args["backButton"]){
+args.backButton=tcb;
+}else{
+if(args["handle"]){
+args.handle=tcb;
+}
+}
+}
+this.forwardStack=[];
+var _1f7=args["forward"]||args["forwardButton"]||args["handle"];
+var tfw=function(_1f9){
+if(window.location.hash!=""){
+window.location.href=hash;
+}
+if(_1f7){
+_1f7.apply(this,[_1f9]);
+}
+};
+if(args["forward"]){
+args.forward=tfw;
+}else{
+if(args["forwardButton"]){
+args.forwardButton=tfw;
+}else{
+if(args["handle"]){
+args.handle=tfw;
+}
+}
+}
+}else{
+if(dojo.render.html.moz){
+if(!this.locationTimer){
+this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
+}
+}
+}
+}
+this.historyStack.push({"url":url,"kwArgs":args,"urlHash":hash});
+},checkLocation:function(){
+if(!this.changingUrl){
+var hsl=this.historyStack.length;
+if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){
+this.handleBackButton();
+return;
+}
+if(this.forwardStack.length>0){
+if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
+this.handleForwardButton();
+return;
+}
+}
+if((hsl>=2)&&(this.historyStack[hsl-2])){
+if(this.historyStack[hsl-2].urlHash==window.location.hash){
+this.handleBackButton();
+return;
+}
+}
+}
+},iframeLoaded:function(evt,_1fc){
+if(!dojo.render.html.opera){
+var _1fd=this._getUrlQuery(_1fc.href);
+if(_1fd==null){
+if(this.historyStack.length==1){
+this.handleBackButton();
+}
+return;
+}
+if(this.moveForward){
+this.moveForward=false;
+return;
+}
+if(this.historyStack.length>=2&&_1fd==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
+this.handleBackButton();
+}else{
+if(this.forwardStack.length>0&&_1fd==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
+this.handleForwardButton();
+}
+}
+}
+},handleBackButton:function(){
+var _1fe=this.historyStack.pop();
+if(!_1fe){
+return;
+}
+var last=this.historyStack[this.historyStack.length-1];
+if(!last&&this.historyStack.length==0){
+last=this.initialState;
+}
+if(last){
+if(last.kwArgs["back"]){
+last.kwArgs["back"]();
+}else{
+if(last.kwArgs["backButton"]){
+last.kwArgs["backButton"]();
+}else{
+if(last.kwArgs["handle"]){
+last.kwArgs.handle("back");
+}
+}
+}
+}
+this.forwardStack.push(_1fe);
+},handleForwardButton:function(){
+var last=this.forwardStack.pop();
+if(!last){
+return;
+}
+if(last.kwArgs["forward"]){
+last.kwArgs.forward();
+}else{
+if(last.kwArgs["forwardButton"]){
+last.kwArgs.forwardButton();
+}else{
+if(last.kwArgs["handle"]){
+last.kwArgs.handle("forward");
+}
+}
+}
+this.historyStack.push(last);
+},_getUrlQuery:function(url){
+var _202=url.split("?");
+if(_202.length<2){
+return null;
+}else{
+return _202[1];
+}
+}};
+dojo.provide("dojo.io.BrowserIO");
+dojo.require("dojo.io");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.string.extras");
+dojo.require("dojo.dom");
+dojo.require("dojo.undo.browser");
+dojo.io.checkChildrenForFile=function(node){
+var _204=false;
+var _205=node.getElementsByTagName("input");
+dojo.lang.forEach(_205,function(_206){
+if(_204){
+return;
+}
+if(_206.getAttribute("type")=="file"){
+_204=true;
+}
+});
+return _204;
+};
+dojo.io.formHasFile=function(_207){
+return dojo.io.checkChildrenForFile(_207);
+};
+dojo.io.updateNode=function(node,_209){
+node=dojo.byId(node);
+var args=_209;
+if(dojo.lang.isString(_209)){
+args={url:_209};
+}
+args.mimetype="text/html";
+args.load=function(t,d,e){
+while(node.firstChild){
+if(dojo["event"]){
+try{
+dojo.event.browser.clean(node.firstChild);
+}
+catch(e){
+}
+}
+node.removeChild(node.firstChild);
+}
+node.innerHTML=d;
+};
+dojo.io.bind(args);
+};
+dojo.io.formFilter=function(node){
+var type=(node.type||"").toLowerCase();
+return !node.disabled&&node.name&&!dojo.lang.inArray(type,["file","submit","image","reset","button"]);
+};
+dojo.io.encodeForm=function(_210,_211,_212){
+if((!_210)||(!_210.tagName)||(!_210.tagName.toLowerCase()=="form")){
+dojo.raise("Attempted to encode a non-form element.");
+}
+if(!_212){
+_212=dojo.io.formFilter;
+}
+var enc=/utf/i.test(_211||"")?encodeURIComponent:dojo.string.encodeAscii;
+var _214=[];
+for(var i=0;i<_210.elements.length;i++){
+var elm=_210.elements[i];
+if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_212(elm)){
+continue;
+}
+var name=enc(elm.name);
+var type=elm.type.toLowerCase();
+if(type=="select-multiple"){
+for(var j=0;j=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
+var ret;
+if(_23b.method.toLowerCase()=="head"){
+var _241=http.getAllResponseHeaders();
+ret={};
+ret.toString=function(){
+return _241;
+};
+var _242=_241.split(/[\r\n]+/g);
+for(var i=0;i<_242.length;i++){
+var pair=_242[i].match(/^([^:]+)\s*:\s*(.+)$/i);
+if(pair){
+ret[pair[1]]=pair[2];
+}
+}
+}else{
+if(_23b.mimetype=="text/javascript"){
+try{
+ret=dj_eval(http.responseText);
+}
+catch(e){
+dojo.debug(e);
+dojo.debug(http.responseText);
+ret=null;
+}
+}else{
+if(_23b.mimetype=="text/json"){
+try{
+ret=dj_eval("("+http.responseText+")");
+}
+catch(e){
+dojo.debug(e);
+dojo.debug(http.responseText);
+ret=false;
+}
+}else{
+if((_23b.mimetype=="application/xml")||(_23b.mimetype=="text/xml")){
+ret=http.responseXML;
+if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){
+ret=dojo.dom.createDocumentFromText(http.responseText);
+}
+}else{
+ret=http.responseText;
+}
+}
+}
+}
+if(_23f){
+addToCache(url,_23e,_23b.method,http);
+}
+_23b[(typeof _23b.load=="function")?"load":"handle"]("load",ret,http,_23b);
+}else{
+var _245=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
+_23b[(typeof _23b.error=="function")?"error":"handle"]("error",_245,http,_23b);
+}
+}
+function setHeaders(http,_247){
+if(_247["headers"]){
+for(var _248 in _247["headers"]){
+if(_248.toLowerCase()=="content-type"&&!_247["contentType"]){
+_247["contentType"]=_247["headers"][_248];
+}else{
+http.setRequestHeader(_248,_247["headers"][_248]);
+}
+}
+}
+}
+this.inFlight=[];
+this.inFlightTimer=null;
+this.startWatchingInFlight=function(){
+if(!this.inFlightTimer){
+this.inFlightTimer=setInterval("dojo.io.XMLHTTPTransport.watchInFlight();",10);
+}
+};
+this.watchInFlight=function(){
+var now=null;
+for(var x=this.inFlight.length-1;x>=0;x--){
+var tif=this.inFlight[x];
+if(!tif){
+this.inFlight.splice(x,1);
+continue;
+}
+if(4==tif.http.readyState){
+this.inFlight.splice(x,1);
+doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
+}else{
+if(tif.startTime){
+if(!now){
+now=(new Date()).getTime();
+}
+if(tif.startTime+(tif.req.timeoutSeconds*1000)-1){
+dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
+url=url.split("#")[0];
+}
+if(_24e["file"]){
+_24e.method="post";
+}
+if(!_24e["method"]){
+_24e.method="get";
+}
+if(_24e.method.toLowerCase()=="get"){
+_24e.multipart=false;
+}else{
+if(_24e["file"]){
+_24e.multipart=true;
+}else{
+if(!_24e["multipart"]){
+_24e.multipart=false;
+}
+}
+}
+if(_24e["backButton"]||_24e["back"]||_24e["changeUrl"]){
+dojo.undo.browser.addToHistory(_24e);
+}
+var _253=_24e["content"]||{};
+if(_24e.sendTransport){
+_253["dojo.transport"]="xmlhttp";
+}
+do{
+if(_24e.postContent){
+_250=_24e.postContent;
+break;
+}
+if(_253){
+_250+=dojo.io.argsFromMap(_253,_24e.encoding);
+}
+if(_24e.method.toLowerCase()=="get"||!_24e.multipart){
+break;
+}
+var t=[];
+if(_250.length){
+var q=_250.split("&");
+for(var i=0;i-1?"&":"?")+_250;
+}
+if(_25a){
+_260+=(dojo.string.endsWithAny(_260,"?","&")?"":(_260.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
+}
+http.open(_24e.method.toUpperCase(),_260,_259);
+setHeaders(http,_24e);
+try{
+http.send(null);
+}
+catch(e){
+if(typeof http.abort=="function"){
+http.abort();
+}
+doLoad(_24e,{status:404},url,_250,_25b);
+}
+}
+if(!_259){
+doLoad(_24e,http,url,_250,_25b);
+}
+_24e.abort=function(){
+return http.abort();
+};
+return;
+};
+dojo.io.transports.addTransport("XMLHTTPTransport");
+};
+dojo.provide("dojo.event");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.lang.func");
+dojo.event=new function(){
+this.canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
+function interpolateArgs(args,_262){
+var dl=dojo.lang;
+var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
+switch(args.length){
+case 0:
+return;
+case 1:
+return;
+case 2:
+ao.srcFunc=args[0];
+ao.adviceFunc=args[1];
+break;
+case 3:
+if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
+ao.adviceType="after";
+ao.srcObj=args[0];
+ao.srcFunc=args[1];
+ao.adviceFunc=args[2];
+}else{
+if((dl.isString(args[1]))&&(dl.isString(args[2]))){
+ao.srcFunc=args[1];
+ao.adviceFunc=args[2];
+}else{
+if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
+ao.adviceType="after";
+ao.srcObj=args[0];
+ao.srcFunc=args[1];
+var _265=dl.nameAnonFunc(args[2],ao.adviceObj,_262);
+ao.adviceFunc=_265;
+}else{
+if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
+ao.adviceType="after";
+ao.srcObj=dj_global;
+var _265=dl.nameAnonFunc(args[0],ao.srcObj,_262);
+ao.srcFunc=_265;
+ao.adviceObj=args[1];
+ao.adviceFunc=args[2];
+}
+}
+}
+}
+break;
+case 4:
+if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){
+ao.adviceType="after";
+ao.srcObj=args[0];
+ao.srcFunc=args[1];
+ao.adviceObj=args[2];
+ao.adviceFunc=args[3];
+}else{
+if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){
+ao.adviceType=args[0];
+ao.srcObj=dj_global;
+ao.srcFunc=args[1];
+ao.adviceObj=args[2];
+ao.adviceFunc=args[3];
+}else{
+if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){
+ao.adviceType=args[0];
+ao.srcObj=dj_global;
+var _265=dl.nameAnonFunc(args[1],dj_global,_262);
+ao.srcFunc=_265;
+ao.adviceObj=args[2];
+ao.adviceFunc=args[3];
+}else{
+if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
+ao.srcObj=args[1];
+ao.srcFunc=args[2];
+var _265=dl.nameAnonFunc(args[3],dj_global,_262);
+ao.adviceObj=dj_global;
+ao.adviceFunc=_265;
+}else{
+if(dl.isObject(args[1])){
+ao.srcObj=args[1];
+ao.srcFunc=args[2];
+ao.adviceObj=dj_global;
+ao.adviceFunc=args[3];
+}else{
+if(dl.isObject(args[2])){
+ao.srcObj=dj_global;
+ao.srcFunc=args[1];
+ao.adviceObj=args[2];
+ao.adviceFunc=args[3];
+}else{
+ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
+ao.srcFunc=args[1];
+ao.adviceFunc=args[2];
+ao.aroundFunc=args[3];
+}
+}
+}
+}
+}
+}
+break;
+case 6:
+ao.srcObj=args[1];
+ao.srcFunc=args[2];
+ao.adviceObj=args[3];
+ao.adviceFunc=args[4];
+ao.aroundFunc=args[5];
+ao.aroundObj=dj_global;
+break;
+default:
+ao.srcObj=args[1];
+ao.srcFunc=args[2];
+ao.adviceObj=args[3];
+ao.adviceFunc=args[4];
+ao.aroundObj=args[5];
+ao.aroundFunc=args[6];
+ao.once=args[7];
+ao.delay=args[8];
+ao.rate=args[9];
+ao.adviceMsg=args[10];
+break;
+}
+if(dl.isFunction(ao.aroundFunc)){
+var _265=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_262);
+ao.aroundFunc=_265;
+}
+if(dl.isFunction(ao.srcFunc)){
+ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
+}
+if(dl.isFunction(ao.adviceFunc)){
+ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
+}
+if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
+ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
+}
+if(!ao.srcObj){
+dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
+}
+if(!ao.adviceObj){
+dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
+}
+return ao;
+}
+this.connect=function(){
+if(arguments.length==1){
+var ao=arguments[0];
+}else{
+var ao=interpolateArgs(arguments,true);
+}
+if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
+var _267={};
+for(var x in ao){
+_267[x]=ao[x];
+}
+var mjps=[];
+dojo.lang.forEach(ao.srcObj,function(src){
+if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
+src=dojo.byId(src);
+}
+_267.srcObj=src;
+mjps.push(dojo.event.connect.call(dojo.event,_267));
+});
+return mjps;
+}
+var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
+if(ao.adviceFunc){
+var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
+}
+mjp.kwAddAdvice(ao);
+return mjp;
+};
+this.log=function(a1,a2){
+var _26f;
+if((arguments.length==1)&&(typeof a1=="object")){
+_26f=a1;
+}else{
+_26f={srcObj:a1,srcFunc:a2};
+}
+_26f.adviceFunc=function(){
+var _270=[];
+for(var x=0;x=this.jp_.around.length){
+return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
+}else{
+var ti=this.jp_.around[this.around_index];
+var mobj=ti[0]||dj_global;
+var meth=ti[1];
+return mobj[meth].call(mobj,this);
+}
+};
+dojo.event.MethodJoinPoint=function(obj,_287){
+this.object=obj||dj_global;
+this.methodname=_287;
+this.methodfunc=this.object[_287];
+this.before=[];
+this.after=[];
+this.around=[];
+};
+dojo.event.MethodJoinPoint.getForMethod=function(obj,_289){
+if(!obj){
+obj=dj_global;
+}
+if(!obj[_289]){
+obj[_289]=function(){
+};
+if(!obj[_289]){
+dojo.raise("Cannot set do-nothing method on that object "+_289);
+}
+}else{
+if((!dojo.lang.isFunction(obj[_289]))&&(!dojo.lang.isAlien(obj[_289]))){
+return null;
+}
+}
+var _28a=_289+"$joinpoint";
+var _28b=_289+"$joinpoint$method";
+var _28c=obj[_28a];
+if(!_28c){
+var _28d=false;
+if(dojo.event["browser"]){
+if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
+_28d=true;
+dojo.event.browser.addClobberNodeAttrs(obj,[_28a,_28b,_289]);
+}
+}
+var _28e=obj[_289].length;
+obj[_28b]=obj[_289];
+_28c=obj[_28a]=new dojo.event.MethodJoinPoint(obj,_28b);
+obj[_289]=function(){
+var args=[];
+if((_28d)&&(!arguments.length)){
+var evt=null;
+try{
+if(obj.ownerDocument){
+evt=obj.ownerDocument.parentWindow.event;
+}else{
+if(obj.documentElement){
+evt=obj.documentElement.ownerDocument.parentWindow.event;
+}else{
+evt=window.event;
+}
+}
+}
+catch(e){
+evt=window.event;
+}
+if(evt){
+args.push(dojo.event.browser.fixEvent(evt,this));
+}
+}else{
+for(var x=0;x0){
+dojo.lang.forEach(this.before,_296);
+}
+var _2a6;
+if(this.around.length>0){
+var mi=new dojo.event.MethodInvocation(this,obj,args);
+_2a6=mi.proceed();
+}else{
+if(this.methodfunc){
+_2a6=this.object[this.methodname].apply(this.object,args);
+}
+}
+if(this.after.length>0){
+dojo.lang.forEach(this.after,_296);
+}
+return (this.methodfunc)?_2a6:null;
+},getArr:function(kind){
+var arr=this.after;
+if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
+arr=this.before;
+}else{
+if(kind=="around"){
+arr=this.around;
+}
+}
+return arr;
+},kwAddAdvice:function(args){
+this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"]);
+},addAdvice:function(_2ab,_2ac,_2ad,_2ae,_2af,_2b0,once,_2b2,rate,_2b4){
+var arr=this.getArr(_2af);
+if(!arr){
+dojo.raise("bad this: "+this);
+}
+var ao=[_2ab,_2ac,_2ad,_2ae,_2b2,rate,_2b4];
+if(once){
+if(this.hasAdvice(_2ab,_2ac,_2af,arr)>=0){
+return;
+}
+}
+if(_2b0=="first"){
+arr.unshift(ao);
+}else{
+arr.push(ao);
+}
+},hasAdvice:function(_2b7,_2b8,_2b9,arr){
+if(!arr){
+arr=this.getArr(_2b9);
+}
+var ind=-1;
+for(var x=0;x=0;i=i-1){
+var el=na[i];
+if(el["__clobberAttrs__"]){
+for(var j=0;j0){
+this.duration=_319;
+}
+if(_31c){
+this.repeatCount=_31c;
+}
+if(rate){
+this.rate=rate;
+}
+if(_318){
+this.handler=_318.handler;
+this.beforeBegin=_318.beforeBegin;
+this.onBegin=_318.onBegin;
+this.onEnd=_318.onEnd;
+this.onPlay=_318.onPlay;
+this.onPause=_318.onPause;
+this.onStop=_318.onStop;
+this.onAnimate=_318.onAnimate;
+}
+if(_31b&&dojo.lang.isFunction(_31b)){
+this.easing=_31b;
+}
+};
+dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);
+dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_31e,_31f){
+if(_31f){
+clearTimeout(this._timer);
+this._active=false;
+this._paused=false;
+this._percent=0;
+}else{
+if(this._active&&!this._paused){
+return this;
+}
+}
+this.fire("handler",["beforeBegin"]);
+this.fire("beforeBegin");
+if(_31e>0){
+setTimeout(dojo.lang.hitch(this,function(){
+this.play(null,_31f);
+}),_31e);
+return this;
+}
+this._startTime=new Date().valueOf();
+if(this._paused){
+this._startTime-=(this.duration*this._percent/100);
+}
+this._endTime=this._startTime+this.duration;
+this._active=true;
+this._paused=false;
+var step=this._percent/100;
+var _321=this.curve.getValue(step);
+if(this._percent==0){
+if(!this._startRepeatCount){
+this._startRepeatCount=this.repeatCount;
+}
+this.fire("handler",["begin",_321]);
+this.fire("onBegin",[_321]);
+}
+this.fire("handler",["play",_321]);
+this.fire("onPlay",[_321]);
+this._cycle();
+return this;
+},pause:function(){
+clearTimeout(this._timer);
+if(!this._active){
+return this;
+}
+this._paused=true;
+var _322=this.curve.getValue(this._percent/100);
+this.fire("handler",["pause",_322]);
+this.fire("onPause",[_322]);
+return this;
+},gotoPercent:function(pct,_324){
+clearTimeout(this._timer);
+this._active=true;
+this._paused=true;
+this._percent=pct;
+if(_324){
+this.play();
+}
+},stop:function(_325){
+clearTimeout(this._timer);
+var step=this._percent/100;
+if(_325){
+step=1;
+}
+var _327=this.curve.getValue(step);
+this.fire("handler",["stop",_327]);
+this.fire("onStop",[_327]);
+this._active=false;
+this._paused=false;
+return this;
+},status:function(){
+if(this._active){
+return this._paused?"paused":"playing";
+}else{
+return "stopped";
+}
+},_cycle:function(){
+clearTimeout(this._timer);
+if(this._active){
+var curr=new Date().valueOf();
+var step=(curr-this._startTime)/(this._endTime-this._startTime);
+if(step>=1){
+step=1;
+this._percent=100;
+}else{
+this._percent=step*100;
+}
+if((this.easing)&&(dojo.lang.isFunction(this.easing))){
+step=this.easing(step);
+}
+var _32a=this.curve.getValue(step);
+this.fire("handler",["animate",_32a]);
+this.fire("onAnimate",[_32a]);
+if(step<1){
+this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
+}else{
+this._active=false;
+this.fire("handler",["end"]);
+this.fire("onEnd");
+if(this.repeatCount>0){
+this.repeatCount--;
+this.play(null,true);
+}else{
+if(this.repeatCount==-1){
+this.play(null,true);
+}else{
+if(this._startRepeatCount){
+this.repeatCount=this._startRepeatCount;
+this._startRepeatCount=0;
+}
+}
+}
+}
+}
+return this;
+}});
+dojo.lfx.Combine=function(){
+dojo.lfx.IAnimation.call(this);
+this._anims=[];
+this._animsEnded=0;
+var _32b=arguments;
+if(_32b.length==1&&(dojo.lang.isArray(_32b[0])||dojo.lang.isArrayLike(_32b[0]))){
+_32b=_32b[0];
+}
+var _32c=this;
+dojo.lang.forEach(_32b,function(anim){
+_32c._anims.push(anim);
+var _32e=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_32e();
+_32c._onAnimsEnded();
+};
+});
+};
+dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);
+dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_32f,_330){
+if(!this._anims.length){
+return this;
+}
+this.fire("beforeBegin");
+if(_32f>0){
+setTimeout(dojo.lang.hitch(this,function(){
+this.play(null,_330);
+}),_32f);
+return this;
+}
+if(_330||this._anims[0].percent==0){
+this.fire("onBegin");
+}
+this.fire("onPlay");
+this._animsCall("play",null,_330);
+return this;
+},pause:function(){
+this.fire("onPause");
+this._animsCall("pause");
+return this;
+},stop:function(_331){
+this.fire("onStop");
+this._animsCall("stop",_331);
+return this;
+},_onAnimsEnded:function(){
+this._animsEnded++;
+if(this._animsEnded>=this._anims.length){
+this.fire("onEnd");
+}
+return this;
+},_animsCall:function(_332){
+var args=[];
+if(arguments.length>1){
+for(var i=1;i0){
+setTimeout(dojo.lang.hitch(this,function(){
+this.play(null,_33e);
+}),_33d);
+return this;
+}
+if(_33f){
+if(this._currAnim==0){
+this.fire("handler",["begin",this._currAnim]);
+this.fire("onBegin",[this._currAnim]);
+}
+this.fire("onPlay",[this._currAnim]);
+_33f.play(null,_33e);
+}
+return this;
+},pause:function(){
+if(this._anims[this._currAnim]){
+this._anims[this._currAnim].pause();
+this.fire("onPause",[this._currAnim]);
+}
+return this;
+},playPause:function(){
+if(this._anims.length==0){
+return this;
+}
+if(this._currAnim==-1){
+this._currAnim=0;
+}
+var _340=this._anims[this._currAnim];
+if(_340){
+if(!_340._active||_340._paused){
+this.play();
+}else{
+this.pause();
+}
+}
+return this;
+},stop:function(){
+var _341=this._anims[this._currAnim];
+if(_341){
+_341.stop();
+this.fire("onStop",[this._currAnim]);
+}
+return _341;
+},_playNext:function(){
+if(this._currAnim==-1||this._anims.length==0){
+return this;
+}
+this._currAnim++;
+if(this._anims[this._currAnim]){
+this._anims[this._currAnim].play(null,true);
+}
+return this;
+}});
+dojo.lfx.combine=function(){
+var _342=arguments;
+if(dojo.lang.isArray(arguments[0])){
+_342=arguments[0];
+}
+return new dojo.lfx.Combine(_342);
+};
+dojo.lfx.chain=function(){
+var _343=arguments;
+if(dojo.lang.isArray(arguments[0])){
+_343=arguments[0];
+}
+return new dojo.lfx.Chain(_343);
+};
+dojo.provide("dojo.graphics.color");
+dojo.require("dojo.lang.array");
+dojo.graphics.color.Color=function(r,g,b,a){
+if(dojo.lang.isArray(r)){
+this.r=r[0];
+this.g=r[1];
+this.b=r[2];
+this.a=r[3]||1;
+}else{
+if(dojo.lang.isString(r)){
+var rgb=dojo.graphics.color.extractRGB(r);
+this.r=rgb[0];
+this.g=rgb[1];
+this.b=rgb[2];
+this.a=g||1;
+}else{
+if(r instanceof dojo.graphics.color.Color){
+this.r=r.r;
+this.b=r.b;
+this.g=r.g;
+this.a=r.a;
+}else{
+this.r=r;
+this.g=g;
+this.b=b;
+this.a=a;
+}
+}
+}
+};
+dojo.graphics.color.Color.fromArray=function(arr){
+return new dojo.graphics.color.Color(arr[0],arr[1],arr[2],arr[3]);
+};
+dojo.lang.extend(dojo.graphics.color.Color,{toRgb:function(_34a){
+if(_34a){
+return this.toRgba();
+}else{
+return [this.r,this.g,this.b];
+}
+},toRgba:function(){
+return [this.r,this.g,this.b,this.a];
+},toHex:function(){
+return dojo.graphics.color.rgb2hex(this.toRgb());
+},toCss:function(){
+return "rgb("+this.toRgb().join()+")";
+},toString:function(){
+return this.toHex();
+},blend:function(_34b,_34c){
+return dojo.graphics.color.blend(this.toRgb(),new dojo.graphics.color.Color(_34b).toRgb(),_34c);
+}});
+dojo.graphics.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
+dojo.graphics.color.blend=function(a,b,_34f){
+if(typeof a=="string"){
+return dojo.graphics.color.blendHex(a,b,_34f);
+}
+if(!_34f){
+_34f=0;
+}else{
+if(_34f>1){
+_34f=1;
+}else{
+if(_34f<-1){
+_34f=-1;
+}
+}
+}
+var c=new Array(3);
+for(var i=0;i<3;i++){
+var half=Math.abs(a[i]-b[i])/2;
+c[i]=Math.floor(Math.min(a[i],b[i])+half+(half*_34f));
+}
+return c;
+};
+dojo.graphics.color.blendHex=function(a,b,_355){
+return dojo.graphics.color.rgb2hex(dojo.graphics.color.blend(dojo.graphics.color.hex2rgb(a),dojo.graphics.color.hex2rgb(b),_355));
+};
+dojo.graphics.color.extractRGB=function(_356){
+var hex="0123456789abcdef";
+_356=_356.toLowerCase();
+if(_356.indexOf("rgb")==0){
+var _358=_356.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
+var ret=_358.splice(1,3);
+return ret;
+}else{
+var _35a=dojo.graphics.color.hex2rgb(_356);
+if(_35a){
+return _35a;
+}else{
+return dojo.graphics.color.named[_356]||[255,255,255];
+}
+}
+};
+dojo.graphics.color.hex2rgb=function(hex){
+var _35c="0123456789ABCDEF";
+var rgb=new Array(3);
+if(hex.indexOf("#")==0){
+hex=hex.substring(1);
+}
+hex=hex.toUpperCase();
+if(hex.replace(new RegExp("["+_35c+"]","g"),"")!=""){
+return null;
+}
+if(hex.length==3){
+rgb[0]=hex.charAt(0)+hex.charAt(0);
+rgb[1]=hex.charAt(1)+hex.charAt(1);
+rgb[2]=hex.charAt(2)+hex.charAt(2);
+}else{
+rgb[0]=hex.substring(0,2);
+rgb[1]=hex.substring(2,4);
+rgb[2]=hex.substring(4);
+}
+for(var i=0;i0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){
+if(j==segs.length-1){
+segs.splice(j,1);
+segs[j-1]="";
+}else{
+segs.splice(j-1,2);
+j-=2;
+}
+}
+}
+}
+_36a.path=segs.join("/");
+}
+}
+}
+}
+uri="";
+if(_36a.scheme!=null){
+uri+=_36a.scheme+":";
+}
+if(_36a.authority!=null){
+uri+="//"+_36a.authority;
+}
+uri+=_36a.path;
+if(_36a.query!=null){
+uri+="?"+_36a.query;
+}
+if(_36a.fragment!=null){
+uri+="#"+_36a.fragment;
+}
+}
+this.uri=uri.toString();
+var _36f="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
+var r=this.uri.match(new RegExp(_36f));
+this.scheme=r[2]||(r[1]?"":null);
+this.authority=r[4]||(r[3]?"":null);
+this.path=r[5];
+this.query=r[7]||(r[6]?"":null);
+this.fragment=r[9]||(r[8]?"":null);
+if(this.authority!=null){
+_36f="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
+r=this.authority.match(new RegExp(_36f));
+this.user=r[3]||null;
+this.password=r[4]||null;
+this.host=r[5];
+this.port=r[7]||null;
+}
+this.toString=function(){
+return this.uri;
+};
+};
+};
+dojo.provide("dojo.style");
+dojo.require("dojo.graphics.color");
+dojo.require("dojo.uri.Uri");
+dojo.require("dojo.lang.common");
+(function(){
+var h=dojo.render.html;
+var ds=dojo.style;
+var db=document["body"]||document["documentElement"];
+ds.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};
+var bs=ds.boxSizing;
+ds.getBoxSizing=function(node){
+if((h.ie)||(h.opera)){
+var cm=document["compatMode"];
+if((cm=="BackCompat")||(cm=="QuirksMode")){
+return bs.BORDER_BOX;
+}else{
+return bs.CONTENT_BOX;
+}
+}else{
+if(arguments.length==0){
+node=document.documentElement;
+}
+var _377=ds.getStyle(node,"-moz-box-sizing");
+if(!_377){
+_377=ds.getStyle(node,"box-sizing");
+}
+return (_377?_377:bs.CONTENT_BOX);
+}
+};
+ds.isBorderBox=function(node){
+return (ds.getBoxSizing(node)==bs.BORDER_BOX);
+};
+ds.getUnitValue=function(node,_37a,_37b){
+var s=ds.getComputedStyle(node,_37a);
+if((!s)||((s=="auto")&&(_37b))){
+return {value:0,units:"px"};
+}
+if(dojo.lang.isUndefined(s)){
+return ds.getUnitValue.bad;
+}
+var _37d=s.match(/(\-?[\d.]+)([a-z%]*)/i);
+if(!_37d){
+return ds.getUnitValue.bad;
+}
+return {value:Number(_37d[1]),units:_37d[2].toLowerCase()};
+};
+ds.getUnitValue.bad={value:NaN,units:""};
+ds.getPixelValue=function(node,_37f,_380){
+var _381=ds.getUnitValue(node,_37f,_380);
+if(isNaN(_381.value)){
+return 0;
+}
+if((_381.value)&&(_381.units!="px")){
+return NaN;
+}
+return _381.value;
+};
+ds.getNumericStyle=function(){
+dojo.deprecated("dojo.(style|html).getNumericStyle","in favor of dojo.(style|html).getPixelValue","0.4");
+return ds.getPixelValue.apply(this,arguments);
+};
+ds.setPositivePixelValue=function(node,_383,_384){
+if(isNaN(_384)){
+return false;
+}
+node.style[_383]=Math.max(0,_384)+"px";
+return true;
+};
+ds._sumPixelValues=function(node,_386,_387){
+var _388=0;
+for(var x=0;x<_386.length;x++){
+_388+=ds.getPixelValue(node,_386[x],_387);
+}
+return _388;
+};
+ds.isPositionAbsolute=function(node){
+return (ds.getComputedStyle(node,"position")=="absolute");
+};
+ds.getBorderExtent=function(node,side){
+return (ds.getStyle(node,"border-"+side+"-style")=="none"?0:ds.getPixelValue(node,"border-"+side+"-width"));
+};
+ds.getMarginWidth=function(node){
+return ds._sumPixelValues(node,["margin-left","margin-right"],ds.isPositionAbsolute(node));
+};
+ds.getBorderWidth=function(node){
+return ds.getBorderExtent(node,"left")+ds.getBorderExtent(node,"right");
+};
+ds.getPaddingWidth=function(node){
+return ds._sumPixelValues(node,["padding-left","padding-right"],true);
+};
+ds.getPadBorderWidth=function(node){
+return ds.getPaddingWidth(node)+ds.getBorderWidth(node);
+};
+ds.getContentBoxWidth=function(node){
+node=dojo.byId(node);
+return node.offsetWidth-ds.getPadBorderWidth(node);
+};
+ds.getBorderBoxWidth=function(node){
+node=dojo.byId(node);
+return node.offsetWidth;
+};
+ds.getMarginBoxWidth=function(node){
+return ds.getInnerWidth(node)+ds.getMarginWidth(node);
+};
+ds.setContentBoxWidth=function(node,_395){
+node=dojo.byId(node);
+if(ds.isBorderBox(node)){
+_395+=ds.getPadBorderWidth(node);
+}
+return ds.setPositivePixelValue(node,"width",_395);
+};
+ds.setMarginBoxWidth=function(node,_397){
+node=dojo.byId(node);
+if(!ds.isBorderBox(node)){
+_397-=ds.getPadBorderWidth(node);
+}
+_397-=ds.getMarginWidth(node);
+return ds.setPositivePixelValue(node,"width",_397);
+};
+ds.getContentWidth=ds.getContentBoxWidth;
+ds.getInnerWidth=ds.getBorderBoxWidth;
+ds.getOuterWidth=ds.getMarginBoxWidth;
+ds.setContentWidth=ds.setContentBoxWidth;
+ds.setOuterWidth=ds.setMarginBoxWidth;
+ds.getMarginHeight=function(node){
+return ds._sumPixelValues(node,["margin-top","margin-bottom"],ds.isPositionAbsolute(node));
+};
+ds.getBorderHeight=function(node){
+return ds.getBorderExtent(node,"top")+ds.getBorderExtent(node,"bottom");
+};
+ds.getPaddingHeight=function(node){
+return ds._sumPixelValues(node,["padding-top","padding-bottom"],true);
+};
+ds.getPadBorderHeight=function(node){
+return ds.getPaddingHeight(node)+ds.getBorderHeight(node);
+};
+ds.getContentBoxHeight=function(node){
+node=dojo.byId(node);
+return node.offsetHeight-ds.getPadBorderHeight(node);
+};
+ds.getBorderBoxHeight=function(node){
+node=dojo.byId(node);
+return node.offsetHeight;
+};
+ds.getMarginBoxHeight=function(node){
+return ds.getInnerHeight(node)+ds.getMarginHeight(node);
+};
+ds.setContentBoxHeight=function(node,_3a0){
+node=dojo.byId(node);
+if(ds.isBorderBox(node)){
+_3a0+=ds.getPadBorderHeight(node);
+}
+return ds.setPositivePixelValue(node,"height",_3a0);
+};
+ds.setMarginBoxHeight=function(node,_3a2){
+node=dojo.byId(node);
+if(!ds.isBorderBox(node)){
+_3a2-=ds.getPadBorderHeight(node);
+}
+_3a2-=ds.getMarginHeight(node);
+return ds.setPositivePixelValue(node,"height",_3a2);
+};
+ds.getContentHeight=ds.getContentBoxHeight;
+ds.getInnerHeight=ds.getBorderBoxHeight;
+ds.getOuterHeight=ds.getMarginBoxHeight;
+ds.setContentHeight=ds.setContentBoxHeight;
+ds.setOuterHeight=ds.setMarginBoxHeight;
+ds.getAbsolutePosition=ds.abs=function(node,_3a4){
+node=dojo.byId(node);
+var ret=[];
+ret.x=ret.y=0;
+var st=dojo.html.getScrollTop();
+var sl=dojo.html.getScrollLeft();
+if(h.ie){
+with(node.getBoundingClientRect()){
+ret.x=left-2;
+ret.y=top-2;
+}
+}else{
+if(document.getBoxObjectFor){
+var bo=document.getBoxObjectFor(node);
+ret.x=bo.x-ds.sumAncestorProperties(node,"scrollLeft");
+ret.y=bo.y-ds.sumAncestorProperties(node,"scrollTop");
+}else{
+if(node["offsetParent"]){
+var _3a9;
+if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
+_3a9=db;
+}else{
+_3a9=db.parentNode;
+}
+if(node.parentNode!=db){
+var nd=node;
+if(window.opera){
+nd=db;
+}
+ret.x-=ds.sumAncestorProperties(nd,"scrollLeft");
+ret.y-=ds.sumAncestorProperties(nd,"scrollTop");
+}
+do{
+var n=node["offsetLeft"];
+ret.x+=isNaN(n)?0:n;
+var m=node["offsetTop"];
+ret.y+=isNaN(m)?0:m;
+node=node.offsetParent;
+}while((node!=_3a9)&&(node!=null));
+}else{
+if(node["x"]&&node["y"]){
+ret.x+=isNaN(node.x)?0:node.x;
+ret.y+=isNaN(node.y)?0:node.y;
+}
+}
+}
+}
+if(_3a4){
+ret.y+=st;
+ret.x+=sl;
+}
+ret[0]=ret.x;
+ret[1]=ret.y;
+return ret;
+};
+ds.sumAncestorProperties=function(node,prop){
+node=dojo.byId(node);
+if(!node){
+return 0;
+}
+var _3af=0;
+while(node){
+var val=node[prop];
+if(val){
+_3af+=val-0;
+if(node==document.body){
+break;
+}
+}
+node=node.parentNode;
+}
+return _3af;
+};
+ds.getTotalOffset=function(node,type,_3b3){
+return ds.abs(node,_3b3)[(type=="top")?"y":"x"];
+};
+ds.getAbsoluteX=ds.totalOffsetLeft=function(node,_3b5){
+return ds.getTotalOffset(node,"left",_3b5);
+};
+ds.getAbsoluteY=ds.totalOffsetTop=function(node,_3b7){
+return ds.getTotalOffset(node,"top",_3b7);
+};
+ds.styleSheet=null;
+ds.insertCssRule=function(_3b8,_3b9,_3ba){
+if(!ds.styleSheet){
+if(document.createStyleSheet){
+ds.styleSheet=document.createStyleSheet();
+}else{
+if(document.styleSheets[0]){
+ds.styleSheet=document.styleSheets[0];
+}else{
+return null;
+}
+}
+}
+if(arguments.length<3){
+if(ds.styleSheet.cssRules){
+_3ba=ds.styleSheet.cssRules.length;
+}else{
+if(ds.styleSheet.rules){
+_3ba=ds.styleSheet.rules.length;
+}else{
+return null;
+}
+}
+}
+if(ds.styleSheet.insertRule){
+var rule=_3b8+" { "+_3b9+" }";
+return ds.styleSheet.insertRule(rule,_3ba);
+}else{
+if(ds.styleSheet.addRule){
+return ds.styleSheet.addRule(_3b8,_3b9,_3ba);
+}else{
+return null;
+}
+}
+};
+ds.removeCssRule=function(_3bc){
+if(!ds.styleSheet){
+dojo.debug("no stylesheet defined for removing rules");
+return false;
+}
+if(h.ie){
+if(!_3bc){
+_3bc=ds.styleSheet.rules.length;
+ds.styleSheet.removeRule(_3bc);
+}
+}else{
+if(document.styleSheets[0]){
+if(!_3bc){
+_3bc=ds.styleSheet.cssRules.length;
+}
+ds.styleSheet.deleteRule(_3bc);
+}
+}
+return true;
+};
+ds.insertCssFile=function(URI,doc,_3bf){
+if(!URI){
+return;
+}
+if(!doc){
+doc=document;
+}
+var _3c0=dojo.hostenv.getText(URI);
+_3c0=ds.fixPathsInCssText(_3c0,URI);
+if(_3bf){
+var _3c1=doc.getElementsByTagName("style");
+var _3c2="";
+for(var i=0;i<_3c1.length;i++){
+_3c2=(_3c1[i].styleSheet&&_3c1[i].styleSheet.cssText)?_3c1[i].styleSheet.cssText:_3c1[i].innerHTML;
+if(_3c0==_3c2){
+return;
+}
+}
+}
+var _3c4=ds.insertCssText(_3c0);
+if(_3c4&&djConfig.isDebug){
+_3c4.setAttribute("dbgHref",URI);
+}
+return _3c4;
+};
+ds.insertCssText=function(_3c5,doc,URI){
+if(!_3c5){
+return;
+}
+if(!doc){
+doc=document;
+}
+if(URI){
+_3c5=ds.fixPathsInCssText(_3c5,URI);
+}
+var _3c8=doc.createElement("style");
+_3c8.setAttribute("type","text/css");
+var head=doc.getElementsByTagName("head")[0];
+if(!head){
+dojo.debug("No head tag in document, aborting styles");
+return;
+}else{
+head.appendChild(_3c8);
+}
+if(_3c8.styleSheet){
+_3c8.styleSheet.cssText=_3c5;
+}else{
+var _3ca=doc.createTextNode(_3c5);
+_3c8.appendChild(_3ca);
+}
+return _3c8;
+};
+ds.fixPathsInCssText=function(_3cb,URI){
+if(!_3cb||!URI){
+return;
+}
+var pos=0;
+var str="";
+var url="";
+while(pos!=-1){
+pos=0;
+url="";
+pos=_3cb.indexOf("url(",pos);
+if(pos<0){
+break;
+}
+str+=_3cb.slice(0,pos+4);
+_3cb=_3cb.substring(pos+4,_3cb.length);
+url+=_3cb.match(/^[\t\s\w()\/.\\'"-:#=&?]*\)/)[0];
+_3cb=_3cb.substring(url.length-1,_3cb.length);
+url=url.replace(/^[\s\t]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s\t]*?\)/,"$2");
+if(url.search(/(file|https?|ftps?):\/\//)==-1){
+url=(new dojo.uri.Uri(URI,url).toString());
+}
+str+=url;
+}
+return str+_3cb;
+};
+ds.getBackgroundColor=function(node){
+node=dojo.byId(node);
+var _3d1;
+do{
+_3d1=ds.getStyle(node,"background-color");
+if(_3d1.toLowerCase()=="rgba(0, 0, 0, 0)"){
+_3d1="transparent";
+}
+if(node==document.getElementsByTagName("body")[0]){
+node=null;
+break;
+}
+node=node.parentNode;
+}while(node&&dojo.lang.inArray(_3d1,["transparent",""]));
+if(_3d1=="transparent"){
+_3d1=[255,255,255,0];
+}else{
+_3d1=dojo.graphics.color.extractRGB(_3d1);
+}
+return _3d1;
+};
+ds.getComputedStyle=function(node,_3d3,_3d4){
+node=dojo.byId(node);
+var _3d3=ds.toSelectorCase(_3d3);
+var _3d5=ds.toCamelCase(_3d3);
+if(!node||!node.style){
+return _3d4;
+}else{
+if(document.defaultView){
+try{
+var cs=document.defaultView.getComputedStyle(node,"");
+if(cs){
+return cs.getPropertyValue(_3d3);
+}
+}
+catch(e){
+if(node.style.getPropertyValue){
+return node.style.getPropertyValue(_3d3);
+}else{
+return _3d4;
+}
+}
+}else{
+if(node.currentStyle){
+return node.currentStyle[_3d5];
+}
+}
+}
+if(node.style.getPropertyValue){
+return node.style.getPropertyValue(_3d3);
+}else{
+return _3d4;
+}
+};
+ds.getStyleProperty=function(node,_3d8){
+node=dojo.byId(node);
+return (node&&node.style?node.style[ds.toCamelCase(_3d8)]:undefined);
+};
+ds.getStyle=function(node,_3da){
+var _3db=ds.getStyleProperty(node,_3da);
+return (_3db?_3db:ds.getComputedStyle(node,_3da));
+};
+ds.setStyle=function(node,_3dd,_3de){
+node=dojo.byId(node);
+if(node&&node.style){
+var _3df=ds.toCamelCase(_3dd);
+node.style[_3df]=_3de;
+}
+};
+ds.toCamelCase=function(_3e0){
+var arr=_3e0.split("-"),cc=arr[0];
+for(var i=1;i=1){
+if(h.ie){
+ds.clearOpacity(node);
+return;
+}else{
+_3e5=0.999999;
+}
+}else{
+if(_3e5<0){
+_3e5=0;
+}
+}
+}
+if(h.ie){
+if(node.nodeName.toLowerCase()=="tr"){
+var tds=node.getElementsByTagName("td");
+for(var x=0;x=0.999999?1:Number(opac);
+};
+ds.clearOpacity=function clearOpacity(node){
+node=dojo.byId(node);
+var ns=node.style;
+if(h.ie){
+try{
+if(node.filters&&node.filters.alpha){
+ns.filter="";
+}
+}
+catch(e){
+}
+}else{
+if(h.moz){
+ns.opacity=1;
+ns.MozOpacity=1;
+}else{
+if(h.safari){
+ns.opacity=1;
+ns.KhtmlOpacity=1;
+}else{
+ns.opacity=1;
+}
+}
+}
+};
+ds.setStyleAttributes=function(node,_3ee){
+var _3ef={"opacity":dojo.style.setOpacity,"content-height":dojo.style.setContentHeight,"content-width":dojo.style.setContentWidth,"outer-height":dojo.style.setOuterHeight,"outer-width":dojo.style.setOuterWidth};
+var _3f0=_3ee.replace(/(;)?\s*$/,"").split(";");
+for(var i=0;i<_3f0.length;i++){
+var _3f2=_3f0[i].split(":");
+var name=_3f2[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
+var _3f4=_3f2[1].replace(/\s*$/,"").replace(/^\s*/,"");
+if(dojo.lang.has(_3ef,name)){
+_3ef[name](node,_3f4);
+}else{
+node.style[dojo.style.toCamelCase(name)]=_3f4;
+}
+}
+};
+ds._toggle=function(node,_3f6,_3f7){
+node=dojo.byId(node);
+_3f7(node,!_3f6(node));
+return _3f6(node);
+};
+ds.show=function(node){
+node=dojo.byId(node);
+if(ds.getStyleProperty(node,"display")=="none"){
+ds.setStyle(node,"display",(node.dojoDisplayCache||""));
+node.dojoDisplayCache=undefined;
+}
+};
+ds.hide=function(node){
+node=dojo.byId(node);
+if(typeof node["dojoDisplayCache"]=="undefined"){
+var d=ds.getStyleProperty(node,"display");
+if(d!="none"){
+node.dojoDisplayCache=d;
+}
+}
+ds.setStyle(node,"display","none");
+};
+ds.setShowing=function(node,_3fc){
+ds[(_3fc?"show":"hide")](node);
+};
+ds.isShowing=function(node){
+return (ds.getStyleProperty(node,"display")!="none");
+};
+ds.toggleShowing=function(node){
+return ds._toggle(node,ds.isShowing,ds.setShowing);
+};
+ds.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
+ds.suggestDisplayByTagName=function(node){
+node=dojo.byId(node);
+if(node&&node.tagName){
+var tag=node.tagName.toLowerCase();
+return (tag in ds.displayMap?ds.displayMap[tag]:"block");
+}
+};
+ds.setDisplay=function(node,_402){
+ds.setStyle(node,"display",(dojo.lang.isString(_402)?_402:(_402?ds.suggestDisplayByTagName(node):"none")));
+};
+ds.isDisplayed=function(node){
+return (ds.getComputedStyle(node,"display")!="none");
+};
+ds.toggleDisplay=function(node){
+return ds._toggle(node,ds.isDisplayed,ds.setDisplay);
+};
+ds.setVisibility=function(node,_406){
+ds.setStyle(node,"visibility",(dojo.lang.isString(_406)?_406:(_406?"visible":"hidden")));
+};
+ds.isVisible=function(node){
+return (ds.getComputedStyle(node,"visibility")!="hidden");
+};
+ds.toggleVisibility=function(node){
+return ds._toggle(node,ds.isVisible,ds.setVisibility);
+};
+ds.toCoordinateArray=function(_409,_40a){
+if(dojo.lang.isArray(_409)){
+while(_409.length<4){
+_409.push(0);
+}
+while(_409.length>4){
+_409.pop();
+}
+var ret=_409;
+}else{
+var node=dojo.byId(_409);
+var pos=ds.getAbsolutePosition(node,_40a);
+var ret=[pos.x,pos.y,ds.getBorderBoxWidth(node),ds.getBorderBoxHeight(node)];
+}
+ret.x=ret[0];
+ret.y=ret[1];
+ret.w=ret[2];
+ret.h=ret[3];
+return ret;
+};
+})();
+dojo.provide("dojo.html");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.dom");
+dojo.require("dojo.style");
+dojo.require("dojo.string");
+dojo.lang.mixin(dojo.html,dojo.dom);
+dojo.lang.mixin(dojo.html,dojo.style);
+dojo.html.clearSelection=function(){
+try{
+if(window["getSelection"]){
+if(dojo.render.html.safari){
+window.getSelection().collapse();
+}else{
+window.getSelection().removeAllRanges();
+}
+}else{
+if(document.selection){
+if(document.selection.empty){
+document.selection.empty();
+}else{
+if(document.selection.clear){
+document.selection.clear();
+}
+}
+}
+}
+return true;
+}
+catch(e){
+dojo.debug(e);
+return false;
+}
+};
+dojo.html.disableSelection=function(_40e){
+_40e=dojo.byId(_40e)||document.body;
+var h=dojo.render.html;
+if(h.mozilla){
+_40e.style.MozUserSelect="none";
+}else{
+if(h.safari){
+_40e.style.KhtmlUserSelect="none";
+}else{
+if(h.ie){
+_40e.unselectable="on";
+}else{
+return false;
+}
+}
+}
+return true;
+};
+dojo.html.enableSelection=function(_410){
+_410=dojo.byId(_410)||document.body;
+var h=dojo.render.html;
+if(h.mozilla){
+_410.style.MozUserSelect="";
+}else{
+if(h.safari){
+_410.style.KhtmlUserSelect="";
+}else{
+if(h.ie){
+_410.unselectable="off";
+}else{
+return false;
+}
+}
+}
+return true;
+};
+dojo.html.selectElement=function(_412){
+_412=dojo.byId(_412);
+if(document.selection&&document.body.createTextRange){
+var _413=document.body.createTextRange();
+_413.moveToElementText(_412);
+_413.select();
+}else{
+if(window["getSelection"]){
+var _414=window.getSelection();
+if(_414["selectAllChildren"]){
+_414.selectAllChildren(_412);
+}
+}
+}
+};
+dojo.html.selectInputText=function(_415){
+_415=dojo.byId(_415);
+if(document.selection&&document.body.createTextRange){
+var _416=_415.createTextRange();
+_416.moveStart("character",0);
+_416.moveEnd("character",_415.value.length);
+_416.select();
+}else{
+if(window["getSelection"]){
+var _417=window.getSelection();
+_415.setSelectionRange(0,_415.value.length);
+}
+}
+_415.focus();
+};
+dojo.html.isSelectionCollapsed=function(){
+if(document["selection"]){
+return document.selection.createRange().text=="";
+}else{
+if(window["getSelection"]){
+var _418=window.getSelection();
+if(dojo.lang.isString(_418)){
+return _418=="";
+}else{
+return _418.isCollapsed;
+}
+}
+}
+};
+dojo.html.getEventTarget=function(evt){
+if(!evt){
+evt=window.event||{};
+}
+var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
+while((t)&&(t.nodeType!=1)){
+t=t.parentNode;
+}
+return t;
+};
+dojo.html.getDocumentWidth=function(){
+dojo.deprecated("dojo.html.getDocument*","replaced by dojo.html.getViewport*","0.4");
+return dojo.html.getViewportWidth();
+};
+dojo.html.getDocumentHeight=function(){
+dojo.deprecated("dojo.html.getDocument*","replaced by dojo.html.getViewport*","0.4");
+return dojo.html.getViewportHeight();
+};
+dojo.html.getDocumentSize=function(){
+dojo.deprecated("dojo.html.getDocument*","replaced of dojo.html.getViewport*","0.4");
+return dojo.html.getViewportSize();
+};
+dojo.html.getViewportWidth=function(){
+var w=0;
+if(window.innerWidth){
+w=window.innerWidth;
+}
+if(dojo.exists(document,"documentElement.clientWidth")){
+var w2=document.documentElement.clientWidth;
+if(!w||w2&&w2=left&&_456.x<=_45a&&_456.y>=top&&_456.y<=_458);
+};
+dojo.html.setActiveStyleSheet=function(_45b){
+var i=0,a,els=document.getElementsByTagName("link");
+while(a=els[i++]){
+if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
+a.disabled=true;
+if(a.getAttribute("title")==_45b){
+a.disabled=false;
+}
+}
+}
+};
+dojo.html.getActiveStyleSheet=function(){
+var i=0,a,els=document.getElementsByTagName("link");
+while(a=els[i++]){
+if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){
+return a.getAttribute("title");
+}
+}
+return null;
+};
+dojo.html.getPreferredStyleSheet=function(){
+var i=0,a,els=document.getElementsByTagName("link");
+while(a=els[i++]){
+if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){
+return a.getAttribute("title");
+}
+}
+return null;
+};
+dojo.html.body=function(){
+return document.body||document.getElementsByTagName("body")[0];
+};
+dojo.html.isTag=function(node){
+node=dojo.byId(node);
+if(node&&node.tagName){
+var arr=dojo.lang.map(dojo.lang.toArray(arguments,1),function(a){
+return String(a).toLowerCase();
+});
+return arr[dojo.lang.find(node.tagName.toLowerCase(),arr)]||"";
+}
+return "";
+};
+dojo.html.copyStyle=function(_462,_463){
+if(dojo.lang.isUndefined(_463.style.cssText)){
+_462.setAttribute("style",_463.getAttribute("style"));
+}else{
+_462.style.cssText=_463.style.cssText;
+}
+dojo.html.addClass(_462,dojo.html.getClass(_463));
+};
+dojo.html._callExtrasDeprecated=function(_464,args){
+var _466="dojo.html.extras";
+dojo.deprecated("dojo.html."+_464,"moved to "+_466,"0.4");
+dojo["require"](_466);
+return dojo.html[_464].apply(dojo.html,args);
+};
+dojo.html.createNodesFromText=function(){
+return dojo.html._callExtrasDeprecated("createNodesFromText",arguments);
+};
+dojo.html.gravity=function(){
+return dojo.html._callExtrasDeprecated("gravity",arguments);
+};
+dojo.html.placeOnScreen=function(){
+return dojo.html._callExtrasDeprecated("placeOnScreen",arguments);
+};
+dojo.html.placeOnScreenPoint=function(){
+return dojo.html._callExtrasDeprecated("placeOnScreenPoint",arguments);
+};
+dojo.html.renderedTextContent=function(){
+return dojo.html._callExtrasDeprecated("renderedTextContent",arguments);
+};
+dojo.html.BackgroundIframe=function(){
+return dojo.html._callExtrasDeprecated("BackgroundIframe",arguments);
+};
+dojo.provide("dojo.lfx.html");
+dojo.require("dojo.lfx.Animation");
+dojo.require("dojo.html");
+dojo.lfx.html._byId=function(_467){
+if(!_467){
+return [];
+}
+if(dojo.lang.isArray(_467)){
+if(!_467.alreadyChecked){
+var n=[];
+dojo.lang.forEach(_467,function(node){
+n.push(dojo.byId(node));
+});
+n.alreadyChecked=true;
+return n;
+}else{
+return _467;
+}
+}else{
+var n=[];
+n.push(dojo.byId(_467));
+n.alreadyChecked=true;
+return n;
+}
+};
+dojo.lfx.html.propertyAnimation=function(_46a,_46b,_46c,_46d){
+_46a=dojo.lfx.html._byId(_46a);
+if(_46a.length==1){
+dojo.lang.forEach(_46b,function(prop){
+if(typeof prop["start"]=="undefined"){
+if(prop.property!="opacity"){
+prop.start=parseInt(dojo.style.getComputedStyle(_46a[0],prop.property));
+}else{
+prop.start=dojo.style.getOpacity(_46a[0]);
+}
+}
+});
+}
+var _46f=function(_470){
+var _471=new Array(_470.length);
+for(var i=0;i<_470.length;i++){
+_471[i]=Math.round(_470[i]);
+}
+return _471;
+};
+var _473=function(n,_475){
+n=dojo.byId(n);
+if(!n||!n.style){
+return;
+}
+for(var s in _475){
+if(s=="opacity"){
+dojo.style.setOpacity(n,_475[s]);
+}else{
+n.style[s]=_475[s];
+}
+}
+};
+var _477=function(_478){
+this._properties=_478;
+this.diffs=new Array(_478.length);
+dojo.lang.forEach(_478,function(prop,i){
+if(dojo.lang.isArray(prop.start)){
+this.diffs[i]=null;
+}else{
+if(prop.start instanceof dojo.graphics.color.Color){
+prop.startRgb=prop.start.toRgb();
+prop.endRgb=prop.end.toRgb();
+}else{
+this.diffs[i]=prop.end-prop.start;
+}
+}
+},this);
+this.getValue=function(n){
+var ret={};
+dojo.lang.forEach(this._properties,function(prop,i){
+var _47f=null;
+if(dojo.lang.isArray(prop.start)){
+}else{
+if(prop.start instanceof dojo.graphics.color.Color){
+_47f=(prop.units||"rgb")+"(";
+for(var j=0;j1){
+return dojo.lfx.combine(_4a2);
+}else{
+return _4a2[0];
+}
+};
+dojo.lfx.html.wipeOut=function(_4a7,_4a8,_4a9,_4aa){
+_4a7=dojo.lfx.html._byId(_4a7);
+var _4ab=[];
+dojo.lang.forEach(_4a7,function(node){
+var _4ad=dojo.style.getStyle(node,"overflow");
+if(_4ad=="visible"){
+node.style.overflow="hidden";
+}
+dojo.style.show(node);
+var anim=dojo.lfx.propertyAnimation(node,[{property:"height",start:dojo.style.getContentBoxHeight(node),end:0}],_4a8,_4a9);
+var _4af=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4af();
+dojo.style.hide(node);
+node.style.overflow=_4ad;
+if(_4aa){
+_4aa(node,anim);
+}
+};
+_4ab.push(anim);
+});
+if(_4a7.length>1){
+return dojo.lfx.combine(_4ab);
+}else{
+return _4ab[0];
+}
+};
+dojo.lfx.html.slideTo=function(_4b0,_4b1,_4b2,_4b3,_4b4){
+_4b0=dojo.lfx.html._byId(_4b0);
+var _4b5=[];
+dojo.lang.forEach(_4b0,function(node){
+var top=null;
+var left=null;
+var init=(function(){
+var _4ba=node;
+return function(){
+top=_4ba.offsetTop;
+left=_4ba.offsetLeft;
+if(!dojo.style.isPositionAbsolute(_4ba)){
+var ret=dojo.style.abs(_4ba,true);
+dojo.style.setStyleAttributes(_4ba,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
+top=ret.y;
+left=ret.x;
+}
+};
+})();
+init();
+var anim=dojo.lfx.propertyAnimation(node,[{property:"top",start:top,end:_4b1[0]},{property:"left",start:left,end:_4b1[1]}],_4b2,_4b3);
+var _4bd=(anim["beforeBegin"])?dojo.lang.hitch(anim,"beforeBegin"):function(){
+};
+anim.beforeBegin=function(){
+_4bd();
+init();
+};
+if(_4b4){
+var _4be=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4be();
+_4b4(_4b0,anim);
+};
+}
+_4b5.push(anim);
+});
+if(_4b0.length>1){
+return dojo.lfx.combine(_4b5);
+}else{
+return _4b5[0];
+}
+};
+dojo.lfx.html.slideBy=function(_4bf,_4c0,_4c1,_4c2,_4c3){
+_4bf=dojo.lfx.html._byId(_4bf);
+var _4c4=[];
+dojo.lang.forEach(_4bf,function(node){
+var top=null;
+var left=null;
+var init=(function(){
+var _4c9=node;
+return function(){
+top=node.offsetTop;
+left=node.offsetLeft;
+if(!dojo.style.isPositionAbsolute(_4c9)){
+var ret=dojo.style.abs(_4c9);
+dojo.style.setStyleAttributes(_4c9,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
+top=ret.y;
+left=ret.x;
+}
+};
+})();
+init();
+var anim=dojo.lfx.propertyAnimation(node,[{property:"top",start:top,end:top+_4c0[0]},{property:"left",start:left,end:left+_4c0[1]}],_4c1,_4c2);
+var _4cc=(anim["beforeBegin"])?dojo.lang.hitch(anim,"beforeBegin"):function(){
+};
+anim.beforeBegin=function(){
+_4cc();
+init();
+};
+if(_4c3){
+var _4cd=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4cd();
+_4c3(_4bf,anim);
+};
+}
+_4c4.push(anim);
+});
+if(_4bf.length>1){
+return dojo.lfx.combine(_4c4);
+}else{
+return _4c4[0];
+}
+};
+dojo.lfx.html.explode=function(_4ce,_4cf,_4d0,_4d1,_4d2){
+_4ce=dojo.byId(_4ce);
+_4cf=dojo.byId(_4cf);
+var _4d3=dojo.style.toCoordinateArray(_4ce,true);
+var _4d4=document.createElement("div");
+dojo.html.copyStyle(_4d4,_4cf);
+with(_4d4.style){
+position="absolute";
+display="none";
+}
+document.body.appendChild(_4d4);
+with(_4cf.style){
+visibility="hidden";
+display="block";
+}
+var _4d5=dojo.style.toCoordinateArray(_4cf,true);
+with(_4cf.style){
+display="none";
+visibility="visible";
+}
+var anim=new dojo.lfx.propertyAnimation(_4d4,[{property:"height",start:_4d3[3],end:_4d5[3]},{property:"width",start:_4d3[2],end:_4d5[2]},{property:"top",start:_4d3[1],end:_4d5[1]},{property:"left",start:_4d3[0],end:_4d5[0]},{property:"opacity",start:0.3,end:1}],_4d0,_4d1);
+anim.beforeBegin=function(){
+dojo.style.setDisplay(_4d4,"block");
+};
+anim.onEnd=function(){
+dojo.style.setDisplay(_4cf,"block");
+_4d4.parentNode.removeChild(_4d4);
+};
+if(_4d2){
+var _4d7=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4d7();
+_4d2(_4cf,anim);
+};
+}
+return anim;
+};
+dojo.lfx.html.implode=function(_4d8,end,_4da,_4db,_4dc){
+_4d8=dojo.byId(_4d8);
+end=dojo.byId(end);
+var _4dd=dojo.style.toCoordinateArray(_4d8,true);
+var _4de=dojo.style.toCoordinateArray(end,true);
+var _4df=document.createElement("div");
+dojo.html.copyStyle(_4df,_4d8);
+dojo.style.setOpacity(_4df,0.3);
+with(_4df.style){
+position="absolute";
+display="none";
+}
+document.body.appendChild(_4df);
+var anim=new dojo.lfx.propertyAnimation(_4df,[{property:"height",start:_4dd[3],end:_4de[3]},{property:"width",start:_4dd[2],end:_4de[2]},{property:"top",start:_4dd[1],end:_4de[1]},{property:"left",start:_4dd[0],end:_4de[0]},{property:"opacity",start:1,end:0.3}],_4da,_4db);
+anim.beforeBegin=function(){
+dojo.style.hide(_4d8);
+dojo.style.show(_4df);
+};
+anim.onEnd=function(){
+_4df.parentNode.removeChild(_4df);
+};
+if(_4dc){
+var _4e1=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4e1();
+_4dc(_4d8,anim);
+};
+}
+return anim;
+};
+dojo.lfx.html.highlight=function(_4e2,_4e3,_4e4,_4e5,_4e6){
+_4e2=dojo.lfx.html._byId(_4e2);
+var _4e7=[];
+dojo.lang.forEach(_4e2,function(node){
+var _4e9=dojo.style.getBackgroundColor(node);
+var bg=dojo.style.getStyle(node,"background-color").toLowerCase();
+var _4eb=dojo.style.getStyle(node,"background-image");
+var _4ec=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
+while(_4e9.length>3){
+_4e9.pop();
+}
+var rgb=new dojo.graphics.color.Color(_4e3);
+var _4ee=new dojo.graphics.color.Color(_4e9);
+var anim=dojo.lfx.propertyAnimation(node,[{property:"background-color",start:rgb,end:_4ee}],_4e4,_4e5);
+var _4f0=(anim["beforeBegin"])?dojo.lang.hitch(anim,"beforeBegin"):function(){
+};
+anim.beforeBegin=function(){
+_4f0();
+if(_4eb){
+node.style.backgroundImage="none";
+}
+node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
+};
+var _4f1=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4f1();
+if(_4eb){
+node.style.backgroundImage=_4eb;
+}
+if(_4ec){
+node.style.backgroundColor="transparent";
+}
+if(_4e6){
+_4e6(node,anim);
+}
+};
+_4e7.push(anim);
+});
+if(_4e2.length>1){
+return dojo.lfx.combine(_4e7);
+}else{
+return _4e7[0];
+}
+};
+dojo.lfx.html.unhighlight=function(_4f2,_4f3,_4f4,_4f5,_4f6){
+_4f2=dojo.lfx.html._byId(_4f2);
+var _4f7=[];
+dojo.lang.forEach(_4f2,function(node){
+var _4f9=new dojo.graphics.color.Color(dojo.style.getBackgroundColor(node));
+var rgb=new dojo.graphics.color.Color(_4f3);
+var _4fb=dojo.style.getStyle(node,"background-image");
+var anim=dojo.lfx.propertyAnimation(node,[{property:"background-color",start:_4f9,end:rgb}],_4f4,_4f5);
+var _4fd=(anim["beforeBegin"])?dojo.lang.hitch(anim,"beforeBegin"):function(){
+};
+anim.beforeBegin=function(){
+_4fd();
+if(_4fb){
+node.style.backgroundImage="none";
+}
+node.style.backgroundColor="rgb("+_4f9.toRgb().join(",")+")";
+};
+var _4fe=(anim["onEnd"])?dojo.lang.hitch(anim,"onEnd"):function(){
+};
+anim.onEnd=function(){
+_4fe();
+if(_4f6){
+_4f6(node,anim);
+}
+};
+_4f7.push(anim);
+});
+if(_4f2.length>1){
+return dojo.lfx.combine(_4f7);
+}else{
+return _4f7[0];
+}
+};
+dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
+dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
+dojo.provide("dojo.lfx.*");
+
diff --git a/source/web/scripts/ajax/node-info.js b/source/web/scripts/ajax/node-info.js
new file mode 100644
index 0000000000..cf32ccd503
--- /dev/null
+++ b/source/web/scripts/ajax/node-info.js
@@ -0,0 +1,73 @@
+//
+// Supporting JavaScript for the NodeInfo component
+// Gavin Cornwell 17-07-2006
+//
+
+var _launchElement = null;
+var _popupElement = null;
+
+/**
+ * Makes the AJAX request back to the server to get the node info.
+ *
+ * @param nodeRef The node reference to get information for
+ * @param launchElement The element that requested the summary panel
+ */
+function showNodeInfo(nodeRef, launchElement)
+{
+ _launchElement = launchElement;
+
+ dojo.io.bind({
+ method: 'post',
+ url: WEBAPP_CONTEXT + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
+ content: { noderef: nodeRef },
+ load: showNodeInfoHandler,
+ error: handleErrorDojo,
+ mimetype: 'text/html'
+ });
+}
+
+/**
+ * Fades in the summary panel containing the node information.
+ * This function is called back via the dojo bind call above.
+ */
+function showNodeInfoHandler(type, data, evt)
+{
+ // create a 'div' to hold the summary table
+ var div = document.createElement("div");
+
+ // get the position of the element we are showing info for
+ var pos = dojo.style.getAbsolutePosition(_launchElement, false);
+
+ // setup the div with the correct appearance
+ div.innerHTML = data;
+ div.setAttribute("class", "summaryPopupPanel");
+ // NOTE: use className for IE
+ div.setAttribute("className", "summaryPopupPanel");
+ div.style.position = "absolute";
+ div.style.left = pos[0];
+ div.style.top = pos[1] + 16;
+ div.style.zIndex = 99;
+
+ // is there a better way of doing this, dojo.dom.insertBefore??
+ var body = document.getElementsByTagName("body")[0];
+ dojo.style.setOpacity(div, 0);
+ _popupElement = div;
+ body.appendChild(div);
+
+ dojo.lfx.html.fadeIn(div, 300).play();
+}
+
+/**
+ * Fades out the summary panel with the node info
+ * and then removes it from the DOM
+ */
+function hideNodeInfo()
+{
+ // remove the node from the DOM and reset variables
+ dojo.lfx.html.fadeOut(_popupElement, 300, dojo.lfx.easeOut, function(nodes)
+ {
+ dojo.lang.forEach(nodes, dojo.dom.removeNode);
+ _popupElement = null;
+ _launchElement = null;
+ }).play();
+}
|