public static function ajaxbuild($params = null)
 {
     // Get the block name
     $blockName = modMageBridgeBlockHelper::blockName($params);
     // Include the MageBridge bridge
     $bridge = MageBridgeModelBridge::getInstance();
     // Load CSS if needed
     if ($params->get('load_css', 1) == 1) {
         $bridge->setHeaders('css');
     }
     // Load JavaScript if needed
     if ($params->get('load_js', 1) == 1) {
         $bridge->setHeaders('js');
     }
     // Load the Ajax script
     $script = MageBridgeAjaxHelper::getScript($blockName, 'magebridge-' . $blockName);
     $document = JFactory::getDocument();
     $document->addCustomTag('<script type="text/javascript">' . $script . '</script>');
 }
Example #2
0
<?php

/**
 * Joomla! module MageBridge: Shopping Cart
 *
 * @author Yireo (info@yireo.com)
 * @package MageBridge
 * @copyright Copyright 2011
 * @license GNU Public License
 * @link http://www.yireo.com
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
?>
<div id="magebridge-<?php 
echo $blockName;
?>
" class="magebridge-module">
    <center><img src="<?php 
echo MageBridgeAjaxHelper::getLoaderImage();
?>
" /></center>
</div>
<div style="clear:both"></div>