mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
fixes for WCM-511 and WCM-512
- preserve anchor (#anchor) urls in tinymce - better error handling in file picker widget - disabling next while in the midst of adding a rendering engine (usability fix) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6058 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
package org.alfresco.web.bean.wcm;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
|
||||
import javax.faces.context.ExternalContext;
|
||||
@@ -131,8 +132,8 @@ public class FilePickerBean
|
||||
final String previewStorePath =
|
||||
AVMUtil.getCorrespondingPathInPreviewStore(this.getCurrentAVMPath());
|
||||
currentPath = AVMUtil.buildPath(previewStorePath,
|
||||
currentPath,
|
||||
AVMUtil.PathRelation.WEBAPP_RELATIVE);
|
||||
currentPath,
|
||||
AVMUtil.PathRelation.WEBAPP_RELATIVE);
|
||||
}
|
||||
LOGGER.debug(this + ".getFilePickerData(" + currentPath + ")");
|
||||
|
||||
@@ -144,9 +145,12 @@ public class FilePickerBean
|
||||
final AVMNodeDescriptor currentNode = this.avmService.lookup(-1, currentPath);
|
||||
if (currentNode == null)
|
||||
{
|
||||
final Element errorElement = result.createElement("error");
|
||||
errorElement.appendChild(result.createTextNode("Path " + currentPath + " not found"));
|
||||
filePickerDataElement.appendChild(errorElement);
|
||||
currentPath = AVMUtil.getWebappRelativePath(currentPath);
|
||||
|
||||
filePickerDataElement.setAttribute("error",
|
||||
MessageFormat.format(Application.getMessage(facesContext, "error_not_found"),
|
||||
currentPath.substring(currentPath.lastIndexOf("/") + 1, currentPath.length()),
|
||||
currentPath.lastIndexOf("/") == 0 ? "/" : currentPath.substring(0, currentPath.lastIndexOf("/"))));
|
||||
currentPath = this.getCurrentAVMPath();
|
||||
}
|
||||
else if (! currentNode.isDirectory())
|
||||
|
Reference in New Issue
Block a user