mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Submit Dialog now supports submit with no workflow match - i.e. allows direct submit to staging sandbox if no workflows are appropriate
. Submit Dialog now requires comment+label field to be completed . DNS name client-side check now allows captial A-Z characters . Create Shortcut action now available for Website folder type git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4584 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -301,6 +301,7 @@
|
|||||||
<action idref="take_ownership_space" />
|
<action idref="take_ownership_space" />
|
||||||
<action idref="edit_website" />
|
<action idref="edit_website" />
|
||||||
<action idref="invite_website_users" />
|
<action idref="invite_website_users" />
|
||||||
|
<action idref="create_shortcut" />
|
||||||
<action idref="run_action" />
|
<action idref="run_action" />
|
||||||
</action-group>
|
</action-group>
|
||||||
|
|
||||||
|
@@ -35,7 +35,6 @@ import org.alfresco.model.WCMAppModel;
|
|||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
import org.alfresco.repo.avm.actions.AVMRevertStoreAction;
|
import org.alfresco.repo.avm.actions.AVMRevertStoreAction;
|
||||||
import org.alfresco.repo.avm.actions.AVMUndoSandboxListAction;
|
import org.alfresco.repo.avm.actions.AVMUndoSandboxListAction;
|
||||||
import org.alfresco.repo.avm.actions.SimpleAVMSubmitAction;
|
|
||||||
import org.alfresco.service.cmr.action.Action;
|
import org.alfresco.service.cmr.action.Action;
|
||||||
import org.alfresco.service.cmr.action.ActionService;
|
import org.alfresco.service.cmr.action.ActionService;
|
||||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||||
@@ -1110,6 +1109,7 @@ public class AVMBrowseBean implements IContextListener
|
|||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Inner classes
|
// Inner classes
|
||||||
|
|
||||||
|
@@ -32,6 +32,7 @@ import javax.faces.context.FacesContext;
|
|||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.model.WCMAppModel;
|
import org.alfresco.model.WCMAppModel;
|
||||||
|
import org.alfresco.repo.avm.AVMDAOs;
|
||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
import org.alfresco.repo.workflow.WorkflowModel;
|
import org.alfresco.repo.workflow.WorkflowModel;
|
||||||
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
|
||||||
@@ -167,7 +168,14 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
@Override
|
@Override
|
||||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||||
{
|
{
|
||||||
|
if (getSubmitItemsSize() == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// get the defaults from the workflow configuration attached to the selected workflow
|
// get the defaults from the workflow configuration attached to the selected workflow
|
||||||
|
if (this.workflowSelectedValue != null)
|
||||||
|
{
|
||||||
Map<QName, Serializable> params = null;
|
Map<QName, Serializable> params = null;
|
||||||
String workflowName = this.workflowSelectedValue[0];
|
String workflowName = this.workflowSelectedValue[0];
|
||||||
for (FormWorkflowWrapper wrapper : this.workflows)
|
for (FormWorkflowWrapper wrapper : this.workflows)
|
||||||
@@ -211,21 +219,35 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: jump to dialog and allow user to finish wf properties config!
|
// TODO: jump to dialog and allow user to finish wf properties config!
|
||||||
throw new AlfrescoRuntimeException("Workflow has not been configured correctly, cannot submit items.");
|
throw new AlfrescoRuntimeException("Workflow parameters have not been configured, cannot submit items.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// direct submit to the staging area without workflow
|
||||||
|
List<ItemWrapper> items = getSubmitItems();
|
||||||
|
|
||||||
|
// construct diffs for selected items for submission
|
||||||
|
String sandboxPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getSandbox());
|
||||||
|
String stagingPath = AVMConstants.buildAVMStoreRootPath(this.avmBrowseBean.getStagingStore());
|
||||||
|
List<AVMDifference> diffs = new ArrayList<AVMDifference>(items.size());
|
||||||
|
for (ItemWrapper wrapper : items)
|
||||||
|
{
|
||||||
|
String srcPath = sandboxPath + wrapper.getPath();
|
||||||
|
String destPath = stagingPath + wrapper.getPath();
|
||||||
|
AVMDifference diff = new AVMDifference(-1, srcPath, -1, destPath, AVMDifference.NEWER);
|
||||||
|
diffs.add(diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
// write changes to layer so files are marked as modified
|
||||||
|
this.avmSyncService.update(diffs, null, true, true, false, false, this.label, this.comment);
|
||||||
|
AVMDAOs.Instance().fAVMNodeDAO.flush();
|
||||||
|
avmSyncService.flatten(sandboxPath, stagingPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return outcome;
|
return outcome;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.alfresco.web.bean.dialog.BaseDialogBean#getFinishButtonDisabled()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean getFinishButtonDisabled()
|
|
||||||
{
|
|
||||||
return (getWorkflowSelectedValue() == null || getSubmitItemsSize() == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Returns the workflow comment.
|
* @return Returns the workflow comment.
|
||||||
*/
|
*/
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
if (valid == true)
|
if (valid == true)
|
||||||
{
|
{
|
||||||
valid = validateRegex(document.getElementById("wizard:wizard-body:dnsname"),
|
valid = validateRegex(document.getElementById("wizard:wizard-body:dnsname"),
|
||||||
"^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$", true, null,
|
"^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$", true, null,
|
||||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_dns_name}" /><f:verbatim>', true);
|
'</f:verbatim><a:outputText value="#{msg.validation_invalid_dns_name}" /><f:verbatim>', true);
|
||||||
}
|
}
|
||||||
return valid;
|
return valid;
|
||||||
|
@@ -30,7 +30,22 @@
|
|||||||
function pageLoaded()
|
function pageLoaded()
|
||||||
{
|
{
|
||||||
document.getElementById("dialog:dialog-body:comment").focus();
|
document.getElementById("dialog:dialog-body:comment").focus();
|
||||||
|
checkButtonState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkButtonState()
|
||||||
|
{
|
||||||
|
if (document.getElementById("dialog:dialog-body:comment").value.length == 0 ||
|
||||||
|
document.getElementById("dialog:dialog-body:label").value.length == 0)
|
||||||
|
{
|
||||||
|
document.getElementById("dialog:finish-button").disabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("dialog:finish-button").disabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</f:verbatim>
|
</f:verbatim>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user