mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Delete space/document action added to MySpaces portlet.
Fixed subtle issue with ajax request being processed before outer txn was completed - caused refresh issues after Create/Upload/Delete actions. More ui improvements to MySpaces portlet. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -227,7 +227,7 @@ var MySpaces = {
|
||||
{
|
||||
if (!resource.isLoaded)
|
||||
{
|
||||
// fire off the ajax request to get the resources for this task
|
||||
// fire off the ajax request to get the preview panel content and actions
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
"POST",
|
||||
getContextPath() + '/ajax/invoke/NodeInfoBean.sendNodeInfo',
|
||||
@@ -513,18 +513,6 @@ var MySpaces = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancel button click handler for various pop-up panels
|
||||
*/
|
||||
closePopupPanel: function()
|
||||
{
|
||||
if (this.popupPanel != null)
|
||||
{
|
||||
this.popupPanel.setStyle("display", "none");
|
||||
this.popupPanel = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Display the Upload File pop-up panel
|
||||
*/
|
||||
@@ -590,6 +578,51 @@ var MySpaces = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete a space/document item
|
||||
*/
|
||||
deleteItem: function(name, noderef)
|
||||
{
|
||||
if (confirm("Are you sure you want to delete: " + name))
|
||||
{
|
||||
// ajax call to create space
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
"POST",
|
||||
getContextPath() + '/ajax/invoke/MySpacesBean.deleteItem',
|
||||
{
|
||||
success: function(response)
|
||||
{
|
||||
if (response.responseText.indexOf("OK:") == 0)
|
||||
{
|
||||
MySpaces.refreshList();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error during delete of item: " + response.responseText);
|
||||
}
|
||||
},
|
||||
failure: function(response)
|
||||
{
|
||||
alert("Error during delete of item: " + response.responseText);
|
||||
}
|
||||
},
|
||||
"noderef=" + noderef
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancel button click handler for various pop-up panels
|
||||
*/
|
||||
closePopupPanel: function()
|
||||
{
|
||||
if (this.popupPanel != null)
|
||||
{
|
||||
this.popupPanel.setStyle("display", "none");
|
||||
this.popupPanel = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh the main data list contents within the spacePanel container
|
||||
*/
|
||||
|
Reference in New Issue
Block a user