MyTasks template task transition commands now refesh page and set status message on complete.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5608 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-03 15:50:42 +00:00
parent 52950cfcfb
commit ae8c4f9bb5
2 changed files with 34 additions and 5 deletions

View File

@@ -233,6 +233,32 @@ var MyTasks = {
});
fxInfo.start(animInfo);
});
},
transitionTask: function(tUrl, rUrl, successMessage)
{
YAHOO.util.Connect.asyncRequest(
"GET",
getContextPath() + tUrl,
{
success: function(response)
{
window.location.href = rUrl + "&_rand=" + Math.floor(Math.random()*99999) +
"&" + "m=" + successMessage;
},
failure: function(e)
{
alert(e.status + " : ERROR failed to transition task.");
window.location.href = rUrl + "&_rand=" + Math.floor(Math.random()*99999);
}
}
);
},
displayMessage: function(message)
{
var footer = $('taskFooter');
footer.innerHTML = message + ' ' + footer.innerHTML
}
};