mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Office add-in collaboration updates
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -91,17 +91,32 @@ var OfficeAddin =
|
||||
},
|
||||
|
||||
/* AJAX call to perform server-side actions */
|
||||
runAction: function(useTemplate, Action, Doc, Msg, extraParams)
|
||||
getAction: function(useTemplate, action, nodeId, confirmMsg, inParams, outParams)
|
||||
{
|
||||
if (Msg != "" && !confirm(Msg))
|
||||
return OfficeAddin.runAction("get", useTemplate, action, nodeId, confirmMsg, inParams, outParams)
|
||||
},
|
||||
postAction: function(useTemplate, action, nodeId, confirmMsg, inParams, outParams)
|
||||
{
|
||||
return OfficeAddin.runAction("post", useTemplate, action, nodeId, confirmMsg, inParams, outParams)
|
||||
},
|
||||
runAction: function(httpMethod, useTemplate, action, nodeId, confirmMsg, inParams, outParams)
|
||||
{
|
||||
if ((confirmMsg != null) && (confirmMsg != ""))
|
||||
{
|
||||
return;
|
||||
if (!confirm(confirmMsg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
OfficeAddin.showStatusText("Running action...", "ajax_anim.gif", false);
|
||||
var actionURL = useTemplate + "?a=" + Action + "&d=" + Doc;
|
||||
var actionURL = useTemplate + "?a=" + action + "&n=" + nodeId;
|
||||
if ((inParams != null) && (inParams != ""))
|
||||
{
|
||||
actionURL += "&" + inParams;
|
||||
}
|
||||
var myAjax = new Ajax(actionURL, {
|
||||
method: 'get',
|
||||
method: httpMethod,
|
||||
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
|
||||
onComplete: function(textResponse, xmlResponse)
|
||||
{
|
||||
@@ -114,12 +129,14 @@ var OfficeAddin =
|
||||
{
|
||||
href += (href.indexOf("?") == -1) ? "?" : "&";
|
||||
href += "st=" + encodeURI(textResponse);
|
||||
href += "&" + extraParams;
|
||||
if ((outParams != null) && (outParams != ""))
|
||||
{
|
||||
href += "&" + outParams;
|
||||
}
|
||||
}
|
||||
window.location.href = href;
|
||||
}
|
||||
});
|
||||
myAjax.request();
|
||||
}).request();
|
||||
},
|
||||
|
||||
/* Calculates and returns the context path for the current page */
|
||||
|
Reference in New Issue
Block a user