05-13-2014 10:41 AM
<script type="text/javascript">//<![CDATA[
(function() {
YAHOO.util.Event.onContentReady("${controlId}-targetPath", function() {
var params = Alfresco.util.getQueryStringParameters();
var nodeRef = params.nodeRef;
if(nodeRef!=null){
var node=Alfresco.util.NodeRef(nodeRef);
document.getElementById('${controlId}-path').value=node.uri;
document.getElementById('${controlId}-targetPath').value=nodeRef;
}
});
})();
//]]></script>
05-14-2014 05:06 AM
displayByNodeRef: function Location_displayByNodeRef(nodeRef)
{
// Find the path for the nodeRef
if (YAHOO.lang.isString(nodeRef))
{
nodeRef = Alfresco.util.NodeRef(nodeRef);
}
if (nodeRef)
{
var url = Alfresco.constants.PROXY_URI + "slingshot/doclib/node/" + nodeRef.uri + "/location";
if (this.options.siteId === "" && this.options.rootNode)
{
// Repository mode
url += "?libraryRoot=" + encodeURIComponent(this.options.rootNode.toString());
}
Alfresco.util.Ajax.jsonGet(
{
url: url,
successCallback:
{
fn: function(response)
{
if (response.json !== undefined)
{
var locations = response.json;
this._locations = locations;
if (locations.site)
{
this.displayByPath($combine(locations.site.path, locations.site.file), locations.site.site, locations.site.siteTitle);
}
else
{
this.displayByPath($combine(locations.repo.path, locations.repo.file));
}
YAHOO.Bubbling.fire("itemLocationLoaded",
{
eventGroup: this,
locations: locations
});
}
},
scope: this
},
failureCallback:
{
fn: function(response)
{
if (this.widgets.spanEl)
{
this.widgets.spanEl.innerHTML = '<span class="location error">' + this.msg("message.failure") + '</span>';
}
},
scope: this
}
});
}
else
{
this.widgets.spanEl.innerHTML = '<span class="location-none">' + this.msg("location.label.none") + '</span>';
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.