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,
|
launchElement: null,
|
||||||
popupElement: null,
|
popupElement: null,
|
||||||
visible: false,
|
visible: false,
|
||||||
|
loading: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the AJAX request back to the server to get the node info.
|
* Makes the AJAX request back to the server to get the node info.
|
||||||
*/
|
*/
|
||||||
showNodeInfo: function()
|
showNodeInfo: function()
|
||||||
{
|
{
|
||||||
if (this.popupElement == null)
|
if (this.loading == false)
|
||||||
{
|
{
|
||||||
var elImg = Alfresco.Dom.getElementByTagName(this.launchElement, "img");
|
if (this.popupElement == null)
|
||||||
if (elImg != null)
|
|
||||||
{
|
{
|
||||||
elImg.src = getContextPath() + "/images/icons/ajax_anim.gif";
|
this.loading = true;
|
||||||
}
|
|
||||||
|
|
||||||
YAHOO.util.Connect.asyncRequest(
|
var elImg = Alfresco.Dom.getElementByTagName(this.launchElement, "img");
|
||||||
"POST",
|
if (elImg != null)
|
||||||
getContextPath() + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
|
|
||||||
{
|
{
|
||||||
success: this.loadNodeInfoHandler,
|
elImg.src = getContextPath() + "/images/icons/ajax_anim.gif";
|
||||||
failure: handleErrorYahoo, // global error handler
|
}
|
||||||
argument: [this.nodeRef, this]
|
|
||||||
},
|
YAHOO.util.Connect.asyncRequest(
|
||||||
"noderef=" + this.nodeRef);
|
"POST",
|
||||||
}
|
getContextPath() + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
|
||||||
else
|
{
|
||||||
{
|
success: this.loadNodeInfoHandler,
|
||||||
this.displayNodeInfo();
|
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
|
// keep track of the div element we created
|
||||||
panel.popupElement = div;
|
panel.popupElement = div;
|
||||||
|
panel.loading = false;
|
||||||
|
|
||||||
// display the div for the first time
|
// display the div for the first time
|
||||||
panel.displayNodeInfo();
|
panel.displayNodeInfo();
|
||||||
|
Reference in New Issue
Block a user