From 77b1de82da2ce52298f97c5e30ec9826ff649ce9 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 22 May 2007 09:55:49 +0000 Subject: [PATCH] Fix to issue with dangling events after ajax refresh of main panel in MySpaces portlet git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5748 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/web/scripts/ajax/myspaces.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/web/scripts/ajax/myspaces.js b/source/web/scripts/ajax/myspaces.js index c986e63e55..3c5ac970f1 100644 --- a/source/web/scripts/ajax/myspaces.js +++ b/source/web/scripts/ajax/myspaces.js @@ -265,6 +265,9 @@ var MySpaces = { anim.start({'opacity': 1}); }, + /** + * OK button click handler for the Upload File pop-up panel + */ uploadOK: function(actionEl, path) { // call the upload help to perform the upload @@ -278,18 +281,27 @@ var MySpaces = { this.uploadClose(actionEl); }, + /** + * Cancel button click handler for the Upload File pop-up panel + */ uploadClose: function(actionEl) { var panel = $(actionEl).getParent(); panel.setStyle("display", "none"); }, + /** + * Callback function executed after the upload of a new file is complete + */ uploadCompleteHandler: function(id, path, fileName, error) { if (error == null) { // empty the main panel div and restart by reloading the panel contents - $('spacePanel').empty(); + var spacePanel = $('spacePanel'); + spacePanel.setStyle('visibility', 'hidden'); + spacePanel.empty(); + spacePanel.removeEvents('mouseleave'); MySpaces.start(); } else