mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Adjust the relative path to 'ajax.render.php' so that it can be called from the portal pages as well.
SVN:trunk[1125]
This commit is contained in:
@@ -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( 'ajax.render.php', { 'operation': 'addObjects',
|
$.post( '../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( 'ajax.render.php', theMap,
|
$.post( '../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( 'ajax.render.php', theMap,
|
$.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
//console.log('Data: ' + data);
|
//console.log('Data: ' + data);
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, bSelectMode, oWizHelper)
|
|||||||
me.StopPendingRequest();
|
me.StopPendingRequest();
|
||||||
|
|
||||||
// Run the query and display the results
|
// 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)
|
function(data)
|
||||||
{
|
{
|
||||||
$(sSearchAreaId).html(data);
|
$(sSearchAreaId).html(data);
|
||||||
@@ -158,7 +158,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, 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( 'ajax.render.php', theMap,
|
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#label_'+me.id).val(data.name);
|
$('#label_'+me.id).val(data.name);
|
||||||
@@ -213,7 +213,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, 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( 'ajax.render.php', theMap,
|
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$('#ajax_'+me.id).html(data);
|
$('#ajax_'+me.id).html(data);
|
||||||
@@ -283,7 +283,7 @@ function ExtKeyWidget(id, sClass, sAttCode, sSuffix, 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( 'ajax.render.php', theMap,
|
me.ajax_request = $.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
if (me.bSelectMode)
|
if (me.bSelectMode)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ function ActivateStep(iTargetStep)
|
|||||||
// if (oObj['m_aCurrValues'][sAttCode] == '')
|
// if (oObj['m_aCurrValues'][sAttCode] == '')
|
||||||
// {
|
// {
|
||||||
// var oJSON = document.getElementById(sJsonFieldId);
|
// var oJSON = document.getElementById(sJsonFieldId);
|
||||||
// $.get('ajax.render.php?class=' + sClass + '&json_obj=' + oJSON.value + '&att_code=' + sAttCode,
|
// $.get('../pages/ajax.render.php?class=' + sClass + '&json_obj=' + oJSON.value + '&att_code=' + sAttCode,
|
||||||
// { operation: "default_value" },
|
// { operation: "default_value" },
|
||||||
// function(json_data){
|
// function(json_data){
|
||||||
// var oObj = ReloadObjectFromServer(json_data);
|
// var oObj = ReloadObjectFromServer(json_data);
|
||||||
|
|||||||
@@ -96,7 +96,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( 'ajax.render.php', theMap,
|
$.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
$(sSearchAreaId).html(data);
|
$(sSearchAreaId).html(data);
|
||||||
@@ -147,7 +147,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( 'ajax.render.php', theMap,
|
$.post( '../pages/ajax.render.php', theMap,
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
//console.log('Data: ' + data);
|
//console.log('Data: ' + data);
|
||||||
|
|||||||
10
js/utils.js
10
js/utils.js
@@ -21,7 +21,7 @@ function ReloadTruncatedList(divId, sSerializedFilter, sExtraParams)
|
|||||||
console.log('Uh,uh, exception !');
|
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 },
|
{ operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams },
|
||||||
function(data)
|
function(data)
|
||||||
{
|
{
|
||||||
@@ -76,7 +76,7 @@ function ReloadBlock(divId, sStyle, sSerializedFilter, sExtraParams)
|
|||||||
{
|
{
|
||||||
$('#'+divId).block();
|
$('#'+divId).block();
|
||||||
//$('#'+divId).blockUI();
|
//$('#'+divId).blockUI();
|
||||||
$.post('ajax.render.php?style='+sStyle,
|
$.post('../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();
|
||||||
@@ -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 },
|
{ operation: 'search_form', className: sClassName, baseClass: sBaseClass, currentId: divId },
|
||||||
function(data) {
|
function(data) {
|
||||||
oDiv.empty();
|
oDiv.empty();
|
||||||
@@ -182,7 +182,7 @@ function SetUserPreference(sPreferenceCode, sPrefValue, bPersistent)
|
|||||||
oUserPreferences[sPreferenceCode] = sPrefValue;
|
oUserPreferences[sPreferenceCode] = sPrefValue;
|
||||||
if (bPersistent && (sPrefValue != sPreviousValue))
|
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
|
{ operation: 'set_pref', code: sPreferenceCode, value: sPrefValue} ); // Make it persistent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,4 +211,4 @@ function CheckAll(sSelector, bValue)
|
|||||||
$(sSelector).each( function() {
|
$(sSelector).each( function() {
|
||||||
this.checked = value;
|
this.checked = value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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('ajax.render.php',
|
$.post('../pages/ajax.render.php',
|
||||||
{ operation: 'combo_options', filter: sFilter },
|
{ operation: 'combo_options', filter: sFilter },
|
||||||
function(data){
|
function(data){
|
||||||
$('#'+sSelectedId).empty();
|
$('#'+sSelectedId).empty();
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ function WizardHelper(sClass, sFormPrefix)
|
|||||||
{
|
{
|
||||||
//console.log('data sent:', this.ToJSON());
|
//console.log('data sent:', this.ToJSON());
|
||||||
//console.log('oWizard:', this);
|
//console.log('oWizard:', this);
|
||||||
$.post('ajax.render.php',
|
$.post('../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);
|
||||||
@@ -149,7 +149,7 @@ function WizardHelper(sClass, sFormPrefix)
|
|||||||
{
|
{
|
||||||
//console.log('data sent:', this.ToJSON());
|
//console.log('data sent:', this.ToJSON());
|
||||||
//console.log('oWizard:', this);
|
//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()},
|
{'json_obj': this.ToJSON()},
|
||||||
function(responseText, textStatus, XMLHttpRequest){
|
function(responseText, textStatus, XMLHttpRequest){
|
||||||
$('#wizStep'+ G_iCurrentStep).unblock( {fadeOut: 0} );
|
$('#wizStep'+ G_iCurrentStep).unblock( {fadeOut: 0} );
|
||||||
|
|||||||
Reference in New Issue
Block a user