// theme installation

This commit is contained in:
Damien Metzger committed 2013-10-24 09:49:46 +02:00
1 parent d9382a0a5b
commit e17dd1fdde
5 files changed
+21 -19

No files matched your search

+4 -5
View File
@@ -1,5 +1,5 @@
@import url(http://fonts.googleapis.com/css?family=Josefin+Sans:200,400,700); @import url(http://fonts.googleapis.com/css?family=Josefin+Sans:200,400,700);
/*! /*
* Bootstrap v3.0.0 * Bootstrap v3.0.0
* *
* Copyright 2013 Twitter, Inc * Copyright 2013 Twitter, Inc
@@ -8,7 +8,7 @@
* *
* Designed and built with all the love in the world by @mdo and @fat. * Designed and built with all the love in the world by @mdo and @fat.
*/ */
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */ /* normalize.css v2.1.0 | MIT License | git.io/normalize */
/* line 22, ../bower_components/sass-bootstrap/lib/_normalize.scss */ /* line 22, ../bower_components/sass-bootstrap/lib/_normalize.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block; } display: block; }
@@ -5718,7 +5718,7 @@ th.visible-print, td.visible-print {
/* line 523, ../bower_components/sass-bootstrap/lib/_mixins.scss */ /* line 523, ../bower_components/sass-bootstrap/lib/_mixins.scss */
th.hidden-print, td.hidden-print { th.hidden-print, td.hidden-print {
display: none !important; } } display: none !important; } }
/*! /*
* Font Awesome 3.2.1 * Font Awesome 3.2.1
* the iconic font designed for Bootstrap * the iconic font designed for Bootstrap
* ------------------------------------------------------------------------------ * ------------------------------------------------------------------------------
@@ -9323,8 +9323,7 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty
-webkit-box-shadow: #00a4e7 0 0 0 inset; -webkit-box-shadow: #00a4e7 0 0 0 inset;
box-shadow: #00a4e7 0 0 0 inset; } } box-shadow: #00a4e7 0 0 0 inset; } }
/*! /* Ladda
* Ladda
* http://lab.hakim.se/ladda * http://lab.hakim.se/ladda
* MIT licensed * MIT licensed
* *
+9 -1
View File
@@ -674,6 +674,14 @@ abstract class ModuleCore
* @return boolean result * @return boolean result
*/ */
public function registerHook($hook_name, $shop_list = null) public function registerHook($hook_name, $shop_list = null)
{
$return = true;
if (is_array($hook_name))
$hook_names = $hook_name;
else
$hook_names = array($hook_name);
foreach ($hook_names as $hook_name)
{ {
// Check hook name validation and if module is installed // Check hook name validation and if module is installed
if (!Validate::isHookName($hook_name)) if (!Validate::isHookName($hook_name))
@@ -708,7 +716,6 @@ abstract class ModuleCore
if (is_null($shop_list)) if (is_null($shop_list))
$shop_list = Shop::getShops(true, null, true); $shop_list = Shop::getShops(true, null, true);
$return = true;
foreach ($shop_list as $shop_id) foreach ($shop_list as $shop_id)
{ {
// Check if already register // Check if already register
@@ -736,6 +743,7 @@ abstract class ModuleCore
} }
Hook::exec('actionModuleRegisterHookAfter', array('object' => $this, 'hook_name' => $hook_name)); Hook::exec('actionModuleRegisterHookAfter', array('object' => $this, 'hook_name' => $hook_name));
}
return $return; return $return;
} }
+1 -6
View File
@@ -153,12 +153,7 @@ INSERT INTO `PREFIX_hook_module_exceptions` (`id_shop`, `id_module`, `id_hook`,
UNION SELECT 'orderfollow' as page UNION SELECT 'orderfollow' as page
UNION SELECT 'orderslip' as page UNION SELECT 'orderslip' as page
UNION SELECT 'discount' as page UNION SELECT 'discount' as page
UNION SELECT '' as page UNION SELECT 'product' as page
UNION SELECT '' as page
UNION SELECT '' as page
UNION SELECT '' as page
UNION SELECT '' as page
UNION SELECT '' as page
) pages ) pages
WHERE id_hook = @id_hook WHERE id_hook = @id_hook
); );
@@ -105,7 +105,9 @@ class BlockNewProducts extends Module
protected function getCacheId($name = null) protected function getCacheId($name = null)
{ {
return parent::getCacheId('blocknewproducts|'.date('Ymd')); if ($name === null)
$name = 'blocknewproducts';
return parent::getCacheId($name.'|'.date('Ymd'));
} }
public function hookLeftColumn($params) public function hookLeftColumn($params)
@@ -125,7 +127,7 @@ class BlockNewProducts extends Module
public function hookHeader($params) public function hookHeader($params)
{ {
$this->context->controller->addCSS(($this->_path).'blocknewproducts.css', 'all'); $this->context->controller->addCSS($this->_path.'blocknewproducts.css', 'all');
} }
public function hookAddProduct($params) public function hookAddProduct($params)
+3 -5
View File
@@ -61,8 +61,7 @@ class Blocknewsletter extends Module
public function install() public function install()
{ {
if (parent::install() == false || $this->registerHook('leftColumn') == false || $this->registerHook('header') == false if (!parent::install() || !$this->registerHook(array('header', 'footer', 'actionCustomerAccountAdd')))
|| $this->registerHook('actionCustomerAccountAdd') == false)
return false; return false;
Configuration::updateValue('NW_SALT', Tools::passwdGen(16)); Configuration::updateValue('NW_SALT', Tools::passwdGen(16));
@@ -83,9 +82,8 @@ class Blocknewsletter extends Module
public function uninstall() public function uninstall()
{ {
if (!parent::uninstall()) Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter');
return false; return parent::uninstall();
return Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter');
} }
public function getContent() public function getContent()