mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Pop-up ajax node info panel - fix for multiple clicks
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5370 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -93,33 +93,39 @@ Alfresco.NodeInfoPanel.prototype =
|
||||
launchElement: null,
|
||||
popupElement: null,
|
||||
visible: false,
|
||||
loading: false,
|
||||
|
||||
/**
|
||||
* Makes the AJAX request back to the server to get the node info.
|
||||
*/
|
||||
showNodeInfo: function()
|
||||
{
|
||||
if (this.popupElement == null)
|
||||
if (this.loading == false)
|
||||
{
|
||||
var elImg = Alfresco.Dom.getElementByTagName(this.launchElement, "img");
|
||||
if (elImg != null)
|
||||
if (this.popupElement == null)
|
||||
{
|
||||
elImg.src = getContextPath() + "/images/icons/ajax_anim.gif";
|
||||
this.loading = true;
|
||||
|
||||
var elImg = Alfresco.Dom.getElementByTagName(this.launchElement, "img");
|
||||
if (elImg != null)
|
||||
{
|
||||
elImg.src = getContextPath() + "/images/icons/ajax_anim.gif";
|
||||
}
|
||||
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
"POST",
|
||||
getContextPath() + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
|
||||
{
|
||||
success: this.loadNodeInfoHandler,
|
||||
failure: handleErrorYahoo, // global error handler
|
||||
argument: [this.nodeRef, this]
|
||||
},
|
||||
"noderef=" + this.nodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.displayNodeInfo();
|
||||
}
|
||||
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
"POST",
|
||||
getContextPath() + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
|
||||
{
|
||||
success: this.loadNodeInfoHandler,
|
||||
failure: handleErrorYahoo, // global error handler
|
||||
argument: [this.nodeRef, this]
|
||||
},
|
||||
"noderef=" + this.nodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.displayNodeInfo();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -148,6 +154,7 @@ Alfresco.NodeInfoPanel.prototype =
|
||||
|
||||
// keep track of the div element we created
|
||||
panel.popupElement = div;
|
||||
panel.loading = false;
|
||||
|
||||
// display the div for the first time
|
||||
panel.displayNodeInfo();
|
||||
|
Reference in New Issue
Block a user