From 8efca80450d4c3d0ca945e843060eda280f7aa92 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Fri, 11 Mar 2011 15:40:00 +0000 Subject: [PATCH] Same fix as [1125] in the main trunk: Adjust the relative path to 'ajax.render.php' so that it can be called from the portal pages as well. SVN:1.0.2[1126] --- js/extkeywidget.js | 8 ++++---- js/linkswidget.js | 4 ++-- js/utils.js | 8 ++++---- js/wizard.utils.js | 4 ++-- js/wizardhelper.js | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/js/extkeywidget.js b/js/extkeywidget.js index 04210d1a4..2f140912d 100644 --- a/js/extkeywidget.js +++ b/js/extkeywidget.js @@ -114,7 +114,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper) me.StopPendingRequest(); // Run the query and display the results - me.ajax_request = $.post( 'ajax.render.php', theMap, + me.ajax_request = $.post( '../pages/ajax.render.php', theMap, function(data) { $(sSearchAreaId).html(data); @@ -150,7 +150,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper) me.StopPendingRequest(); // Run the query and get the result back directly in JSON - me.ajax_request = $.post( 'ajax.render.php', theMap, + me.ajax_request = $.post( '../pages/ajax.render.php', theMap, function(data) { $('#label_'+me.id).val(data.name); @@ -205,7 +205,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper) me.StopPendingRequest(); // Run the query and get the result back directly in HTML - me.ajax_request = $.post( 'ajax.render.php', theMap, + me.ajax_request = $.post( '../pages/ajax.render.php', theMap, function(data) { $('#ajax_'+me.id).html(data); @@ -275,7 +275,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper) me.StopPendingRequest(); // Run the query and get the result back directly in JSON - me.ajax_request = $.post( 'ajax.render.php', theMap, + me.ajax_request = $.post( '../pages/ajax.render.php', theMap, function(data) { if (me.bSelectMode) diff --git a/js/linkswidget.js b/js/linkswidget.js index 4102e0c4a..7b8aad2fe 100644 --- a/js/linkswidget.js +++ b/js/linkswidget.js @@ -96,7 +96,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates) $(sSearchAreaId).block(); // Run the query and display the results - $.post( 'ajax.render.php', theMap, + $.post( '../pages/ajax.render.php', theMap, function(data) { $(sSearchAreaId).html(data); @@ -147,7 +147,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates) theMap['operation'] = 'doAddObjects'; $('#busy_'+me.iInputId).html(' '); // Run the query and display the results - $.post( 'ajax.render.php', theMap, + $.post( '../pages/ajax.render.php', theMap, function(data) { //console.log('Data: ' + data); diff --git a/js/utils.js b/js/utils.js index 4121ecb6d..40a13a0bb 100644 --- a/js/utils.js +++ b/js/utils.js @@ -21,7 +21,7 @@ function ReloadTruncatedList(divId, sSerializedFilter, sExtraParams) console.log('Uh,uh, exception !'); } } - aTruncatedLists[divId] = $.post('ajax.render.php?style=list', + aTruncatedLists[divId] = $.post('../pages/ajax.render.php?style=list', { operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams }, function(data) { @@ -76,7 +76,7 @@ function ReloadBlock(divId, sStyle, sSerializedFilter, sExtraParams) { $('#'+divId).block(); //$('#'+divId).blockUI(); - $.post('ajax.render.php?style='+sStyle, + $.post('../pages/ajax.render.php?style='+sStyle, { operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams }, function(data){ $('#'+divId).empty(); @@ -136,7 +136,7 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext) } } - $.post('ajax.render.php?'+sContext, + $.post('../pages/ajax.render.php?'+sContext, { operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId }, function(data) { oDiv.empty(); @@ -182,7 +182,7 @@ function SetUserPreference(sPreferenceCode, sPrefValue, bPersistent) oUserPreferences[sPreferenceCode] = sPrefValue; if (bPersistent && (sPrefValue != sPreviousValue)) { - ajax_request = $.post('ajax.render.php', + ajax_request = $.post('../pages/ajax.render.php', { operation: 'set_pref', code: sPreferenceCode, value: sPrefValue} ); // Make it persistent } } diff --git a/js/wizard.utils.js b/js/wizard.utils.js index f41e2bff0..7ed4b7330 100644 --- a/js/wizard.utils.js +++ b/js/wizard.utils.js @@ -9,7 +9,7 @@ function UpdateObjectList(sClass, sId, sExtKeyToRemote) aRelatedObjectIds[0] = 0; } var oql = "SELECT "+sClass+" AS c WHERE c.id IN (" + aRelatedObjectIds.join(", ") + ")"; - $.post("ajax.render.php?style=list&encoding=oql", + $.post("../pages/ajax.render.php?style=list&encoding=oql", { operation: "ajax", filter: oql }, function(data){ $("#related_objects_"+sId).empty(); @@ -42,7 +42,7 @@ function ManageObjects(sTitle, sClass, sId, sExtKeyToRemote) function Manage_LoadSelect(sSelectedId, sFilter) { $('#'+sSelectedId).addClass('loading'); - $.post('ajax.render.php', + $.post('../pages/ajax.render.php', { operation: 'combo_options', filter: sFilter }, function(data){ $('#'+sSelectedId).empty(); diff --git a/js/wizardhelper.js b/js/wizardhelper.js index 123a567cf..68d2b2aaf 100644 --- a/js/wizardhelper.js +++ b/js/wizardhelper.js @@ -133,7 +133,7 @@ function WizardHelper(sClass, sFormPrefix) { //console.log('data sent:', this.ToJSON()); //console.log('oWizard:', this); - $.post('ajax.render.php', + $.post('../pages/ajax.render.php', { operation: 'wizard_helper', json_obj: this.ToJSON() }, function(html){ $('#ajax_content').html(html); @@ -149,7 +149,7 @@ function WizardHelper(sClass, sFormPrefix) { //console.log('data sent:', this.ToJSON()); //console.log('oWizard:', this); - $('#'+divId).load('ajax.render.php?operation=wizard_helper_preview', + $('#'+divId).load('../pages/ajax.render.php?operation=wizard_helper_preview', {'json_obj': this.ToJSON()}, function(responseText, textStatus, XMLHttpRequest){ $('#wizStep'+ G_iCurrentStep).unblock( {fadeOut: 0} );