Portlet webscript updates:

MySpaces portlet changed to use ajax update to main list div.
Upload file now refreshes list after upload complete.
Manual refresh icon added to MySpaces and MyDocs portlets.
Removed video preview from pop-up panel in portlets (unstable in Firefox).
Manic scrollbar flicking fixed in MyDocs and MySpaces portlets.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5736 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-21 17:46:52 +00:00
parent 6419aef81e
commit ed5b547943
10 changed files with 186 additions and 96 deletions

View File

@@ -5,16 +5,48 @@ var MySpaces = {
DETAIL_MARGIN: 56,
TITLE_FONT_SIZE: 18,
fileInput: null,
Path: null,
Filter: null,
Home: null,
start: function()
{
if ($('spacePanel'))
{
MySpaces.parseSpacePanels();
$('spacePanel').setStyle('visibility', 'visible');
// fire off the ajax request to populate the spaces list - the 'myspacespanel' webscript
// is responsible for rendering just the contents of the main panel div
YAHOO.util.Connect.asyncRequest(
"GET",
getContextPath() + '/service/myspacespanel?p='+MySpaces.Path+'&f='+MySpaces.Filter+'&h='+MySpaces.Home,
{
success: function(response)
{
// push the response into the space panel div
$('spacePanel').setHTML(response.responseText);
// extract the count value from a hidden div and display it
$('spaceCount').setHTML($('spaceCountValue').innerHTML);
// wire up all the events and animations
MySpaces.init();
},
failure: function(response)
{
$('spacePanel').setHTML("Sorry, preview currently unavailable.");
}
}
);
}
},
init: function()
{
MySpaces.parseSpacePanels();
$('spacePanel').setStyle('visibility', 'visible');
},
/**
* Perform the operations required to add the events and animations required to anim various
* nodes when the user mouseovers and clicks on rows in the space panel
*/
parseSpacePanels: function()
{
var spaces = $$('#spacePanel .spaceRow');
@@ -256,8 +288,9 @@ var MySpaces = {
{
if (error == null)
{
// TODO: refresh!
alert("Uploaded: " + fileName);
// empty the main panel div and restart by reloading the panel contents
$('spacePanel').empty();
MySpaces.start();
}
else
{