Merged V2.2 to HEAD

8206: Merged V2.1 to V2.2
      8136: Fixed AR-2043: XPathMetadataExtractor extracts empty strings
      8169: Fixes to Office add-in for ACT-267 - saving over an existing non-versionable file.
      8172: Fix for AWC-1838
   8221: Merged V2.1 to V2.2
      8210: Fix for AR-1830 - Search not returning expected results for umulat characters
      8211: Fix for AWC-1463 - MyWebForms and MyWebFiles templates now check for existance of stores before displaying them
   8222: Merged V2.1 to V2.2
      8216: Fix for AWC-1357
   8223: Missing Serializable interface (for web UI clustering)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8485 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-03-10 16:37:24 +00:00
parent c473277dbc
commit 163bb15d5e
8 changed files with 66 additions and 30 deletions

View File

@@ -155,10 +155,10 @@
<#assign versionRow=versionRow+1>
<tr class="${(versionRow % 2 = 0)?string("odd", "even")}">
<td valign="top">
<a title="Open ${record.versionLabel}" href="${url.context}${record.url}?ticket=${session.ticket}"><img src="${url.context}/images/office/document.gif" alt="Open ${record.versionLabel}" /></a>
<a title="Download ${record.versionLabel}" href="${url.context}${record.url}?ticket=${session.ticket}"><img src="${url.context}/images/office/document.gif" alt="Open ${record.versionLabel}" /></a>
</td>
<td>
<a title="Open ${record.versionLabel}" href="${url.context}${record.url}?ticket=${session.ticket}"><span style="font-weight:bold;">${record.versionLabel}</span></a><br />
<a title="Download ${record.versionLabel}" href="${url.context}${record.url}?ticket=${session.ticket}"><span style="font-weight:bold;">${record.versionLabel}</span></a><br />
Author: ${record.creator}<br />
Date: ${record.createdDate?datetime}<br />
<#if record.description?exists>

View File

@@ -140,6 +140,7 @@
<#assign documentsFound = 0>
<#list thisSpace.children?sort_by('name') as child>
<#if child.isDocument>
<#assign isVersionable = (hasAspect(child, "cm:versionable") == 1)>
<#assign documentsFound = documentsFound + 1>
<#assign relativePath = (child.displayPath?substring(chLen+1) + '/' + child.name)?url?replace('%2F', '/')?replace('\'', '\\\'') />
<div class="documentItem ${(documentsFound % 2 = 0)?string("even", "odd")}">
@@ -152,7 +153,7 @@
</span>
<span class="documentItemDetails">
<#if child.name?ends_with(extn) || child.name?ends_with(extnx)>
<a href="#" onclick="window.external.openDocument('${relativePath}')"><span class="bold">${child.name}</span></a>
<a href="#" onclick="window.external.openDocument('${relativePath}')"><span class="bold ${isVersionable?string("versionable", "notVersionable")}">${child.name}</span></a>
<#else>
<a href="${url.context}${child.url}?ticket=${session.ticket}" rel="_blank"><span class="bold">${child.name}</span></a>
</#if>

View File

@@ -28,6 +28,7 @@
<#assign storeId=wp.properties["wca:avmstore"]>
<#assign username=person.properties.userName>
<#assign sandbox=avm.userSandboxStore(storeId, username)>
<#if avm.lookupStore(sandbox)?exists>
<div class="webProjectRow">
<div class="webProjectTitle">
<a class="webPreviewLink" href="${avm.websiteUserSandboxUrl(storeId, username)}" target="new"><img src="${url.context}/images/icons/website_large.gif" width=32 height=32 border=0><span class="websiteLink">${wp.name}</span></a>
@@ -73,6 +74,7 @@
</div>
</div>
</#if>
</#if>
</#list>
</#list>
</div>

View File

@@ -28,6 +28,7 @@
<#assign storeId=wp.properties["wca:avmstore"]>
<#assign username=person.properties.userName>
<#assign sandbox=avm.userSandboxStore(storeId, username)>
<#if avm.lookupStore(sandbox)?exists>
<div class="webProjectRow">
<div class="webProjectTitle">
<a class="webPreviewLink" href="${avm.websiteUserSandboxUrl(storeId, username)}" target="new"><img src="${url.context}/images/icons/website_large.gif" width=32 height=32 border=0><span class="websiteLink">${wp.name}</span></a>
@@ -57,6 +58,7 @@
</div>
</div>
</#if>
</#if>
</#list>
</#list>
</div>

View File

