mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
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:
@@ -178,36 +178,6 @@ class DisplayBlock
|
|||||||
public function Display(WebPage $oPage, $sId, $aExtraParams = array())
|
public function Display(WebPage $oPage, $sId, $aExtraParams = array())
|
||||||
{
|
{
|
||||||
$oPage->add($this->GetDisplay($oPage, $sId, $aExtraParams));
|
$oPage->add($this->GetDisplay($oPage, $sId, $aExtraParams));
|
||||||
/*
|
|
||||||
$aExtraParams = array_merge($aExtraParams, $this->m_aParams);
|
|
||||||
$aExtraParams['block_id'] = $sId;
|
|
||||||
if (!$this->m_bAsynchronous)
|
|
||||||
{
|
|
||||||
// render now
|
|
||||||
$oPage->add("<div id=\"$sId\" class=\"display_block\">\n");
|
|
||||||
$this->RenderContent($oPage, $aExtraParams);
|
|
||||||
$oPage->add("</div>\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// render it as an Ajax (asynchronous) call
|
|
||||||
$sFilter = $this->m_oFilter->serialize();
|
|
||||||
$oPage->add("<div id=\"$sId\" class=\"display_block loading\">\n");
|
|
||||||
$oPage->p("<img src=\"../images/indicator_arrows.gif\"> Loading...");
|
|
||||||
$oPage->add("</div>\n");
|
|
||||||
$oPage->add('
|
|
||||||
<script language="javascript">
|
|
||||||
$.post("ajax.render.php?style='.$this->m_sStyle.'",
|
|
||||||
{ operation: "ajax", filter: "$sFilter" },
|
|
||||||
function(data){
|
|
||||||
$("#'.$sId.'").empty();
|
|
||||||
$("#'.$sId.'").append(data);
|
|
||||||
$("#'.$sId.'").removeClass("loading");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>'); // TO DO: add support for $aExtraParams in asynchronous/Ajax mode
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetDisplay(WebPage $oPage, $sId, $aExtraParams = array())
|
public function GetDisplay(WebPage $oPage, $sId, $aExtraParams = array())
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class iTopWebPage extends NiceWebPage
|
|||||||
$this->m_aTabs = array();
|
$this->m_aTabs = array();
|
||||||
$this->m_sMenu = "";
|
$this->m_sMenu = "";
|
||||||
$this->m_sMessage = '';
|
$this->m_sMessage = '';
|
||||||
|
$sAbsURLAppRoot = addslashes(utils::GetAbsoluteUrlAppRoot()); // Pass it to Javascript scripts
|
||||||
$oAppContext = new ApplicationContext();
|
$oAppContext = new ApplicationContext();
|
||||||
$sExtraParams = $oAppContext->GetForLink();
|
$sExtraParams = $oAppContext->GetForLink();
|
||||||
$this->add_header("Content-type: text/html; charset=utf-8");
|
$this->add_header("Content-type: text/html; charset=utf-8");
|
||||||
@@ -382,6 +383,11 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetAbsoluteUrlAppRoot()
|
||||||
|
{
|
||||||
|
return '$sAbsURLAppRoot';
|
||||||
|
}
|
||||||
|
|
||||||
var oUserPreferences = $sUserPrefs;
|
var oUserPreferences = $sUserPrefs;
|
||||||
|
|
||||||
// For disabling the CKEditor at init time when the corresponding textarea is disabled !
|
// For disabling the CKEditor at init time when the corresponding textarea is disabled !
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class PortalWebPage extends NiceWebPage
|
|||||||
$this->add_header("Cache-control: no-cache");
|
$this->add_header("Cache-control: no-cache");
|
||||||
$this->add_linked_stylesheet("../css/jquery.treeview.css");
|
$this->add_linked_stylesheet("../css/jquery.treeview.css");
|
||||||
$this->add_linked_stylesheet("../css/jquery.autocomplete.css");
|
$this->add_linked_stylesheet("../css/jquery.autocomplete.css");
|
||||||
|
$sAbsURLAppRoot = addslashes(utils::GetAbsoluteUrlAppRoot()); // Pass it to Javascript scripts
|
||||||
if ($sAlternateStyleSheet != '')
|
if ($sAlternateStyleSheet != '')
|
||||||
{
|
{
|
||||||
$this->add_linked_stylesheet("../portal/$sAlternateStyleSheet/portal.css");
|
$this->add_linked_stylesheet("../portal/$sAlternateStyleSheet/portal.css");
|
||||||
@@ -150,6 +151,12 @@ EOF
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function GetAbsoluteUrlAppRoot()
|
||||||
|
{
|
||||||
|
return '$sAbsURLAppRoot';
|
||||||
|
}
|
||||||
|
|
||||||
function GoBack(sFormId)
|
function GoBack(sFormId)
|
||||||
{
|
{
|
||||||
var form = $('#'+sFormId);
|
var form = $('#'+sFormId);
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class UILinksWizard
|
|||||||
function AddObjects()
|
function AddObjects()
|
||||||
{
|
{
|
||||||
// TO DO: compute the list of objects already linked with the current Object
|
// TO DO: compute the list of objects already linked with the current Object
|
||||||
$.post( '../pages/ajax.render.php', { 'operation': 'addObjects',
|
$.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', { 'operation': 'addObjects',
|
||||||
'class': '{$this->m_sClass}',
|
'class': '{$this->m_sClass}',
|
||||||
'linkageAttr': '{$this->m_sLinkageAttr}',
|
'linkageAttr': '{$this->m_sLinkageAttr}',
|
||||||
'linkedClass': '{$this->m_sLinkedClass}',
|
'linkedClass': '{$this->m_sLinkedClass}',
|
||||||
@@ -175,7 +175,7 @@ class UILinksWizard
|
|||||||
theMap['operation'] = 'searchObjectsToAdd';
|
theMap['operation'] = 'searchObjectsToAdd';
|
||||||
|
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
$.post( '../pages/ajax.render.php', theMap,
|
$.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#SearchResultsToAdd').html(data);
|
$('#SearchResultsToAdd').html(data);
|
||||||
@@ -223,7 +223,7 @@ class UILinksWizard
|
|||||||
theMap['operation'] = 'doAddObjects';
|
theMap['operation'] = 'doAddObjects';
|
||||||
|
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
$.post( '../pages/ajax.render.php', theMap,
|
$.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
//console.log('Data: ' + data);
|
//console.log('Data: ' + data);
|
||||||
|
|||||||
@@ -999,7 +999,7 @@ EOF
|
|||||||
<<<EOF
|
<<<EOF
|
||||||
function OnTruncatedHistoryToggle(bShowAll)
|
function OnTruncatedHistoryToggle(bShowAll)
|
||||||
{
|
{
|
||||||
$.get('../pages/ajax.render.php?{$sAppContext}', {operation: 'displayCSVHistory', showall: bShowAll}, function(data)
|
$.get(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?{$sAppContext}', {operation: 'displayCSVHistory', showall: bShowAll}, function(data)
|
||||||
{
|
{
|
||||||
$('#$sAjaxDivId').html(data);
|
$('#$sAjaxDivId').html(data);
|
||||||
var table = $('#$sAjaxDivId .listResults');
|
var table = $('#$sAjaxDivId .listResults');
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and get the result back directly in HTML
|
// Run the query and get the result back directly in HTML
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#ac_dlg_'+me.id).html(data);
|
$('#ac_dlg_'+me.id).html(data);
|
||||||
@@ -163,7 +163,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$(sSearchAreaId).html(data);
|
$(sSearchAreaId).html(data);
|
||||||
@@ -208,7 +208,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and get the result back directly in JSON
|
// Run the query and get the result back directly in JSON
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#label_'+me.id).val(data.name);
|
$('#label_'+me.id).val(data.name);
|
||||||
@@ -270,7 +270,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and get the result back directly in HTML
|
// Run the query and get the result back directly in HTML
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#ajax_'+me.id).html(data);
|
$('#ajax_'+me.id).html(data);
|
||||||
@@ -347,7 +347,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and get the result back directly in JSON
|
// Run the query and get the result back directly in JSON
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
if (me.bSelectMode)
|
if (me.bSelectMode)
|
||||||
@@ -432,7 +432,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#ac_tree_'+me.id).html(data);
|
$('#ac_tree_'+me.id).html(data);
|
||||||
@@ -490,7 +490,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and get the result back directly in JSON
|
// Run the query and get the result back directly in JSON
|
||||||
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
me.ajax_request = $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#label_'+me.id).val(data.name);
|
$('#label_'+me.id).val(data.name);
|
||||||
|
|||||||
@@ -90,40 +90,12 @@ function ActivateStep(iTargetStep)
|
|||||||
//$('#wizStep'+(iTargetStep)).block({ message: null });
|
//$('#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)
|
function OnUnload(sTransactionId)
|
||||||
{
|
{
|
||||||
if (!window.bInSubmit)
|
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...)
|
// 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...
|
// Do nothing for now...
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ function sprintf(format, etc) {
|
|||||||
s_order = (s[1] == 0) ? 'asc' : 'desc';
|
s_order = (s[1] == 0) ? 'asc' : 'desc';
|
||||||
}
|
}
|
||||||
$('#loading', table.config.container).html('<img src="../images/indicator.gif" />');
|
$('#loading', table.config.container).html('<img src="../images/indicator.gif" />');
|
||||||
table.ajax_request = $.post("../pages/ajax.render.php",
|
table.ajax_request = $.post(GetAbsoluteUrlAppRoot()+"pages/ajax.render.php",
|
||||||
{ operation: 'pagination',
|
{ operation: 'pagination',
|
||||||
filter: c.filter,
|
filter: c.filter,
|
||||||
extra_param: c.extra_params,
|
extra_param: c.extra_params,
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates)
|
|||||||
$(sSearchAreaId).block();
|
$(sSearchAreaId).block();
|
||||||
|
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
$.post( '../pages/ajax.render.php', theMap,
|
$.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$(sSearchAreaId).html(data);
|
$(sSearchAreaId).html(data);
|
||||||
@@ -198,7 +198,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates)
|
|||||||
theMap['operation'] = 'doAddObjects';
|
theMap['operation'] = 'doAddObjects';
|
||||||
$('#busy_'+me.iInputId).html(' <img src="../images/indicator.gif"/>');
|
$('#busy_'+me.iInputId).html(' <img src="../images/indicator.gif"/>');
|
||||||
// Run the query and display the results
|
// Run the query and display the results
|
||||||
$.post( '../pages/ajax.render.php', theMap,
|
$.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
//console.log('Data: ' + data);
|
//console.log('Data: ' + data);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ function ReloadBlock(divId, sStyle, sSerializedFilter, sExtraParams)
|
|||||||
{
|
{
|
||||||
$('#'+divId).block();
|
$('#'+divId).block();
|
||||||
//$('#'+divId).blockUI();
|
//$('#'+divId).blockUI();
|
||||||
$.post('../pages/ajax.render.php?style='+sStyle,
|
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?style='+sStyle,
|
||||||
{ operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams },
|
{ operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams },
|
||||||
function(data){
|
function(data){
|
||||||
$('#'+divId).empty();
|
$('#'+divId).empty();
|
||||||
@@ -119,7 +119,7 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
|
|||||||
}
|
}
|
||||||
sAction = $('#ds_'+divId+' form').attr('action');
|
sAction = $('#ds_'+divId+' form').attr('action');
|
||||||
|
|
||||||
$.post('../pages/ajax.render.php?'+sContext,
|
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?'+sContext,
|
||||||
{ operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId, action: sAction },
|
{ operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId, action: sAction },
|
||||||
function(data) {
|
function(data) {
|
||||||
oDiv.empty();
|
oDiv.empty();
|
||||||
@@ -165,7 +165,7 @@ function SetUserPreference(sPreferenceCode, sPrefValue, bPersistent)
|
|||||||
oUserPreferences[sPreferenceCode] = sPrefValue;
|
oUserPreferences[sPreferenceCode] = sPrefValue;
|
||||||
if (bPersistent && (sPrefValue != sPreviousValue))
|
if (bPersistent && (sPrefValue != sPreviousValue))
|
||||||
{
|
{
|
||||||
ajax_request = $.post('../pages/ajax.render.php',
|
ajax_request = $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
||||||
{ operation: 'set_pref', code: sPreferenceCode, value: sPrefValue} ); // Make it persistent
|
{ operation: 'set_pref', code: sPreferenceCode, value: sPrefValue} ); // Make it persistent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function UpdateObjectList(sClass, sId, sExtKeyToRemote)
|
|||||||
aRelatedObjectIds[0] = 0;
|
aRelatedObjectIds[0] = 0;
|
||||||
}
|
}
|
||||||
var oql = "SELECT "+sClass+" AS c WHERE c.id IN (" + aRelatedObjectIds.join(", ") + ")";
|
var oql = "SELECT "+sClass+" AS c WHERE c.id IN (" + aRelatedObjectIds.join(", ") + ")";
|
||||||
$.post("ajax.render.php?style=list&encoding=oql",
|
$.post(GetAbsoluteUrlAppRoot()+"ajax.render.php?style=list&encoding=oql",
|
||||||
{ operation: "ajax", filter: oql },
|
{ operation: "ajax", filter: oql },
|
||||||
function(data){
|
function(data){
|
||||||
$("#related_objects_"+sId).empty();
|
$("#related_objects_"+sId).empty();
|
||||||
@@ -42,7 +42,7 @@ function ManageObjects(sTitle, sClass, sId, sExtKeyToRemote)
|
|||||||
function Manage_LoadSelect(sSelectedId, sFilter)
|
function Manage_LoadSelect(sSelectedId, sFilter)
|
||||||
{
|
{
|
||||||
$('#'+sSelectedId).addClass('loading');
|
$('#'+sSelectedId).addClass('loading');
|
||||||
$.post('../pages/ajax.render.php',
|
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
||||||
{ operation: 'combo_options', filter: sFilter },
|
{ operation: 'combo_options', filter: sFilter },
|
||||||
function(data){
|
function(data){
|
||||||
$('#'+sSelectedId).empty();
|
$('#'+sSelectedId).empty();
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ function WizardHelper(sClass, sFormPrefix, sState)
|
|||||||
{
|
{
|
||||||
//console.log('data sent:', this.ToJSON());
|
//console.log('data sent:', this.ToJSON());
|
||||||
//console.log('oWizard:', this);
|
//console.log('oWizard:', this);
|
||||||
$.post('../pages/ajax.render.php',
|
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
|
||||||
{ operation: 'wizard_helper', json_obj: this.ToJSON() },
|
{ operation: 'wizard_helper', json_obj: this.ToJSON() },
|
||||||
function(html){
|
function(html){
|
||||||
$('#ajax_content').html(html);
|
$('#ajax_content').html(html);
|
||||||
|
|||||||
@@ -1899,7 +1899,7 @@ EOF
|
|||||||
ajax_request = null;
|
ajax_request = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajax_request = $.get('xml.navigator.php', { 'class': sClass, id: iId, relation: sRelation, format: 'html' },
|
ajax_request = $.get(GetAbsoluteUrlAppRoot()+'pages/xml.navigator.php', { 'class': sClass, id: iId, relation: sRelation, format: 'html' },
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#impacted_objects').empty();
|
$('#impacted_objects').empty();
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ EOF
|
|||||||
ajax_request = null;
|
ajax_request = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajax_request = $.post('ajax.csvimport.php',
|
ajax_request = $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.csvimport.php',
|
||||||
{ operation: 'display_mapping_form', enctype: 'multipart/form-data', csvdata: csv_data, separator: separator,
|
{ operation: 'display_mapping_form', enctype: 'multipart/form-data', csvdata: csv_data, separator: separator,
|
||||||
qualifier: text_qualifier, nb_lines_skipped: nb_lines_skipped, header_line: header_line, class_name: class_name,
|
qualifier: text_qualifier, nb_lines_skipped: nb_lines_skipped, header_line: header_line, class_name: class_name,
|
||||||
advanced: advanced, encoding: encoding },
|
advanced: advanced, encoding: encoding },
|
||||||
@@ -1225,7 +1225,7 @@ EOF
|
|||||||
ajax_request = null;
|
ajax_request = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajax_request = $.post('ajax.csvimport.php',
|
ajax_request = $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.csvimport.php',
|
||||||
{ operation: 'parser_preview', enctype: 'multipart/form-data', csvdata: $("#csvdata_truncated").val(), separator: separator, qualifier: text_qualifier, nb_lines_skipped: nb_lines_skipped, header_line: header_line, encoding: encoding },
|
{ operation: 'parser_preview', enctype: 'multipart/form-data', csvdata: $("#csvdata_truncated").val(), separator: separator, qualifier: text_qualifier, nb_lines_skipped: nb_lines_skipped, header_line: header_line, encoding: encoding },
|
||||||
function(data) {
|
function(data) {
|
||||||
$('#preview').empty();
|
$('#preview').empty();
|
||||||
@@ -1385,7 +1385,7 @@ if (ajax_request != null)
|
|||||||
ajax_request = null;
|
ajax_request = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajax_request = $.post('ajax.csvimport.php',
|
ajax_request = $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.csvimport.php',
|
||||||
{ operation: 'get_csv_template', class_name: sClassName },
|
{ operation: 'get_csv_template', class_name: sClassName },
|
||||||
function(data) {
|
function(data) {
|
||||||
$('#template').empty();
|
$('#template').empty();
|
||||||
|
|||||||
Reference in New Issue
Block a user