mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to "save to alfresco" link not appearing. Better handling of invalid nodeRefs.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -200,7 +200,6 @@
|
||||
</div>
|
||||
<div id="nonStatusText">
|
||||
<ul>
|
||||
<#if (path?length != 0)>
|
||||
<li>
|
||||
<a href="#" onclick="OfficeNavigation.saveToAlfresco('${currentPath}')">
|
||||
<img src="${url.context}/images/office/save_to_alfresco.gif" alt="Save to Alfresco" />
|
||||
@@ -208,7 +207,6 @@
|
||||
</a>
|
||||
<br />Save the document to the current Space.
|
||||
</li>
|
||||
</#if>
|
||||
<#if args.search?exists>
|
||||
<li>
|
||||
<a href="${url.serviceContext}/office/search${defaultQuery?html}&searchagain=${args.search?url}&maxresults=${args.maxresults}">
|
||||
|
@@ -3,27 +3,34 @@ if ((args.n) && (args.n != ""))
|
||||
{
|
||||
model.node = search.findNode("workspace://SpacesStore/" + args.n);
|
||||
}
|
||||
else if ((args.p) && (args.p != ""))
|
||||
|
||||
// Check here in case invalid nodeRef passed-in
|
||||
if (model.node == null)
|
||||
{
|
||||
var path = args.p;
|
||||
if (path == "/" + companyhome.name)
|
||||
if ((args.p) && (args.p != ""))
|
||||
{
|
||||
model.node = companyhome;
|
||||
}
|
||||
else
|
||||
{
|
||||
var node = companyhome.childByNamePath(path.substring(companyhome.name.length));
|
||||
if (node != null)
|
||||
var path = args.p;
|
||||
if (path == "/" + companyhome.name)
|
||||
{
|
||||
model.node = node;
|
||||
model.node = companyhome;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.node = userhome;
|
||||
var node = companyhome.childByNamePath(path.substring(companyhome.name.length));
|
||||
if (node != null)
|
||||
{
|
||||
model.node = node;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.node = userhome;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// Last chance - default to userhome
|
||||
if (model.node == null)
|
||||
{
|
||||
model.node = userhome;
|
||||
}
|
||||
|
Reference in New Issue
Block a user