// Fixed #PSFV-894 : homeslider improvements

This commit is contained in:
bMancone committed 2012-04-23 16:01:10 +00:00
1 parent 4a2ad059da
commit 5d561f7a32
1 file changed
+3 -9
+3 -9
View File
@@ -60,7 +60,7 @@ class HomeSlider extends Module
public function install() public function install()
{ {
/* Adds Module */ /* Adds Module */
if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('displayHeader')) if (parent::install() && $this->registerHook('displayHome'))
{ {
/* Sets up configuration */ /* Sets up configuration */
$res = Configuration::updateValue('HOMESLIDER_WIDTH', '535'); $res = Configuration::updateValue('HOMESLIDER_WIDTH', '535');
@@ -109,7 +109,7 @@ class HomeSlider extends Module
public function uninstall() public function uninstall()
{ {
/* Deletes Module */ /* Deletes Module */
if (parent::uninstall() && $this->unregisterHook('displayHome') && $this->unregisterHook('displayHeader')) if (parent::uninstall() && $this->unregisterHook('displayHome'))
{ {
/* Deletes tables */ /* Deletes tables */
$res = $this->deleteTables(); $res = $this->deleteTables();
@@ -647,17 +647,11 @@ class HomeSlider extends Module
{ {
if(!$this->_prepareHook()) if(!$this->_prepareHook())
return; return;
return $this->display(__FILE__, 'homeslider.tpl');
}
public function hookDisplayHeader()
{
if (!$this->getSlides(true))
return;
$this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js');
$this->context->controller->addCSS($this->_path.'bx_styles.css'); $this->context->controller->addCSS($this->_path.'bx_styles.css');
$this->context->controller->addJS($this->_path.'js/homeslider.js'); $this->context->controller->addJS($this->_path.'js/homeslider.js');
return $this->display(__FILE__, 'homeslider.tpl');
} }
public function hookDisplayMobileIndex() public function hookDisplayMobileIndex()