mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V1.3 to HEAD (3117:3125)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3117 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3125 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3402 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -744,7 +744,8 @@ public class CheckinCheckoutBean
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
tx = Repository.getUserTransaction(context);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
@@ -763,8 +764,10 @@ public class CheckinCheckoutBean
|
|||||||
{
|
{
|
||||||
// add the content to an anonymous but permanent writer location
|
// add the content to an anonymous but permanent writer location
|
||||||
// we can then retrieve the URL to the content to to be set on the node during checkin
|
// we can then retrieve the URL to the content to to be set on the node during checkin
|
||||||
ContentWriter writer = this.contentService.getWriter(node.getNodeRef(), ContentModel.PROP_CONTENT, false);
|
ContentWriter writer = this.contentService.getWriter(node.getNodeRef(), ContentModel.PROP_CONTENT, true);
|
||||||
// TODO: Adjust the mimetype
|
// also update the mime type in case a different type of file is uploaded
|
||||||
|
String mimeType = Repository.getMimeTypeForFileName(context, this.fileName);
|
||||||
|
writer.setMimetype(mimeType);
|
||||||
writer.putContent(this.file);
|
writer.putContent(this.file);
|
||||||
contentUrl = writer.getContentUrl();
|
contentUrl = writer.getContentUrl();
|
||||||
}
|
}
|
||||||
|
@@ -221,7 +221,7 @@ public class UIGenericPicker extends UICommand
|
|||||||
{
|
{
|
||||||
// use reflection to execute the query callback method and retrieve results
|
// use reflection to execute the query callback method and retrieve results
|
||||||
Object result = callback.invoke(getFacesContext(), new Object[] {
|
Object result = callback.invoke(getFacesContext(), new Object[] {
|
||||||
this.filterIndex, this.contains});
|
this.filterIndex, this.contains.trim()});
|
||||||
|
|
||||||
if (result instanceof SelectItem[])
|
if (result instanceof SelectItem[])
|
||||||
{
|
{
|
||||||
|
@@ -101,6 +101,10 @@ public class UIPanel extends UICommand
|
|||||||
|
|
||||||
// determine whether we have any adornments
|
// determine whether we have any adornments
|
||||||
String label = getLabel();
|
String label = getLabel();
|
||||||
|
if (label != null)
|
||||||
|
{
|
||||||
|
label = Utils.encode(label);
|
||||||
|
}
|
||||||
if (label != null || isProgressive() == true || titleComponent != null)
|
if (label != null || isProgressive() == true || titleComponent != null)
|
||||||
{
|
{
|
||||||
this.hasAdornments = true;
|
this.hasAdornments = true;
|
||||||
@@ -156,11 +160,11 @@ public class UIPanel extends UICommand
|
|||||||
|
|
||||||
if (isExpanded() == true)
|
if (isExpanded() == true)
|
||||||
{
|
{
|
||||||
out.write(Utils.buildImageTag(context, WebResources.IMAGE_EXPANDED, 11, 11, ""));
|
out.write(Utils.buildImageTag(context, WebResources.IMAGE_EXPANDED, 11, 11, label));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out.write(Utils.buildImageTag(context, WebResources.IMAGE_COLLAPSED, 11, 11, ""));
|
out.write(Utils.buildImageTag(context, WebResources.IMAGE_COLLAPSED, 11, 11, label));
|
||||||
}
|
}
|
||||||
|
|
||||||
out.write("</a> ");
|
out.write("</a> ");
|
||||||
@@ -174,11 +178,11 @@ public class UIPanel extends UICommand
|
|||||||
Utils.outputAttribute(out, getAttributes().get("styleClass"), "class");
|
Utils.outputAttribute(out, getAttributes().get("styleClass"), "class");
|
||||||
out.write('>');
|
out.write('>');
|
||||||
|
|
||||||
out.write(Utils.encode(label));
|
out.write(label); // already encoded above
|
||||||
|
|
||||||
out.write("</span>");
|
out.write("</span>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hasAdornments)
|
if (this.hasAdornments)
|
||||||
{
|
{
|
||||||
out.write("</td>");
|
out.write("</td>");
|
||||||
|
Reference in New Issue
Block a user