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>
|
||||||
<div id="nonStatusText">
|
<div id="nonStatusText">
|
||||||
<ul>
|
<ul>
|
||||||
<#if (path?length != 0)>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#" onclick="OfficeNavigation.saveToAlfresco('${currentPath}')">
|
<a href="#" onclick="OfficeNavigation.saveToAlfresco('${currentPath}')">
|
||||||
<img src="${url.context}/images/office/save_to_alfresco.gif" alt="Save to Alfresco" />
|
<img src="${url.context}/images/office/save_to_alfresco.gif" alt="Save to Alfresco" />
|
||||||
@@ -208,7 +207,6 @@
|
|||||||
</a>
|
</a>
|
||||||
<br />Save the document to the current Space.
|
<br />Save the document to the current Space.
|
||||||
</li>
|
</li>
|
||||||
</#if>
|
|
||||||
<#if args.search?exists>
|
<#if args.search?exists>
|
||||||
<li>
|
<li>
|
||||||
<a href="${url.serviceContext}/office/search${defaultQuery?html}&searchagain=${args.search?url}&maxresults=${args.maxresults}">
|
<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);
|
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 ((args.p) && (args.p != ""))
|
||||||
if (path == "/" + companyhome.name)
|
|
||||||
{
|
{
|
||||||
model.node = companyhome;
|
var path = args.p;
|
||||||
}
|
if (path == "/" + companyhome.name)
|
||||||
else
|
|
||||||
{
|
|
||||||
var node = companyhome.childByNamePath(path.substring(companyhome.name.length));
|
|
||||||
if (node != null)
|
|
||||||
{
|
{
|
||||||
model.node = node;
|
model.node = companyhome;
|
||||||
}
|
}
|
||||||
else
|
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;
|
model.node = userhome;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user