Merged V3.1 to HEAD

13371: Fix for ETHREEOH-1371, ETHREEOH-1373, ETHREEOH-1374.
          Rule comparator now correctly deals with MLTEXT datatype fields such as name/title/description.
   13372: Fix for ETHREEOH-1291.
          Fixes the general issue that "decodeURI()" should not be used to decode javascript encoded strings -unless- you specifically want to ignore certain characters, "unescape()" should be used instead.
   13373: Fix for ETHREEOH-1284. Clean up of generated javascript for UIDataPager component - also moved to include file for performance and ease of modification.
   13384: Fix for ETHREEOH-1459.
          Sweep through and clean up of the Edit Online/Offline editing and Checkin/Checkout process as per latest wireframes.
          A number of minor fixes to JSF action evaluators and related JSPs also.
          Icons updated as per wires.
   13396: Fix for ETHREEOH-1424. Web-framework script connector now generates an Accept-Language header based on current user locale by default for remote calls.
   13404: Missing paging controls added to task and workflow dialogs (part of ETHREEOH-1410).

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13596 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2009-03-12 12:04:24 +00:00
parent 2152123239
commit c172eba346
39 changed files with 259 additions and 310 deletions

View File

@@ -42,7 +42,8 @@ public class CancelCheckoutDocEvaluator extends BaseActionEvaluator
*/
public boolean evaluate(Node node)
{
return (node.hasPermission(PermissionService.CANCEL_CHECK_OUT) &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY));
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null &&
node.hasPermission(PermissionService.CANCEL_CHECK_OUT));
}
}
}

View File

@@ -30,18 +30,16 @@ import org.alfresco.web.bean.repository.Node;
/**
* UI Action Evaluator - Cancel editing document.
*
*/
public class CancelEditingDocEvaluator extends BaseActionEvaluator
{
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
return (node.hasPermission(PermissionService.CANCEL_CHECK_OUT) &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY));
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) != null &&
node.hasPermission(PermissionService.CANCEL_CHECK_OUT));
}
}

View File

@@ -42,7 +42,8 @@ public class CheckinDocEvaluator extends BaseActionEvaluator
*/
public boolean evaluate(Node node)
{
return (node.hasPermission(PermissionService.CHECK_IN) &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true);
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null &&
node.hasPermission(PermissionService.CHECK_IN));
}
}
}

View File

@@ -30,7 +30,6 @@ import org.alfresco.web.bean.repository.Node;
/**
* UI Action Evaluator - Done editing document.
*
*/
public class DoneEditingDocEvaluator extends BaseActionEvaluator
{
@@ -39,7 +38,8 @@ public class DoneEditingDocEvaluator extends BaseActionEvaluator
*/
public boolean evaluate(Node node)
{
return (node.hasPermission(PermissionService.CHECK_IN) &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true);
return (node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) != null &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.hasPermission(PermissionService.CHECK_IN));
}
}

View File

@@ -50,7 +50,8 @@ public class ForumsCheckinDocEvaluator extends BaseActionEvaluator
{
boolean allow = false;
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY))
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null)
{
if (node.hasAspect(ForumModel.ASPECT_DISCUSSABLE))
{

View File

@@ -24,8 +24,6 @@
*/
package org.alfresco.web.action.evaluator;
import java.util.Map;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
@@ -51,12 +49,11 @@ public class UpdateDocEvaluator extends BaseActionEvaluator
DictionaryService dd = Repository.getServiceRegistry(
FacesContext.getCurrentInstance()).getDictionaryService();
Map<String, Object> props = node.getProperties();
boolean isOfflineEditing = props.get(ContentModel.PROP_WORKING_COPY_MODE) != null && props.get(ContentModel.PROP_WORKING_COPY_MODE).equals(EditOfflineDialog.OFFLINE_EDITING);
boolean isOfflineEditing =
(EditOfflineDialog.OFFLINE_EDITING.equals(node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE)));
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) &&
((node.isWorkingCopyOwner() == true && !isOfflineEditing) ||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false));
((node.isWorkingCopyOwner() && !isOfflineEditing) ||
(!node.isLocked() && !node.hasAspect(ContentModel.ASPECT_WORKING_COPY)));
}
}
}

View File

@@ -24,8 +24,6 @@
*/
package org.alfresco.web.action.evaluator;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.web.bean.coci.EditOfflineDialog;
@@ -33,20 +31,16 @@ import org.alfresco.web.bean.repository.Node;
/**
* UI Action Evaluator - Upload new version
*
*/
public class UploadNewVersionEvaluator extends BaseActionEvaluator
{
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
Map<String, Object> props = node.getProperties();
return (node.hasPermission(PermissionService.CHECK_IN) && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true &&
props.get(ContentModel.PROP_WORKING_COPY_MODE) != null && props.get(ContentModel.PROP_WORKING_COPY_MODE).equals(EditOfflineDialog.OFFLINE_EDITING));
}
}
/**
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
*/
public boolean evaluate(Node node)
{
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
EditOfflineDialog.OFFLINE_EDITING.equals(node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE)) &&
node.hasPermission(PermissionService.CHECK_IN));
}
}