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

@@ -50,6 +50,7 @@ class iTopWebPage extends NiceWebPage
$this->m_aTabs = array();
$this->m_sMenu = "";
$this->m_sMessage = '';
$sAbsURLAppRoot = addslashes(utils::GetAbsoluteUrlAppRoot()); // Pass it to Javascript scripts
$oAppContext = new ApplicationContext();
$sExtraParams = $oAppContext->GetForLink();
$this->add_header("Content-type: text/html; charset=utf-8");
@@ -382,6 +383,11 @@ EOF
}
}
function GetAbsoluteUrlAppRoot()
{
return '$sAbsURLAppRoot';
}
var oUserPreferences = $sUserPrefs;
// For disabling the CKEditor at init time when the corresponding textarea is disabled !