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

@@ -178,36 +178,6 @@ class DisplayBlock
public function Display(WebPage $oPage, $sId, $aExtraParams = array())
{
$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())