Make sure that the AJax calls use a full/absolute path to the page they call so that they can be embedded anywhere inside the application (i.e. in plug-ins supplied pages as well as 'regular' app pages).

SVN:trunk[1364]
This commit is contained in:
Denis Flaven
2011-07-26 12:21:53 +00:00
parent aee8a98d84
commit 3fde682653
14 changed files with 38 additions and 83 deletions

View File

@@ -90,40 +90,12 @@ function ActivateStep(iTargetStep)
//$('#wizStep'+(iTargetStep)).block({ message: null });
}
//function AjaxGetValuesDef(oObj, sClass, sAttCode, iFieldId)
//{
// var oJSON = document.getElementById(sJsonFieldId);
// $.get('ajax.render.php?class=' + sClass + '&json_obj=' + oJSON.value + '&att_code=' + sAttCode,
// { operation: "allowed_values" },
// function(data){
// //$('#field_'+iFieldId).html(data);
// }
// );
//}
//
//function AjaxGetDefaultValue(oObj, sClass, sAttCode, iFieldId)
//{
// // Asynchronously call the server to provide a default value if the field is
// // empty
// if (oObj['m_aCurrValues'][sAttCode] == '')
// {
// var oJSON = document.getElementById(sJsonFieldId);
// $.get('../pages/ajax.render.php?class=' + sClass + '&json_obj=' + oJSON.value + '&att_code=' + sAttCode,
// { operation: "default_value" },
// function(json_data){
// var oObj = ReloadObjectFromServer(json_data);
// UpdateFieldFromObject(iFieldId, aFieldsMap, oObj)
// }
// );
// }
//}
function OnUnload(sTransactionId)
{
if (!window.bInSubmit)
{
// If it's not a submit, then it's a "cancel" (Pressing the Cancel button, closing the window, using the back button...)
$.post('../pages/ajax.render.php', {operation: 'on_form_cancel', transaction_id: sTransactionId }, function()
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', {operation: 'on_form_cancel', transaction_id: sTransactionId }, function()
{
// Do nothing for now...
});