Merge pull request #23 from dkarvounaris/ivy-patch-missingcss
[-] CSS/JS files not loading when using only "displayNav" without "displayTop"
This commit is contained in:
+10
-6
@@ -66,6 +66,7 @@ class Blocktopmenu extends Module
|
||||
public function install($delete_params = true)
|
||||
{
|
||||
if (!parent::install() ||
|
||||
!$this->registerHook('header') ||
|
||||
!$this->registerHook('displayTop') ||
|
||||
!$this->registerHook('actionObjectCategoryUpdateAfter') ||
|
||||
!$this->registerHook('actionObjectCategoryDeleteAfter') ||
|
||||
@@ -713,6 +714,15 @@ class Blocktopmenu extends Module
|
||||
return parent::getCacheId().'|'.$page_name.($page_name != 'index' ? '|'.(int)Tools::getValue('id_'.$page_name) : '');
|
||||
}
|
||||
|
||||
public function hookHeader()
|
||||
{
|
||||
$this->context->controller->addJS($this->_path.'js/hoverIntent.js');
|
||||
$this->context->controller->addJS($this->_path.'js/superfish-modified.js');
|
||||
$this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
|
||||
$this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
|
||||
$this->context->controller->addCSS($this->_path.'css/superfish-modified.css');
|
||||
}
|
||||
|
||||
public function hookDisplayTop($param)
|
||||
{
|
||||
$this->user_groups = ($this->context->customer->isLogged() ?
|
||||
@@ -731,12 +741,6 @@ class Blocktopmenu extends Module
|
||||
$this->smarty->assign('this_path', $this->_path);
|
||||
}
|
||||
|
||||
$this->context->controller->addJS($this->_path.'js/hoverIntent.js');
|
||||
$this->context->controller->addJS($this->_path.'js/superfish-modified.js');
|
||||
$this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
|
||||
$this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
|
||||
$this->context->controller->addCSS($this->_path.'css/superfish-modified.css');
|
||||
|
||||
$html = $this->display(__FILE__, 'blocktopmenu.tpl', $this->getCacheId());
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2014 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_1_1($object)
|
||||
{
|
||||
return ($object->registerHook('header'));
|
||||
}
|
||||
Reference in New Issue
Block a user