mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for AWC-1320
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6168 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -85,18 +85,7 @@ public class UINodeInfo extends SelfRenderingComponent
|
||||
{
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
|
||||
// write out the JavaScript specific to the NodeInfo component,
|
||||
// make sure it's only done once
|
||||
Object present = context.getExternalContext().getRequestMap().
|
||||
get(NODE_INFO_SCRIPTS_WRITTEN);
|
||||
if (present == null)
|
||||
{
|
||||
out.write("<script>var AlfNodeInfoMgr = new Alfresco.PanelManager(" +
|
||||
"\"NodeInfoBean.sendNodeInfo\", \"noderef\");</script>");
|
||||
|
||||
context.getExternalContext().getRequestMap().put(
|
||||
NODE_INFO_SCRIPTS_WRITTEN, Boolean.TRUE);
|
||||
}
|
||||
outputNodeInfoScripts(context, out);
|
||||
|
||||
// wrap the child components in a <span> that has the onmouseover
|
||||
// event which kicks off the request for node information
|
||||
@@ -108,6 +97,20 @@ public class UINodeInfo extends SelfRenderingComponent
|
||||
}
|
||||
}
|
||||
|
||||
protected static void outputNodeInfoScripts(FacesContext context, ResponseWriter out) throws IOException
|
||||
{
|
||||
// write out the JavaScript specific to the NodeInfo component, ensure it's only done once
|
||||
Object present = context.getExternalContext().getRequestMap().get(NODE_INFO_SCRIPTS_WRITTEN);
|
||||
if (present == null)
|
||||
{
|
||||
out.write("<script>var AlfNodeInfoMgr = new Alfresco.PanelManager(" +
|
||||
"\"NodeInfoBean.sendNodeInfo\", \"noderef\");</script>");
|
||||
|
||||
context.getExternalContext().getRequestMap().put(
|
||||
NODE_INFO_SCRIPTS_WRITTEN, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeEnd(FacesContext context) throws IOException
|
||||
{
|
||||
|
@@ -96,6 +96,9 @@ public class UIOpenSearch extends SelfRenderingComponent
|
||||
context.getExternalContext().getRequestMap().put(SCRIPTS_WRITTEN, Boolean.TRUE);
|
||||
}
|
||||
|
||||
// we use summary info panel pop-ups so need scripts for that object
|
||||
UINodeInfo.outputNodeInfoScripts(context, out);
|
||||
|
||||
// write out the javascript initialisation required
|
||||
out.write("<script type='text/javascript'>\n");
|
||||
out.write("var ");
|
||||
|
Reference in New Issue
Block a user