mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged 3.1 to HEAD
13841: Build fix 13988: Applied patch for ETHREEOH-1620 (webdav issues with WebSphere) 13993: Partial (UI portion) fix for ETHREEOH-1500: Remove visibility of Workflow items 13995: Fix for ETHREEOH-1883: Start advanced workflow wizard lists the WCM 'Direct Submit to Staging' workflow as one of the selectable workflows 14061: Fix for ETHREEOH-1891: Form repeat element not working in 3.1 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14070 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</workflows>
|
</workflows>
|
||||||
|
|
||||||
<admin-workflows>
|
<admin-workflows>
|
||||||
wcmwf:changerequest
|
wcmwf:changerequest, wcmwf:submitdirect
|
||||||
</admin-workflows>
|
</admin-workflows>
|
||||||
|
|
||||||
<views>
|
<views>
|
||||||
|
@@ -27,9 +27,12 @@ package org.alfresco.web.action.evaluator;
|
|||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.workflow.BPMEngineRegistry;
|
||||||
import org.alfresco.web.app.servlet.FacesHelper;
|
import org.alfresco.web.app.servlet.FacesHelper;
|
||||||
import org.alfresco.web.bean.NavigationBean;
|
import org.alfresco.web.bean.NavigationBean;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
import org.springframework.web.jsf.FacesContextUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UI Action Evaluator - Start workflow on a node.
|
* UI Action Evaluator - Start workflow on a node.
|
||||||
@@ -38,6 +41,7 @@ import org.alfresco.web.bean.repository.Node;
|
|||||||
*/
|
*/
|
||||||
public class StartWorkflowEvaluator extends BaseActionEvaluator
|
public class StartWorkflowEvaluator extends BaseActionEvaluator
|
||||||
{
|
{
|
||||||
|
private static final String BPM_ENGINE_BEAN_NAME = "bpm_engineRegistry";
|
||||||
private static final long serialVersionUID = 3110333488835027710L;
|
private static final long serialVersionUID = 3110333488835027710L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,12 +49,21 @@ public class StartWorkflowEvaluator extends BaseActionEvaluator
|
|||||||
*/
|
*/
|
||||||
public boolean evaluate(Node node)
|
public boolean evaluate(Node node)
|
||||||
{
|
{
|
||||||
|
FacesContext facesContext = FacesContext.getCurrentInstance();
|
||||||
NavigationBean nav =
|
NavigationBean nav =
|
||||||
(NavigationBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), NavigationBean.BEAN_NAME);
|
(NavigationBean)FacesHelper.getManagedBean(facesContext, NavigationBean.BEAN_NAME);
|
||||||
|
|
||||||
return (
|
// determine whether the workflow services are active
|
||||||
nav.getIsGuest() == false
|
boolean workflowPresent = false;
|
||||||
&& node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false
|
WebApplicationContext springContext = FacesContextUtils.getRequiredWebApplicationContext(facesContext);
|
||||||
);
|
BPMEngineRegistry bpmReg = (BPMEngineRegistry)springContext.getBean(BPM_ENGINE_BEAN_NAME);
|
||||||
|
if (bpmReg != null)
|
||||||
|
{
|
||||||
|
String[] components = bpmReg.getWorkflowComponents();
|
||||||
|
workflowPresent = (components != null && components.length > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (workflowPresent && nav.getIsGuest() == false &&
|
||||||
|
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -412,8 +412,14 @@ alfresco.xforms.Widget = new Class({
|
|||||||
/** Returns the widget's label. */
|
/** Returns the widget's label. */
|
||||||
getLabel: function()
|
getLabel: function()
|
||||||
{
|
{
|
||||||
|
var result = "";
|
||||||
var node = this._getChildXFormsNode("label");
|
var node = this._getChildXFormsNode("label");
|
||||||
var result = node ? node.firstChild.nodeValue : "";
|
|
||||||
|
if (node && node.firstChild !== null)
|
||||||
|
{
|
||||||
|
result = node.firstChild.nodeValue;
|
||||||
|
}
|
||||||
|
|
||||||
if (alfresco.constants.DEBUG)
|
if (alfresco.constants.DEBUG)
|
||||||
{
|
{
|
||||||
result += " [" + this.id + "]";
|
result += " [" + this.id + "]";
|
||||||
@@ -1259,7 +1265,7 @@ alfresco.xforms.CheckboxSelect = alfresco.xforms.AbstractSelectWidget.extend({
|
|||||||
{
|
{
|
||||||
this.parent(value, forceCommit);
|
this.parent(value, forceCommit);
|
||||||
this._selectedValues = value.split(' ');
|
this._selectedValues = value.split(' ');
|
||||||
var checkboxes = this.widgets.getElementsByTagName("input");
|
var checkboxes = this.widget.getElementsByTagName("input");
|
||||||
for (var i = 0; i < checkboxes.length; i++)
|
for (var i = 0; i < checkboxes.length; i++)
|
||||||
{
|
{
|
||||||
checkboxes[i].checked =
|
checkboxes[i].checked =
|
||||||
@@ -1341,7 +1347,7 @@ alfresco.xforms.ListSelect = alfresco.xforms.AbstractSelectWidget.extend({
|
|||||||
{
|
{
|
||||||
this.parent(value, forceCommit);
|
this.parent(value, forceCommit);
|
||||||
this._selectedValues = value.split(' ');
|
this._selectedValues = value.split(' ');
|
||||||
var options = this.widgets.getElementsByTagName("option");
|
var options = this.widget.getElementsByTagName("option");
|
||||||
for (var i = 0; i < options.length; i++)
|
for (var i = 0; i < options.length; i++)
|
||||||
{
|
{
|
||||||
options[i].selected =
|
options[i].selected =
|
||||||
|
Reference in New Issue
Block a user