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:
@@ -417,6 +417,10 @@ public class CreateFormWizard
|
||||
this.getSchemaFileName().length() == 0 ||
|
||||
this.getSchemaRootElementNameChoices().size() == 0);
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
return this.getRenderingEngineTemplateFileName() != null;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
|
@@ -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;
|
||||
@@ -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())
|
||||
|
@@ -427,6 +427,11 @@ _showPicker: function(data)
|
||||
"xformsRow" + (i % 2 ? "Even" : "Odd"));
|
||||
this.contentDiv.appendChild(row);
|
||||
}
|
||||
|
||||
if (data.getAttribute("error") && data.getAttribute("error").length != 0)
|
||||
{
|
||||
this._showStatus(data.getAttribute("error"), true);
|
||||
}
|
||||
},
|
||||
|
||||
_createRow: function(fileName, webappRelativePath, isDirectory, fileTypeImage, rowClass)
|
||||
|
@@ -27,19 +27,25 @@
|
||||
|
||||
function alfresco_TinyMCE_urlconverter_callback(href, element, onsave)
|
||||
{
|
||||
// dojo.debug("request to convert " + href + " onsave = " + onsave);
|
||||
var result = null;
|
||||
if (onsave)
|
||||
{
|
||||
return (href && href.startsWith(alfresco.constants.AVM_WEBAPP_URL)
|
||||
result = (href && href.startsWith(alfresco.constants.AVM_WEBAPP_URL)
|
||||
? href.substring(alfresco.constants.AVM_WEBAPP_URL.length)
|
||||
: href);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (href && href.startsWith("/")
|
||||
result = (href && href.startsWith("/")
|
||||
? alfresco.constants.AVM_WEBAPP_URL + href
|
||||
: href);
|
||||
}
|
||||
if (href && href.startsWith(document.location.href))
|
||||
{
|
||||
result = href.substring(document.location.href.length);
|
||||
}
|
||||
// dojo.debug("alfresco_TinyMCE_urlconverter_callback('" + href + "', ... , " + onsave + ") = " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
function alfresco_TinyMCE_execcommand_callback(editor_id, elm, command, user_interface, value)
|
||||
|
Reference in New Issue
Block a user