@@ -502,21 +502,10 @@ public class SearchContext implements Serializable
*/
private static void processSearchAttribute(QName qname, String value, StringBuilder buf, boolean andOp, boolean notOp)
{
if (value.indexOf(' ') == -1)
{
if (andOp) buf.append('+');
else if (notOp) buf.append('-');
buf.append('@').append(Repository.escapeQName(qname)).append(":")
.append(SearchContext.escape(value)).append(' ');
}
else
{
// phrase multi-word search
if (andOp) buf.append('+');
else if (notOp) buf.append('-');
buf.append('@').append(Repository.escapeQName(qname)).append(":\"")
.append(value).append('"').append(' ');
}
.append(value).append("\" ");
}
/**
@@ -530,9 +519,9 @@ public class SearchContext implements Serializable
*/
private static void processSearchTextAttribute(String qname, String value, StringBuilder attrBuf, StringBuilder textBuf)
{
textBuf.append("TEXT:").append(SearchContext.escape(value));
attrBuf.append("@").append(qname).append(":")
.append(SearchContext.escape(value));
textBuf.append("TEXT:\"").append(value).append('"');
attrBuf.append('@').append(qname).append(":\"")
.append(value).append('"');
}
/**

View File

@@ -267,7 +267,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener, Cha
UserTransaction tx = null;
try
{
tx = Repository.getUserTransaction(context, true);
tx = Repository.getUserTransaction(context);
tx.begin();
Map<QName, Serializable> props = properties.getNodeService().getProperties(properties.getPerson().getNodeRef());

View File

@@ -992,7 +992,7 @@ public abstract class BaseAssociationEditor extends UIInput
if (contains != null && contains.length() > 0)
{
String safeContains = QueryParser.escape(contains.trim());
String safeContains = contains.trim();
// if the association's target is the person type search on the
// firstName and lastName properties instead of the name property
@@ -1002,9 +1002,9 @@ public abstract class BaseAssociationEditor extends UIInput
query.append(safeContains);
query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:lastName:\"*");
query.append(safeContains);
query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:userName:");
query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:userName:\"");
query.append(safeContains);
query.append("*)");
query.append("*\")");
}
else
{
@@ -1012,7 +1012,7 @@ public abstract class BaseAssociationEditor extends UIInput
String nameAttr = Repository.escapeQName(QName.createQName(
NamespaceService.CONTENT_MODEL_1_0_URI, "name"));
query.append(nameAttr);
query.append(":*" + safeContains + "*");
query.append(":\"*" + safeContains + "*\"");
}
}

View File

@@ -10,12 +10,14 @@ var OfficeNavigation =
CREATE_SPACE_TEMPLATE: 16,
OVERLAY_ANIM_LENGTH: 300,
OVERLAY_OPACITY: 0.7,
documentNames: [],
init: function()
{
$('overlayPanel').setStyle('opacity', 0);
OfficeNavigation.setupToggles();
OfficeNavigation.setupCreateSpace();
OfficeNavigation.getDocumentNames();
// Did we arrive here from the "Create collaboration space" shortcut?
if (window.queryObject.cc)
@@ -106,6 +108,16 @@ var OfficeNavigation =
panel.setStyle('height', panel.defaultHeight);
},
getDocumentNames: function()
{
OfficeNavigation.documentNames = [];
$$("#documentList .notVersionable").each(function(doc, i)
{
OfficeNavigation.documentNames.push(doc.getText());
});
},
showCreateSpace: function()
{
var panel = $('createSpacePanel');
@@ -223,16 +235,20 @@ var OfficeNavigation =
transition: Fx.Transitions.linear,
onComplete: function()
{
$('saveFilename').addEvent('keydown', function(event)
$('saveFilename').addEvent('keypress', function(event)
{
event = new Event(event);
if (event.key == 'enter')
{
OfficeNavigation.saveOK();
event.stop();
$('saveFilename').removeEvent('keypress');
}
else if (event.key == 'esc')
{
OfficeNavigation.saveCancel();
event.stop();
$('saveFilename').removeEvent('keypress');
}
});
$('saveFilename').focus();
@@ -240,18 +256,44 @@ var OfficeNavigation =
}).start({'opacity': 1});
this.fxOverlay.start(OfficeNavigation.OVERLAY_OPACITY);
if (panel != null)
{
this.popupPanel = panel;
this.popupPanel.currentPath = currentPath;
}
},
saveOK: function()
{
// Shortcut for double-event firing issue
if (this.popupPanel == null)
{
return;
}
var filename = $('saveFilename').value;
var currentPath = this.popupPanel.currentPath;
var cancelSave = false;
if (filename.length > 0)
{
// Trying to save over an existing non-versionable doc?
OfficeNavigation.documentNames.each(function(doc, i)
{
if ((doc == filename) || (doc == filename + ".doc"))
{
if (!confirm("The document exists and is not versionable. Overwrite this file?"))
{
cancelSave = true;
}
}
});
if (!cancelSave)
{
window.external.saveToAlfrescoAs(currentPath, filename);
}
}
OfficeNavigation.saveCancel();
},