Usability updates for MySpaces and Doclist portlets

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6249 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-07-13 16:59:01 +00:00
parent e10fb4c065
commit 4136af3cde
10 changed files with 247 additions and 49 deletions

View File

@@ -506,3 +506,39 @@ function uploadCompleteHelper(id, args)
upload.path.replace(/.*[\/\\]([^\/\\]+)/, "$1"),
args.error != "${UPLOAD_ERROR}" ? args.error : null);
}
var openWindowCallbackFn = null;
function openWindowCallback(url, callback)
{
// Store the callback function for later
openWindowCallbackFn = callback;
// Register our "well known" callback function
window.alfrescoCallback = openWindowOnCallback;
// Use a named window so that only one dialog is active at a time
window.open(url, 'alfrescoDialog', 'width=1024,height=768');
}
function openWindowOnCallback(fromTimeout)
{
if (typeof(fromTimeout)=='undefined')
{
window.setTimeout("openWindowOnCallback(true)", 10);
}
else
{
// Clear out the global callback function
window.alfrescoCallback = null;
// Try the callback function
try
{
openWindowCallbackFn();
}
catch (e)
{
}
openWindowCallbackFn = null;
}
}