diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties
index c3259ccb77..26f1f67000 100644
--- a/config/alfresco/messages/webclient.properties
+++ b/config/alfresco/messages/webclient.properties
@@ -1213,7 +1213,7 @@ link_validaton_dialog_title_workflow=Link Validation Report for Submitted Items
link_validaton_dialog_desc=This dialog shows the results of a link validation check and allows you to fix broken links.
report_summary=Report Summary
link_check_completed_at=Broken links were checked at {0} using snapshot {1}.
-link_check_not_latest=This is not the latest snapshot.
+link_check_not_latest=The latest snapshot version is {0}.
link_check_items_found={0} file(s) were checked, {1} link(s) were found.
link_check_items_broken={0} broken link(s) were found in {1} file(s).
link_check_no_broken=No broken links were found.
diff --git a/config/alfresco/web-client-config-wcm.xml b/config/alfresco/web-client-config-wcm.xml
index 59316c7340..5c912a5f69 100644
--- a/config/alfresco/web-client-config-wcm.xml
+++ b/config/alfresco/web-client-config-wcm.xml
@@ -60,6 +60,11 @@
link,unlink,image,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,undo,redo,separator,forecolor,backcolor
400
+
@@ -72,6 +77,17 @@
table
tablecontrols
+
wcm:avmcontent,wcm:avmfolder
diff --git a/source/java/org/alfresco/web/bean/users/UserMembersBean.java b/source/java/org/alfresco/web/bean/users/UserMembersBean.java
index d5004763eb..05512b34c3 100644
--- a/source/java/org/alfresco/web/bean/users/UserMembersBean.java
+++ b/source/java/org/alfresco/web/bean/users/UserMembersBean.java
@@ -653,7 +653,6 @@ public abstract class UserMembersBean implements IContextListener
// and add each of the new permissions in turn
NodeRef nodeRef = getNode().getNodeRef();
this.permissionService.clearPermission(nodeRef, getPersonAuthority());
- AlfrescoTransactionSupport.flush();
for (PermissionWrapper wrapper : personRoles)
{
this.permissionService.setPermission(
diff --git a/source/java/org/alfresco/web/bean/wcm/AVMWorkflowUtil.java b/source/java/org/alfresco/web/bean/wcm/AVMWorkflowUtil.java
index 1469f325e5..b942e80e0a 100644
--- a/source/java/org/alfresco/web/bean/wcm/AVMWorkflowUtil.java
+++ b/source/java/org/alfresco/web/bean/wcm/AVMWorkflowUtil.java
@@ -47,6 +47,8 @@ import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.avm.*;
import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
+import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
+import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
@@ -126,7 +128,8 @@ public class AVMWorkflowUtil extends WorkflowUtil
// convert package to workflow package
final AVMNodeDescriptor packageDesc = avmService.lookup(-1, packagesPath);
final NodeRef packageNodeRef = workflowService.createPackage(AVMNodeConverter.ToNodeRef(-1, packageDesc.getPath()));
- avmService.setNodeProperty(packagesPath, WorkflowModel.PROP_IS_SYSTEM_PACKAGE, new PropertyValue(null, true));
+
+ avmService.setNodeProperty(packagesPath, WorkflowModel.PROP_IS_SYSTEM_PACKAGE, new PropertyValue(DataTypeDefinition.BOOLEAN, true));
// apply global permission to workflow package
// TODO: Determine appropriate permissions
diff --git a/source/java/org/alfresco/web/bean/wcm/CreateFolderDialog.java b/source/java/org/alfresco/web/bean/wcm/CreateFolderDialog.java
index 68eeffd93d..4079f46b46 100644
--- a/source/java/org/alfresco/web/bean/wcm/CreateFolderDialog.java
+++ b/source/java/org/alfresco/web/bean/wcm/CreateFolderDialog.java
@@ -33,6 +33,7 @@ import org.alfresco.model.ContentModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.avm.AVMService;
+import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.web.bean.dialog.BaseDialogBean;
@@ -132,7 +133,7 @@ public class CreateFolderDialog extends BaseDialogBean
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
if (this.description != null && this.description.length() != 0)
{
- this.avmService.setNodeProperty(path, ContentModel.PROP_DESCRIPTION, new PropertyValue(null, this.description));
+ this.avmService.setNodeProperty(path, ContentModel.PROP_DESCRIPTION, new PropertyValue(DataTypeDefinition.TEXT, this.description));
// this.nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, this.description);
}
diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebappDialog.java b/source/java/org/alfresco/web/bean/wcm/CreateWebappDialog.java
index 287eabdecc..433af8c7d8 100644
--- a/source/java/org/alfresco/web/bean/wcm/CreateWebappDialog.java
+++ b/source/java/org/alfresco/web/bean/wcm/CreateWebappDialog.java
@@ -49,7 +49,8 @@ public class CreateWebappDialog extends CreateFolderDialog
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
- final String parent = AVMUtil.buildSandboxRootPath(this.avmBrowseBean.getStagingStore());
+ final String stagingStore = this.avmBrowseBean.getStagingStore();
+ final String parent = AVMUtil.buildSandboxRootPath( stagingStore );
this.avmService.createDirectory(parent, this.name);
final String path = AVMNodeConverter.ExtendAVMPath(parent, this.name);
@@ -62,6 +63,9 @@ public class CreateWebappDialog extends CreateFolderDialog
new PropertyValue(DataTypeDefinition.TEXT,
this.description));
}
+
+ // Snapshot the store with the empty webapp
+ this.avmService.createSnapshot( stagingStore, null, null);
return outcome;
}
diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java
index 780ff4f020..47f88688c7 100644
--- a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java
+++ b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java
@@ -223,6 +223,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
this.avmLockingService.addWebProject(avmStore);
outcome = AlfrescoNavigationHandler.CLOSE_WIZARD_OUTCOME;
+
+ // Snapshot the store with the empty webapp
+ this.avmService.createSnapshot( avmStore, null, null);
}
return outcome;
}
diff --git a/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java b/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java
index 6749cf29dc..bc0c092b0b 100644
--- a/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java
+++ b/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java
@@ -28,11 +28,13 @@ import java.io.Serializable;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
+import org.alfresco.model.WCMAppModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.avm.AVMService;
@@ -48,6 +50,8 @@ import org.alfresco.web.app.Application;
import org.alfresco.web.bean.content.EditContentPropertiesDialog;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
+import org.alfresco.web.forms.*;
+import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for the Edit File Properties dialog.
@@ -58,6 +62,7 @@ public class EditFilePropertiesDialog extends EditContentPropertiesDialog
{
protected AVMBrowseBean avmBrowseBean;
protected AVMService avmService;
+ protected FormsService formsService;
// ------------------------------------------------------------------------------
@@ -78,6 +83,14 @@ public class EditFilePropertiesDialog extends EditContentPropertiesDialog
{
this.avmService = avmService;
}
+
+ /**
+ * @param formsService The FormsService to set.
+ */
+ public void setFormsService(final FormsService formsService)
+ {
+ this.formsService = formsService;
+ }
// ------------------------------------------------------------------------------
@@ -176,8 +189,47 @@ public class EditFilePropertiesDialog extends EditContentPropertiesDialog
// perform the rename last as for an AVM it changes the NodeRef
if (name != null)
{
- this.fileFolderService.rename(nodeRef, name);
+ if (this.nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_RENDITION))
+ {
+ throw new UnsupportedOperationException(this.nodeService.getProperty(nodeRef, ContentModel.PROP_NAME) +
+ " is a " + WCMAppModel.ASPECT_RENDITION +
+ " and cannot be renamed");
+ }
+
+ // need to find out if it's a form instance data before rename. for whatever reason,
+ // afterwards it claims it is not
+ if (this.nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
+ {
+ final FormInstanceData fid = this.formsService.getFormInstanceData(nodeRef);
+ // delete all existing renditions
+ for (final Rendition r : fid.getRenditions())
+ {
+ this.avmService.removeNode(r.getPath());
+ }
+ this.nodeService.removeProperty(nodeRef, WCMAppModel.PROP_RENDITIONS);
+ }
+
+ String path = AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond();
+ final String parentPath = AVMNodeConverter.SplitBase(path)[0];
+ final String oldName = AVMNodeConverter.SplitBase(path)[1];
+ this.avmService.rename(parentPath, oldName, parentPath, name);
+ nodeRef = AVMNodeConverter.ToNodeRef(-1, AVMNodeConverter.ExtendAVMPath(parentPath, name));
editedProps.put(ContentModel.PROP_NAME.toString(), name);
+
+ if (this.nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_FORM_INSTANCE_DATA))
+ {
+ final FormInstanceData fid = this.formsService.getFormInstanceData(nodeRef);
+ for (final FormInstanceData.RegenerateResult rr : fid.regenerateRenditions())
+ {
+ if (rr.getException() != null)
+ {
+ outcome = null;
+ Utils.addErrorMessage("error regenerating rendition using " + rr.getRenderingEngineTemplate().getName() +
+ ": " + rr.getException().getMessage(),
+ rr.getException());
+ }
+ }
+ }
}
return outcome;
diff --git a/source/java/org/alfresco/web/bean/wizard/NewUserWizard.java b/source/java/org/alfresco/web/bean/wizard/NewUserWizard.java
index 7fd5640f1b..ae2f083ad9 100644
--- a/source/java/org/alfresco/web/bean/wizard/NewUserWizard.java
+++ b/source/java/org/alfresco/web/bean/wizard/NewUserWizard.java
@@ -426,7 +426,8 @@ public class NewUserWizard extends AbstractWizardBean
String oldHomeSpaceName = Repository.getNameForNode(nodeService, oldHomeFolderRef);
if (oldHomeSpaceName.equals(this.homeSpaceName) == false &&
- oldHomeFolderRef.equals(this.homeSpaceLocation) == false)
+ oldHomeFolderRef.equals(this.homeSpaceLocation) == false &&
+ oldHomeFolderRef.equals(this.defaultHomeSpaceRef) == false)
{
renameHomeSpace = true;
}
diff --git a/source/java/org/alfresco/web/config/ClientConfigElement.java b/source/java/org/alfresco/web/config/ClientConfigElement.java
index 9a1316500f..0f89251af0 100644
--- a/source/java/org/alfresco/web/config/ClientConfigElement.java
+++ b/source/java/org/alfresco/web/config/ClientConfigElement.java
@@ -67,7 +67,7 @@ public class ClientConfigElement extends ConfigElementAdapter
private String initialLocation = "myalfresco";
private ExpiringValueCache wcmDomain = new ExpiringValueCache(1000*10L);
private ExpiringValueCache wcmPort = new ExpiringValueCache(1000*10L);
- private String defaultHomeSpacePath = "/app:company_home";
+ private String defaultHomeSpacePath = "/app:company_home/app:user_homes";
private boolean clipboardStatusVisible = true;
private boolean pasteAllAndClear = true;
private boolean allowGuestConfig = false;
@@ -148,6 +148,12 @@ public class ClientConfigElement extends ConfigElementAdapter
}
// override default values if they have changed
+ if (newElement.getDefaultHomeSpacePath() != null &&
+ newElement.getDefaultHomeSpacePath().equals(combinedElement.getDefaultHomeSpacePath()) == false)
+ {
+ combinedElement.setDefaultHomeSpacePath(newElement.getDefaultHomeSpacePath());
+ }
+
if (newElement.getRecentSpacesItems() != combinedElement.getRecentSpacesItems())
{
combinedElement.setRecentSpacesItems(newElement.getRecentSpacesItems());
diff --git a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
index 867cba0c13..51231971f9 100644
--- a/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
+++ b/source/java/org/alfresco/web/forms/FormInstanceDataImpl.java
@@ -207,19 +207,34 @@ import org.xml.sax.SAXException;
final List result = new ArrayList(renditionPaths.size());
for (Serializable path : renditionPaths)
{
- if (avmService.lookup(-1, storeName + ':' + (String)path) != null)
+ if (avmService.lookup(-1, storeName + ':' + (String)path) == null)
{
- final Rendition r = new RenditionImpl(AVMNodeConverter.ToNodeRef(-1, storeName + ':' + (String)path),
+ LOGGER.debug("ignoring dangling rendition at " + storeName + ':' + (String)path);
+ }
+ else
+ {
+ final Rendition r = new RenditionImpl(-1,
+ storeName + ':' + (String)path,
this.formsService);
+ try
+ {
+ if (!this.equals(r.getPrimaryFormInstanceData()))
+ {
+ LOGGER.debug("rendition " + r +
+ " points at form instance data " + r.getPrimaryFormInstanceData() +
+ " instead of " + this + ". Not including in renditions list.");
+ continue;
+ }
+ }
+ catch (FileNotFoundException fnfe)
+ {
+ continue;
+ }
if (r.getRenderingEngineTemplate() != null)
{
result.add(r);
}
}
- else
- {
- LOGGER.debug("ignoring dangling rendition at " + storeName + ':' + (String)path);
- }
}
return result;
}
@@ -250,6 +265,13 @@ import org.xml.sax.SAXException;
}
}
+ public boolean equals(final Object other)
+ {
+ return (other instanceof FormInstanceDataImpl &&
+ this.getNodeRef().equals(((FormInstanceDataImpl)other).getNodeRef()));
+
+ }
+
protected String getParentFormName()
{
final NodeService nodeService = this.getServiceRegistry().getNodeService();
diff --git a/source/java/org/alfresco/web/forms/RenditionImpl.java b/source/java/org/alfresco/web/forms/RenditionImpl.java
index b12d75ca53..c4990ba086 100644
--- a/source/java/org/alfresco/web/forms/RenditionImpl.java
+++ b/source/java/org/alfresco/web/forms/RenditionImpl.java
@@ -234,7 +234,13 @@ import org.xml.sax.SAXException;
public int hashCode()
{
- return this.getPath().hashCode() ^ this.getRenderingEngineTemplate().hashCode();
+ return this.getPath().hashCode();
+ }
+
+ public boolean equals(final Object other)
+ {
+ return (other instanceof RenditionImpl &&
+ this.getNodeRef().equals(((RenditionImpl)other).getNodeRef()));
}
public String toString()
diff --git a/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationSummary.java b/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationSummary.java
index d280488412..1e44409a10 100644
--- a/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationSummary.java
+++ b/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationSummary.java
@@ -134,11 +134,15 @@ public class UILinkValidationSummary extends AbstractLinkValidationReportCompone
// NOTE: Whenever latestVersion > baseVersion, link validation is "behind".
if (latestVersion > baseVersion)
{
- out.write(" (
");
- out.write(bundle.getString("link_check_not_latest"));
- out.write(")");
+ out.write( latestVersionInfo );
}
pattern = bundle.getString("link_check_items_found");
diff --git a/source/test-resources/xforms/unit-tests/simple-test/textarea-test.xsd b/source/test-resources/xforms/unit-tests/simple-test/textarea-test.xsd
index b8b301bdd5..c76fab1f51 100644
--- a/source/test-resources/xforms/unit-tests/simple-test/textarea-test.xsd
+++ b/source/test-resources/xforms/unit-tests/simple-test/textarea-test.xsd
@@ -27,6 +27,13 @@
+
+
+
+ fullscreen
+
+
+
diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml
index e77d85d9dd..92001977b1 100644
--- a/source/web/WEB-INF/faces-config-beans.xml
+++ b/source/web/WEB-INF/faces-config-beans.xml
@@ -3232,6 +3232,10 @@
avmService
#{AVMLockingAwareService}
+
+ formsService
+ #{FormsService}
+
fileFolderService
#{FileFolderService}
diff --git a/source/web/css/xforms.css b/source/web/css/xforms.css
index 0a150c21d6..5fc3f36501 100644
--- a/source/web/css/xforms.css
+++ b/source/web/css/xforms.css
@@ -104,13 +104,12 @@
left: 0px;
width: 100%;
height: 100%;
- background-color: lightgray;
+ background-color: #d9d9de;
color: black;
z-index: 100;
font-weight: bolder;
font-size: 16px;
text-align: center;
- opacity: .5;
}
.xformsRepeat
diff --git a/source/web/jsp/wcm/regenerate-renditions-wizard/select_renditions.jsp b/source/web/jsp/wcm/regenerate-renditions-wizard/select_renditions.jsp
index 26ad3d6463..8d5f88731a 100644
--- a/source/web/jsp/wcm/regenerate-renditions-wizard/select_renditions.jsp
+++ b/source/web/jsp/wcm/regenerate-renditions-wizard/select_renditions.jsp
@@ -51,7 +51,7 @@
value="#{msg.web_project}:"/>
@@ -62,7 +62,7 @@
value="2. #{msg.regenerate_renditions_select_renditions_select_regenerate_scope}"
escape="false" />
diff --git a/source/web/scripts/ajax/xforms.js b/source/web/scripts/ajax/xforms.js
index e08cfa6987..c3ddd5458d 100644
--- a/source/web/scripts/ajax/xforms.js
+++ b/source/web/scripts/ajax/xforms.js
@@ -888,7 +888,7 @@ dojo.declare("alfresco.xforms.RichTextEditor",
{
attach_point.appendChild(this.domNode);
dojo.html.prependClass(this.domNode, "xformsTextArea");
- if (this._params["height"])
+ if (this._params.height)
{
this.domNode.style.height = parseInt(this._params["height"]) + "px";
}
@@ -1032,7 +1032,11 @@ dojo.declare("alfresco.xforms.RichTextEditor",
if (this.hoverLayer.parentNode != this.widget)
{
this.widget.appendChild(this.hoverLayer);
+
+ this.hoverLayer.style.border = "1px solid black";
this.hoverLayer.style.lineHeight = this.hoverLayer.offsetHeight + "px";
+ this.hoverLayer.style.overflow = "hidden";
+ dojo.html.setOpacity(this.hoverLayer, .8);
var me = this;
dojo.event.browser.addListener(this.hoverLayer,
"onmouseout",
@@ -1050,6 +1054,7 @@ dojo.declare("alfresco.xforms.RichTextEditor",
{
if (this.hoverLayer.parentNode == this.widget)
{
+ dojo.html.setOpacity(this.hoverLayer, 1);
this.widget.removeChild(this.hoverLayer);
}
},
@@ -1058,12 +1063,48 @@ dojo.declare("alfresco.xforms.RichTextEditor",
{
if (this.hoverLayer.parentNode == this.widget)
{
+ dojo.html.setOpacity(this.hoverLayer, 1);
this.widget.removeChild(this.hoverLayer);
this._createTinyMCE();
}
}
});
+/**
+ * Reads the widget configuration to determine which plugins will
+ * be needed by tinymce. All plugins must be loaded into tinymce at
+ * startup so they must be accumulated in advance.
+ */
+alfresco.xforms.RichTextEditor.determineNecessaryTinyMCEPlugins = function(config)
+{
+ var result = [];
+ for (var widget in config)
+ {
+ for (var schemaType in config[widget])
+ {
+ for (var appearance in config[widget][schemaType])
+ {
+ if (config[widget][schemaType][appearance].className == "alfresco.xforms.RichTextEditor" &&
+ config[widget][schemaType][appearance].params &&
+ config[widget][schemaType][appearance].params.plugins)
+ {
+ dojo.debug("found plugins definition " + config[widget][schemaType][appearance].params.plugins +
+ " for text editor at config[" + widget + "][" + schemaType + "][" + appearance + "]");
+ var plugins = config[widget][schemaType][appearance].params.plugins.split(",");
+ for (var p = 0; p < plugins.length; p++)
+ {
+ if (result.indexOf(plugins[p]) < 0)
+ {
+ result.push(plugins[p]);
+ }
+ }
+ }
+ }
+ }
+ }
+ return result.join(",");
+}
+
/** Base class for all select widgets. */
dojo.declare("alfresco.xforms.AbstractSelectWidget",
alfresco.xforms.Widget,
@@ -4072,7 +4113,7 @@ dojo.declare("alfresco.xforms.XForm",
" schemaType " + schemaType +
" appearance " + appearance);
}
- var result = new cstr(this, xformsNode, x.params);
+ var result = new cstr(this, xformsNode, dojo.lang.mixin(new Object(), x.params || {}));
if (result instanceof alfresco.xforms.Widget)
{
return result;
@@ -4668,11 +4709,14 @@ dojo.html.toCamelCase = function(str)
// tiny mce integration
////////////////////////////////////////////////////////////////////////////////
+alfresco.constants.TINY_MCE_DEFAULT_PLUGINS =
+ alfresco.xforms.RichTextEditor.determineNecessaryTinyMCEPlugins(alfresco.xforms.widgetConfig);
+
alfresco.constants.TINY_MCE_DEFAULT_SETTINGS =
{
theme: "advanced",
mode: "exact",
- plugins: "table",
+ plugins: alfresco.constants.TINY_MCE_DEFAULT_PLUGINS,
width: -1,
height: -1,
auto_resize: false,