diff --git a/modules/blockcmsinfo/blockcmsinfo.php b/modules/blockcmsinfo/blockcmsinfo.php new file mode 100644 index 000000000..e8ce8fbb9 --- /dev/null +++ b/modules/blockcmsinfo/blockcmsinfo.php @@ -0,0 +1,315 @@ + +* @copyright 2007-2013 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; + +include_once _PS_MODULE_DIR_.'blockcmsinfo/infoClass.php'; + +class Blockcmsinfo extends Module +{ + public function __construct() + { + $this->name = 'blockcmsinfo'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + $this->bootstrap = true; + $this->need_instance = 0; + parent::__construct(); + $this->displayName = $this->l('Customer cms information block'); + $this->description = $this->l('Adds an information block customers in your store.'); + } + + public function install() + { + return parent::install() && + $this->installDB() && + Configuration::updateValue('blockcmsinfo_nbblocks', 2) && + $this->registerHook('home') && $this->installFixtures(); + } + + public function installDB() + { + $return = true; + $return &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'info` ( + `id_info` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL , + PRIMARY KEY (`id_info`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + + $return &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'info_lang` ( + `id_info` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_lang` int(10) unsigned NOT NULL , + `text` text NOT NULL, + PRIMARY KEY (`id_info`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + + return $return; + } + + public function uninstall() + { + // Delete configuration + return Configuration::deleteByName('blockcmsinfo_nbblocks') && + $this->uninstallDB() && + parent::uninstall(); + } + + public function uninstallDB() + { + return Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'info`') && Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'info_lang`'); + } + + public function addToDB() + { + if (isset($_POST['nbblocks'])) + { + for ($i = 1; $i <= (int)$_POST['nbblocks']; $i++) + { + + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'info` (`text`) + VALUES ("'.((isset($_POST['info'.$i.'_text']) && $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")'); + } + return true; + } else + return false; + } + + public function removeFromDB() + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'info`'); + } + + public function getContent() + { + $html = ''; + $id_info = (int)Tools::getValue('id_info'); + + if (Tools::isSubmit('saveblockcmsinfo')) + { + if ($id_info = Tools::getValue('id_info')) + $info = new infoClass((int)$id_info); + else + $info = new infoClass(); + $info->copyFromPost(); + $info->id_shop = $this->context->shop->id; + + if ($info->validateFields(false) && $info->validateFieldsLang(false)) + { + $info->save(); + $this->_clearCache('blockcmsinfo.tpl'); + } + else + $html .= '
'.$this->l('An error occurred while attempting to save.').'
'; + } + + if (Tools::isSubmit('updateblockcmsinfo') || Tools::isSubmit('addblockcmsinfo')) + { + $helper = $this->initForm(); + foreach (Language::getLanguages(false) as $lang) + if ($id_info) + { + $info = new infoClass((int)$id_info); + $helper->fields_value['text'][(int)$lang['id_lang']] = $info->text[(int)$lang['id_lang']]; + } + else + $helper->fields_value['text'][(int)$lang['id_lang']] = Tools::getValue('text_'.(int)$lang['id_lang'], ''); + if ($id_info = Tools::getValue('id_info')) + { + $this->fields_form[0]['form']['input'][] = array('type' => 'hidden', 'name' => 'id_info'); + $helper->fields_value['id_info'] = (int)$id_info; + } + + return $html.$helper->generateForm($this->fields_form); + } + else if (Tools::isSubmit('deleteblockcmsinfo')) + { + $info = new infoClass((int)$id_info); + $info->delete(); + $this->_clearCache('blockcmsinfo.tpl'); + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules')); + } + else + { + $helper = $this->initList(); + return $html.$helper->generateList($this->getListContent((int)Configuration::get('PS_LANG_DEFAULT')), $this->fields_list); + } + + if (isset($_POST['submitModule'])) + { + Configuration::updateValue('blockcmsinfo_nbblocks', ((isset($_POST['nbblocks']) && $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : '')); + if ($this->removeFromDB() && $this->addToDB()) + { + $this->_clearCache('blockcmsinfo.tpl'); + $output = '
'.$this->l('The block configuration has been updated.').'
'; + } + else + $output = '
'.$this->l('An error occurred while attempting to save.').'
'; + } + } + + protected function getListContent($id_lang) + { + return Db::getInstance()->executeS(' + SELECT r.`id_info`, r.`id_shop`, rl.`text` + FROM `'._DB_PREFIX_.'info` r + LEFT JOIN `'._DB_PREFIX_.'info_lang` rl ON (r.`id_info` = rl.`id_info`) + WHERE `id_lang` = '.(int)$id_lang.' '.Shop::addSqlRestrictionOnLang()); + } + + protected function initForm() + { + $default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + $this->fields_form[0]['form'] = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('New cms custom block.'), + ), + 'input' => array( + array( + 'type' => 'textarea', + 'label' => $this->l('Text:'), + 'lang' => true, + 'name' => 'text', + 'cols' => 40, + 'rows' => 10, + 'class' => 'rte', + 'autoload_rte' => true, + + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $helper = new HelperForm(); + $helper->module = $this; + $helper->name_controller = 'blockcmsinfo'; + $helper->identifier = $this->identifier; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + foreach (Language::getLanguages(false) as $lang) + $helper->languages[] = array( + 'id_lang' => $lang['id_lang'], + 'iso_code' => $lang['iso_code'], + 'name' => $lang['name'], + 'is_default' => ($default_lang == $lang['id_lang'] ? 1 : 0) + ); + + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + $helper->default_form_language = $default_lang; + $helper->allow_employee_form_lang = $default_lang; + $helper->toolbar_scroll = true; + $helper->title = $this->displayName; + $helper->submit_action = 'saveblockcmsinfo'; + $helper->toolbar_btn = array( + 'save' => + array( + 'desc' => $this->l('Save'), + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + ), + 'back' => + array( + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + 'desc' => $this->l('Back to list') + ) + ); + return $helper; + } + + protected function initList() + { + + + $this->fields_list = array( + + 'id_info' => array( + 'title' => $this->l('Custom block #'), + 'width' => 40, + 'type' => 'text', + ), + + ); + + if (Shop::isFeatureActive()) + $this->fields_list['id_shop'] = array('title' => $this->l('ID Shop'), 'align' => 'center', 'width' => 25, 'type' => 'int'); + + $helper = new HelperList(); + $helper->shopLinkType = ''; + $helper->simple_header = true; + $helper->identifier = 'id_info'; + $helper->actions = array('edit', 'delete'); + $helper->show_toolbar = true; + $helper->imageType = 'jpg'; + $helper->toolbar_btn['new'] = array( + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&add'.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + 'desc' => $this->l('Add new') + ); + + $helper->title = $this->displayName; + $helper->table = $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + return $helper; + } + + public function hookHome($params) + { + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + $this->context->controller->addCSS($this->_path.'style.css', 'all'); + if (!$this->isCached('blockcmsinfo.tpl', $this->getCacheId())) + { + $infos = $this->getListContent($this->context->language->id); + $this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos))); + } + return $this->display(__FILE__, 'blockcmsinfo.tpl', $this->getCacheId()); + } + + public function installFixtures() + { + $return = true; + $tab_texts = array( + array('text' => $this->l('Custom text.')), + array('text' => $this->l('Custom text.')), + ); + foreach($tab_texts as $tab) + { + $info = new infoClass(); + foreach (Language::getLanguages(false) as $lang) + $info->text[$lang['id_lang']] = $tab['text']; + $info->id_shop = $this->context->shop->id; + $return &= $info->save(); + } + return $return; + } +} diff --git a/modules/blockcmsinfo/blockcmsinfo.tpl b/modules/blockcmsinfo/blockcmsinfo.tpl new file mode 100644 index 000000000..258f37f06 --- /dev/null +++ b/modules/blockcmsinfo/blockcmsinfo.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 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 +* @copyright 2007-2013 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 $infos|@count > 0} + +
+ {foreach from=$infos item=info} +
{$info.text}
+ {/foreach} +
+ +{/if} \ No newline at end of file diff --git a/modules/blockcmsinfo/config.xml b/modules/blockcmsinfo/config.xml new file mode 100644 index 000000000..745747fb8 --- /dev/null +++ b/modules/blockcmsinfo/config.xml @@ -0,0 +1,12 @@ + + + blockcmsinfo + + + + + + 1 + 0 + + \ No newline at end of file diff --git a/modules/blockcmsinfo/index.php b/modules/blockcmsinfo/index.php new file mode 100644 index 000000000..07830d90c --- /dev/null +++ b/modules/blockcmsinfo/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blockcmsinfo/infoClass.php b/modules/blockcmsinfo/infoClass.php new file mode 100644 index 000000000..5722a4d17 --- /dev/null +++ b/modules/blockcmsinfo/infoClass.php @@ -0,0 +1,69 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class infoClass extends ObjectModel +{ + /** @var integer info id*/ + public $id; + + /** @var integer info id shop*/ + public $id_shop; + + /** @var string info text*/ + public $text; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'info', + 'primary' => 'id_info', + 'multilang' => true, + 'fields' => array( + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + // Lang fields + 'text' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => true), + ) + ); + + public function copyFromPost() + { + /* Classical fields */ + foreach ($_POST AS $key => $value) + if (key_exists($key, $this) AND $key != 'id_'.$this->table) + $this->{$key} = $value; + + /* Multilingual fields */ + if (sizeof($this->fieldsValidateLang)) + { + $languages = Language::getLanguages(false); + foreach ($languages AS $language) + foreach ($this->fieldsValidateLang AS $field => $validation) + if (isset($_POST[$field.'_'.(int)($language['id_lang'])])) + $this->{$field}[(int)($language['id_lang'])] = $_POST[$field.'_'.(int)($language['id_lang'])]; + } + } +} diff --git a/modules/blockcmsinfo/logo.gif b/modules/blockcmsinfo/logo.gif new file mode 100644 index 000000000..b29d6badd Binary files /dev/null and b/modules/blockcmsinfo/logo.gif differ diff --git a/modules/blockcmsinfo/logo.png b/modules/blockcmsinfo/logo.png new file mode 100644 index 000000000..7d46528a8 Binary files /dev/null and b/modules/blockcmsinfo/logo.png differ diff --git a/modules/blockcmsinfo/style.css b/modules/blockcmsinfo/style.css new file mode 100644 index 000000000..76bfc7331 --- /dev/null +++ b/modules/blockcmsinfo/style.css @@ -0,0 +1,2 @@ +/* BLOCK #info_block ******************************************************************** */ +#cmsinfo_block {} diff --git a/modules/blockcmsinfo/translations/index.php b/modules/blockcmsinfo/translations/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/blockcmsinfo/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockfacebook/blockfacebook.php b/modules/blockfacebook/blockfacebook.php new file mode 100644 index 000000000..7f9b2d98c --- /dev/null +++ b/modules/blockfacebook/blockfacebook.php @@ -0,0 +1,143 @@ + +* @copyright 2007-2013 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; + +class Blockfacebook extends Module +{ + public function __construct() + { + $this->name = 'blockfacebook'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + + $this->bootstrap = true; + parent::__construct(); + $this->displayName = $this->l('Block Facebook'); + $this->description = $this->l('Display block facebook on the home page'); + } + + +public function install() + { + return parent::install() + && Configuration::updateValue('blockfacebook_url', 'prestashop') + && $this->registerHook('displayHome') + && $this->registerHook('displayHeader'); + } + + public function uninstall() + { + // Delete configuration + return Configuration::deleteByName('blockfacebook_url') && parent::uninstall(); + } + + public function getContent() + { + $html = ''; + // If we try to update the settings + if (Tools::isSubmit('submitModule')) + { + Configuration::updateValue('blockfacebook_url', Tools::getValue('blockfacebook_url')); + $this->_clearCache('blockfacebook.tpl'); + $html .= $this->displayConfirmation($this->l('Configuration updated')); + } + + $html .= $this->renderForm(); + + return $html; + } + + public function hookDisplayHeader() + { + + } + + public function hookDisplayHome() + { + global $smarty; + if (!$this->isCached('blockfacebook.tpl', $this->getCacheId())) + $smarty->assign(array( + 'facebookurl' => Configuration::get('blockfacebook_url'), + )); + return $this->display(__FILE__, 'blockfacebook.tpl', $this->getCacheId()); + } + + + + public function renderForm() + { + $fields_form = array( + 'form' => array( + 'legend' => array( + 'title' => $this->l('Settings'), + 'icon' => 'icon-cogs' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Facebook name'), + 'name' => 'blockfacebook_url', + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'btn btn-default') + ), + ); + + $helper = new HelperForm(); + $helper->show_toolbar = false; + $helper->table = $this->table; + $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $helper->default_form_language = $lang->id; + $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + $this->fields_form = array(); + + $helper->identifier = $this->identifier; + $helper->submit_action = 'submitModule'; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->tpl_vars = array( + 'fields_value' => $this->getConfigFieldsValues(), + 'languages' => $this->context->controller->getLanguages(), + 'id_language' => $this->context->language->id + ); + + return $helper->generateForm(array($fields_form)); + } + + public function getConfigFieldsValues() + { + return array( + 'blockfacebook_url' => Tools::getValue('blockfacebook_url', Configuration::get('blockfacebook_url')), + ); + } + + + +} \ No newline at end of file diff --git a/modules/blockfacebook/blockfacebook.tpl b/modules/blockfacebook/blockfacebook.tpl new file mode 100644 index 000000000..4e15962c0 --- /dev/null +++ b/modules/blockfacebook/blockfacebook.tpl @@ -0,0 +1,10 @@ +{if $facebookurl != ''} +
+

{l s='Follow us on facebook' mod='blockfacebook'}

+ +
+{/if} + + diff --git a/modules/blockfacebook/config.xml b/modules/blockfacebook/config.xml new file mode 100644 index 000000000..c11e6ffae --- /dev/null +++ b/modules/blockfacebook/config.xml @@ -0,0 +1,12 @@ + + + blockfacebook + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/blockfacebook/logo.gif b/modules/blockfacebook/logo.gif new file mode 100644 index 000000000..4614741f5 Binary files /dev/null and b/modules/blockfacebook/logo.gif differ diff --git a/modules/blockfacebook/logo.png b/modules/blockfacebook/logo.png new file mode 100644 index 000000000..63f5b2917 Binary files /dev/null and b/modules/blockfacebook/logo.png differ diff --git a/modules/blockfacebook/translations/index.php b/modules/blockfacebook/translations/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/blockfacebook/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/homeslider.php b/modules/homeslider/homeslider.php index 096fd593f..29daad463 100644 --- a/modules/homeslider/homeslider.php +++ b/modules/homeslider/homeslider.php @@ -674,7 +674,11 @@ class HomeSlider extends Module $this->context->controller->addJS($this->_path.'js/homeslider.js'); return $this->display(__FILE__, 'homeslider.tpl', $this->getCacheId()); } - + + public function hookTop() + { + return $this->hookDisplayHome(); + } public function clearCache() { $this->_clearCache('homeslider.tpl'); diff --git a/modules/homeslider/images/32fcdb2dfcdde00ac046b0b3b5f69170.jpg b/modules/homeslider/images/32fcdb2dfcdde00ac046b0b3b5f69170.jpg new file mode 100644 index 000000000..673b89940 Binary files /dev/null and b/modules/homeslider/images/32fcdb2dfcdde00ac046b0b3b5f69170.jpg differ diff --git a/modules/homeslider/images/3a7640ba4e3975b54126c6aa69a2bbc1.jpg b/modules/homeslider/images/3a7640ba4e3975b54126c6aa69a2bbc1.jpg new file mode 100644 index 000000000..673b89940 Binary files /dev/null and b/modules/homeslider/images/3a7640ba4e3975b54126c6aa69a2bbc1.jpg differ diff --git a/modules/homeslider/images/611a2b3ae96bde7ea3f8ca97c00ffe8c.jpg b/modules/homeslider/images/611a2b3ae96bde7ea3f8ca97c00ffe8c.jpg new file mode 100644 index 000000000..673b89940 Binary files /dev/null and b/modules/homeslider/images/611a2b3ae96bde7ea3f8ca97c00ffe8c.jpg differ diff --git a/modules/themeconfigurator/config.xml b/modules/themeconfigurator/config.xml index f95c52038..9130fdd00 100644 --- a/modules/themeconfigurator/config.xml +++ b/modules/themeconfigurator/config.xml @@ -9,4 +9,4 @@ 1 1 - + \ No newline at end of file diff --git a/modules/themeconfigurator/themeconfigurator.php b/modules/themeconfigurator/themeconfigurator.php index 7f9c4b69f..a2531c613 100644 --- a/modules/themeconfigurator/themeconfigurator.php +++ b/modules/themeconfigurator/themeconfigurator.php @@ -162,6 +162,27 @@ class ThemeConfigurator extends Module 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('addsharethis')) && $module->active), 'is_module' => true, ), + array( + 'label' => $this->l('Display facebook block on the home page'), + 'name' => 'blockfacebook', + 'desc' => ''.$this->l('Configure').'', + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockfacebook')) && $module->active), + 'is_module' => true, + ), + array( + 'label' => $this->l('Customer cms information block'), + 'name' => 'blockcmsinfo', + 'desc' => ''.$this->l('Configure').'', + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockcmsinfo')) && $module->active), + 'is_module' => true, + ), + array( + 'label' => $this->l('Customer banner information block'), + 'name' => 'tmhtmlcontent', + 'desc' => ''.$this->l('Configure').'', + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('tmhtmlcontent')) && $module->active), + 'is_module' => true, + ), array( 'label' => $this->l('Enable Quick view'), 'name' => 'quick_view', diff --git a/modules/tmhtmlcontent/config.xml b/modules/tmhtmlcontent/config.xml new file mode 100644 index 000000000..e888346f6 --- /dev/null +++ b/modules/tmhtmlcontent/config.xml @@ -0,0 +1,12 @@ + + + tmhtmlcontent + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg b/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg new file mode 100644 index 000000000..368ac88e8 Binary files /dev/null and b/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg differ diff --git a/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg b/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg new file mode 100644 index 000000000..2a114607c Binary files /dev/null and b/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg differ diff --git a/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg b/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg new file mode 100644 index 000000000..adaf02324 Binary files /dev/null and b/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg differ diff --git a/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg b/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg new file mode 100644 index 000000000..428a289c1 Binary files /dev/null and b/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg differ diff --git a/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg b/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg new file mode 100644 index 000000000..3a3cfcde6 Binary files /dev/null and b/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg differ diff --git a/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg b/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg new file mode 100644 index 000000000..45256d5b0 Binary files /dev/null and b/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg differ diff --git a/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg b/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg new file mode 100644 index 000000000..d0c7fa27d Binary files /dev/null and b/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg differ diff --git a/modules/tmhtmlcontent/images/index.php b/modules/tmhtmlcontent/images/index.php new file mode 100644 index 000000000..803f6c658 --- /dev/null +++ b/modules/tmhtmlcontent/images/index.php @@ -0,0 +1,8 @@ +name = 'tmhtmlcontent'; // Defines module name + $this->tab = 'other'; // Defines module tab name/module category in the admin panel + $this->author = 'TemplateMonster'; // Defines module author + $this->version = '1.0'; // Defines module version + $this->secure_key = Tools::encrypt($this->name); + + $this->_defaultLanguage = Language::getLanguage(Configuration::get('PS_LANG_DEFAULT')); + $this->_languages = Language::getLanguages(); + + parent::__construct(); + + $this->displayName = $this->l('TM HTML content'); + $this->desctiption = $this->l('Module for HTML content with images and links.'); + + // Paths + $this->module_path = _PS_MODULE_DIR_.$this->name.'/'; + $this->uploads_path = _PS_MODULE_DIR_.$this->name.'/images/'; + $this->admin_tpl_path = _PS_MODULE_DIR_.$this->name.'/views/templates/admin/'; + $this->hooks_tpl_path = _PS_MODULE_DIR_.$this->name.'/views/templates/hooks/'; + } + + private function installDB() { + + Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'tmhtmlcontent`'); + + if (!Db::getInstance()->Execute(' + CREATE TABLE `'._DB_PREFIX_.'tmhtmlcontent` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `item_order` int(10) unsigned NOT NULL, + `title` VARCHAR(100), + `title_use` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + `hook` VARCHAR(100), + `url` VARCHAR(100), + `target` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + `image` VARCHAR(100), + `image_w` VARCHAR(10), + `image_h` VARCHAR(10), + `html` TEXT, + `active` tinyint(1) unsigned NOT NULL DEFAULT \'1\', + PRIMARY KEY (`id_item`) + ) ENGINE = '._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8;')) + return false; + + return true; + } + + public function install() { + /* Adds Module */ + if (!parent::install() || + $this->installDB() && + !$this->registerHook('displayHeader') || + !$this->registerHook('displayTop') || + !$this->registerHook('displayLeftColumn') || + !$this->registerHook('displayRightColumn') || + !$this->registerHook('displayHome') || + !$this->registerHook('displayFooter') || + !$this->registerHook('displayBackOfficeHeader')) + return false; + return true; + } + + public function uninstall() { + + $images = Db::getInstance()->ExecuteS('SELECT image FROM `'._DB_PREFIX_.'tmhtmlcontent`'); + foreach ($images as $image) + $this->_deleteImages($image); + + + if (!Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'tmhtmlcontent`') OR + !parent::uninstall()) + return false; + return true; + } + + public function getContent() { + $this->context->smarty->assign('error', 0); + $this->context->smarty->assign('confirmation', 0); + + if (Tools::isSubmit('newItem')){ + $this->_addItem(); + } elseif (Tools::isSubmit('updateItem')){ + $this->_updateItem(); + } elseif (Tools::isSubmit('removeItem')) { + $this->_removeItem(); + } + return $this->_displayForm(); + } + + private function _displayForm() { + + $id_shop = (int)$this->context->shop->id; + $items = array(); + + $this->context->smarty->assign('htmlcontent', array( + 'admin_tpl_path' => $this->admin_tpl_path, + 'hooks_tpl_path' => $this->hooks_tpl_path, + + 'info' => array( + 'module' => $this->name, + 'name' => $this->displayName, + 'version' => $this->version, + 'psVersion' => _PS_VERSION_, + 'context' => (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') == 0) ? 1 : ($this->context->shop->getTotalShops() != 1) ? $this->context->shop->getContext() : 1 + ) + )); + + foreach ($this->_languages as $language) { + $hooks[$language['id_lang']] = array('home', 'top', 'left', 'right', 'footer'); + foreach ($hooks[$language['id_lang']] as $hook) { + $items[$language['id_lang']][$hook] = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$language['id_lang'].' AND hook = \''.$hook.'\' ORDER BY item_order ASC'); + } + } + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items, + 'lang' => array( + 'default' => $this->_defaultLanguage, + 'all' => $this->_languages, + 'lang_dir' => _THEME_LANG_DIR_, + 'user' => $this->context->language->id + ), + 'postAction' => 'index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module=other&module_name='.$this->name.'', + 'id_shop' => $id_shop + )); + + return $this->display(__FILE__, 'views/templates/admin/admin.tpl'); + } + + + private function _addItem() { + $id_shop = (int)$this->context->shop->id; + $lastOrder = Db::getInstance()->ExecuteS('SELECT item_order FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.(int)Tools::getValue('lang_id').' AND hook = \''.Tools::getValue('item_hook').'\' ORDER BY item_order DESC LIMIT 1'); + $currentOrder = ($lastOrder) ? $lastOrder[0]['item_order']+1 : 1 ; + + $image_w = (is_numeric(Tools::getValue('item_img_w'))) ? intval(Tools::getValue('item_img_w')) : ''; + $image_h = (is_numeric(Tools::getValue('item_img_h'))) ? intval(Tools::getValue('item_img_h')) : ''; + + if(!empty($_FILES['item_img']['name'])){ + $image = $this->_uploadImage($_FILES['item_img'], $image_w, $image_h); + if(empty($image)) + return false; + } else { + $image = ''; + $image_w = ''; + $image_h = ''; + } + + $insert = Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'tmhtmlcontent` ( + `id_shop`, `id_lang`, `item_order`, `title`, `title_use`, `hook`, `url`, `target`, `image`, `image_w`, `image_h`, `html`, `active` + ) VALUES ( + \''.$id_shop.'\', + \''.(int)Tools::getValue('lang_id').'\', + \''.$currentOrder.'\', + \''.Tools::getValue('item_title').'\', + \''.(int)Tools::getValue('item_title_use').'\', + \''.Tools::getValue('item_hook').'\', + \''.Tools::getValue('item_url').'\', + \''.(int)Tools::getValue('item_target').'\', + \''.$image.'\', + \''.$image_w.'\', + \''.$image_h.'\', + \''.str_replace("'", "´", Tools::getValue('item_html')).'\', + 1) + '); + + if(!$insert){ + $this->_deleteImages($image); + $this->context->smarty->assign('error', $this->l('An error occured while saving data.')); + return false; + } + + $this->context->smarty->assign('confirmation', $this->l('New item added successfull.')); + } + + private function _updateItem() { + + $newImage = ''; + + $image_w = (is_numeric(Tools::getValue('item_img_w'))) ? intval(Tools::getValue('item_img_w')) : ''; + $image_h = (is_numeric(Tools::getValue('item_img_h'))) ? intval(Tools::getValue('item_img_h')) : ''; + + if(!empty($_FILES['item_img']['name'])){ + if ($oldImage = Db::getInstance()->ExecuteS('SELECT image FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_item = '.(int)Tools::getValue('item_id'))) + $this->_deleteImages($oldImage[0]); + + $image = $this->_uploadImage($_FILES['item_img'], $image_w, $image_h); + if(empty($image)) + return false; + $newImage = 'image = \''.$image.'\','; + } else { + $image_w = ''; + $image_h = ''; + } + $update = Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'tmhtmlcontent` SET + title = \''.Tools::getValue('item_title').'\', + title_use = \''.(int)Tools::getValue('item_title_use').'\', + hook = \''.Tools::getValue('item_hook').'\', + url = \''.Tools::getValue('item_url').'\', + target = \''.(int)Tools::getValue('item_target').'\', + '.$newImage.' + image_w = \''.$image_w.'\', + image_h = \''.$image_h.'\', + active = \''.(int)Tools::getValue('item_active').'\', + html = \''.str_replace("'", "´", Tools::getValue('item_html')).'\' + WHERE id_item = '.(int)Tools::getValue('item_id')); + + if(!$update){ + if ($newImage = Db::getInstance()->ExecuteS('SELECT image FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_item = '.(int)Tools::getValue('item_id'))) + $this->_deleteImages($oldImage[0]); + $this->context->smarty->assign('error', $this->l('An error occured while saving data.')); + return false; + } + + $this->context->smarty->assign('confirmation', $this->l('Saved succsessfull.')); + + } + + public function _removeItem() { + $id_shop = (int)$this->context->shop->id; + if ($delImage = Db::getInstance()->ExecuteS('SELECT image FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_item = '.(int)Tools::getValue('item_id'))) + $this->_deleteImages($delImage[0]); + + Db::getInstance()->delete(_DB_PREFIX_.'tmhtmlcontent', 'id_item = '.(int)Tools::getValue('item_id')); + + if(Db::getInstance()->Affected_Rows() == 1){ + Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'tmhtmlcontent` + SET item_order = item_order-1 + WHERE ( + item_order > '.Tools::getValue('item_order').' AND + id_shop = '.$id_shop.' AND + hook = \''.Tools::getValue('item_hook').'\') + '); + + $this->context->smarty->assign('confirmation', $this->l('Deleted succsessfull.')); + }else{ + $this->context->smarty->assign('error', $this->l('Cant delete slide data from database.')); + } + } + + + private function _uploadImage($image, $image_w = '', $image_h = '') { + /* Uploads image */ + + $type = @strtolower(substr(strrchr($image['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($image['tmp_name']); + Configuration::set('PS_IMAGE_QUALITY','png_all'); + $salt = sha1(microtime()); + + if (isset($image) && + isset($image['tmp_name']) && + !empty($image['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + + if ($error = ImageManager::validateUpload($image)) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($image['tmp_name'], $temp_name)) + return false; + elseif (ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($image['name'].$salt).'.'.$type, $image_w, $image_h)) + return Tools::encrypt($image['name'].$salt).'.'.$type; + else + $this->context->smarty->assign('error', $this->l('An error occurred during the image upload.')); + if (isset($temp_name)) + @unlink($temp_name); + } + } + + + private function _deleteImages($image) { + if ($image && $image['image']!='' && is_file($this->uploads_path.$image['image'])) + unlink($this->uploads_path.$image['image']); + } + + + + public function hookDisplayBackOfficeHeader() { + // Check if module is loaded + if (Tools::getValue('configure') != $this->name) + return false; + + // CSS + $this->context->controller->addCSS($this->_path.'views/css/admin.css'); + // JS + $this->context->controller->addJquery(); + $this->context->controller->addJS($this->_path.'views/js/admin.js'); + } + + + public function hookdisplayHeader($params) { + $this->context->controller->addCss($this->_path.'views/css/hooks.css', 'all'); + } + + + public function hookDisplayTop() { + $id_shop = (int)$this->context->shop->id; + $id_lang = $this->context->language->id; + $hook_name = 'top'; + $items = array(); + $items = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$id_lang.' AND hook = \''.$hook_name.'\' AND active = 1 ORDER BY item_order ASC'); + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items + )); + + return $this->display(__FILE__, 'views/templates/hooks/top.tpl'); + } + + + public function hookDisplayHome() { + $id_shop = (int)$this->context->shop->id; + $id_lang = $this->context->language->id; + $hook_name = 'home'; + $items = array(); + $items = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$id_lang.' AND hook = \''.$hook_name.'\' AND active = 1 ORDER BY item_order ASC'); + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items + )); + + return $this->display(__FILE__, 'views/templates/hooks/home.tpl'); + } + + public function hookDisplayLeftColumn() { + $id_shop = (int)$this->context->shop->id; + $id_lang = $this->context->language->id; + $hook_name = 'left'; + $items = array(); + $items = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$id_lang.' AND hook = \''.$hook_name.'\' AND active = 1 ORDER BY item_order ASC'); + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items + )); + + return $this->display(__FILE__, 'views/templates/hooks/left.tpl'); + } + + public function hookDisplayRightColumn() { + $id_shop = (int)$this->context->shop->id; + $id_lang = $this->context->language->id; + $hook_name = 'right'; + $items = array(); + $items = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$id_lang.' AND hook = \''.$hook_name.'\' AND active = 1 ORDER BY item_order ASC'); + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items + )); + + return $this->display(__FILE__, 'views/templates/hooks/right.tpl'); + } + + public function hookDisplayFooter() { + $id_shop = (int)$this->context->shop->id; + $id_lang = $this->context->language->id; + $hook_name = 'footer'; + $items = array(); + $items = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tmhtmlcontent` WHERE id_shop = '.$id_shop.' AND id_lang = '.$id_lang.' AND hook = \''.$hook_name.'\' AND active = 1 ORDER BY item_order ASC'); + + $this->context->smarty->assign('htmlitems', array( + 'items' => $items + )); + + return $this->display(__FILE__, 'views/templates/hooks/footer.tpl'); + } + +} \ No newline at end of file diff --git a/modules/tmhtmlcontent/translations/index.php b/modules/tmhtmlcontent/translations/index.php new file mode 100644 index 000000000..198b35f62 --- /dev/null +++ b/modules/tmhtmlcontent/translations/index.php @@ -0,0 +1,10 @@ + li .icon-li { + width: 0.7142857142857143em; + display: inline-block; + text-align: center; +} +[class^="icon-"].hide, +[class*=" icon-"].hide { + display: none; +} +.icon-muted { + color: #eeeeee; +} +.icon-light { + color: #ffffff; +} +.icon-dark { + color: #333333; +} +.icon-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.icon-2x { + font-size: 2em; +} +.icon-2x.icon-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.icon-3x { + font-size: 3em; +} +.icon-3x.icon-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.icon-4x { + font-size: 4em; +} +.icon-4x.icon-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.icon-5x { + font-size: 5em; +} +.icon-5x.icon-border { + border-width: 5px; + -webkit-border-radius: 7px; + -moz-border-radius: 7px; + border-radius: 7px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="icon-"].pull-left, +[class*=" icon-"].pull-left { + margin-right: .3em; +} +[class^="icon-"].pull-right, +[class*=" icon-"].pull-right { + margin-left: .3em; +} +/* BOOTSTRAP SPECIFIC CLASSES + * -------------------------- */ +/* Bootstrap 2.0 sprites.less reset */ +[class^="icon-"], +[class*=" icon-"] { + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: none; +} +/* keeps Bootstrap styles with and without icons the same */ +.btn [class^="icon-"].icon-large, +.nav [class^="icon-"].icon-large, +.btn [class*=" icon-"].icon-large, +.nav [class*=" icon-"].icon-large { + line-height: .9em; +} +.btn [class^="icon-"].icon-spin, +.nav [class^="icon-"].icon-spin, +.btn [class*=" icon-"].icon-spin, +.nav [class*=" icon-"].icon-spin { + display: inline-block; +} +.nav-tabs [class^="icon-"], +.nav-pills [class^="icon-"], +.nav-tabs [class*=" icon-"], +.nav-pills [class*=" icon-"], +.nav-tabs [class^="icon-"].icon-large, +.nav-pills [class^="icon-"].icon-large, +.nav-tabs [class*=" icon-"].icon-large, +.nav-pills [class*=" icon-"].icon-large { + line-height: .9em; +} +.btn [class^="icon-"].pull-left.icon-2x, +.btn [class*=" icon-"].pull-left.icon-2x, +.btn [class^="icon-"].pull-right.icon-2x, +.btn [class*=" icon-"].pull-right.icon-2x { + margin-top: .18em; +} +.btn [class^="icon-"].icon-spin.icon-large, +.btn [class*=" icon-"].icon-spin.icon-large { + line-height: .8em; +} +.btn.btn-small [class^="icon-"].pull-left.icon-2x, +.btn.btn-small [class*=" icon-"].pull-left.icon-2x, +.btn.btn-small [class^="icon-"].pull-right.icon-2x, +.btn.btn-small [class*=" icon-"].pull-right.icon-2x { + margin-top: .25em; +} +.btn.btn-large [class^="icon-"], +.btn.btn-large [class*=" icon-"] { + margin-top: 0; +} +.btn.btn-large [class^="icon-"].pull-left.icon-2x, +.btn.btn-large [class*=" icon-"].pull-left.icon-2x, +.btn.btn-large [class^="icon-"].pull-right.icon-2x, +.btn.btn-large [class*=" icon-"].pull-right.icon-2x { + margin-top: .05em; +} +.btn.btn-large [class^="icon-"].pull-left.icon-2x, +.btn.btn-large [class*=" icon-"].pull-left.icon-2x { + margin-right: .2em; +} +.btn.btn-large [class^="icon-"].pull-right.icon-2x, +.btn.btn-large [class*=" icon-"].pull-right.icon-2x { + margin-left: .2em; +} +/* EXTRAS + * -------------------------- */ +/* Stacked and layered icon */ +.icon-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: -35%; +} +.icon-stack [class^="icon-"], +.icon-stack [class*=" icon-"] { + display: block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; + font-size: 1em; + line-height: inherit; + *line-height: 2em; +} +.icon-stack .icon-stack-base { + font-size: 2em; + *line-height: 1em; +} +/* Animated rotating icon */ +.icon-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +/* Icon rotations and mirroring */ +.icon-rotate-90:before { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); +} +.icon-rotate-180:before { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); +} +.icon-rotate-270:before { + -webkit-transform: rotate(270deg); + -moz-transform: rotate(270deg); + -ms-transform: rotate(270deg); + -o-transform: rotate(270deg); + transform: rotate(270deg); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); +} +.icon-flip-horizontal:before { + -webkit-transform: scale(-1, 1); + -moz-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + -o-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.icon-flip-vertical:before { + -webkit-transform: scale(1, -1); + -moz-transform: scale(1, -1); + -ms-transform: scale(1, -1); + -o-transform: scale(1, -1); + transform: scale(1, -1); +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.icon-glass:before { + content: "\f000"; +} +.icon-music:before { + content: "\f001"; +} +.icon-search:before { + content: "\f002"; +} +.icon-envelope:before { + content: "\f003"; +} +.icon-heart:before { + content: "\f004"; +} +.icon-star:before { + content: "\f005"; +} +.icon-star-empty:before { + content: "\f006"; +} +.icon-user:before { + content: "\f007"; +} +.icon-film:before { + content: "\f008"; +} +.icon-th-large:before { + content: "\f009"; +} +.icon-th:before { + content: "\f00a"; +} +.icon-th-list:before { + content: "\f00b"; +} +.icon-ok:before { + content: "\f00c"; +} +.icon-remove:before { + content: "\f00d"; +} +.icon-zoom-in:before { + content: "\f00e"; +} +.icon-zoom-out:before { + content: "\f010"; +} +.icon-off:before { + content: "\f011"; +} +.icon-signal:before { + content: "\f012"; +} +.icon-cog:before { + content: "\f013"; +} +.icon-trash:before { + content: "\f014"; +} +.icon-home:before { + content: "\f015"; +} +.icon-file:before { + content: "\f016"; +} +.icon-time:before { + content: "\f017"; +} +.icon-road:before { + content: "\f018"; +} +.icon-download-alt:before { + content: "\f019"; +} +.icon-download:before { + content: "\f01a"; +} +.icon-upload:before { + content: "\f01b"; +} +.icon-inbox:before { + content: "\f01c"; +} +.icon-play-circle:before { + content: "\f01d"; +} +.icon-repeat:before, +.icon-rotate-right:before { + content: "\f01e"; +} +/* F020 doesn't work in Safari. all shifted one down */ +.icon-refresh:before { + content: "\f021"; +} +.icon-list-alt:before { + content: "\f022"; +} +.icon-lock:before { + content: "\f023"; +} +.icon-flag:before { + content: "\f024"; +} +.icon-headphones:before { + content: "\f025"; +} +.icon-volume-off:before { + content: "\f026"; +} +.icon-volume-down:before { + content: "\f027"; +} +.icon-volume-up:before { + content: "\f028"; +} +.icon-qrcode:before { + content: "\f029"; +} +.icon-barcode:before { + content: "\f02a"; +} +.icon-tag:before { + content: "\f02b"; +} +.icon-tags:before { + content: "\f02c"; +} +.icon-book:before { + content: "\f02d"; +} +.icon-bookmark:before { + content: "\f02e"; +} +.icon-print:before { + content: "\f02f"; +} +.icon-camera:before { + content: "\f030"; +} +.icon-font:before { + content: "\f031"; +} +.icon-bold:before { + content: "\f032"; +} +.icon-italic:before { + content: "\f033"; +} +.icon-text-height:before { + content: "\f034"; +} +.icon-text-width:before { + content: "\f035"; +} +.icon-align-left:before { + content: "\f036"; +} +.icon-align-center:before { + content: "\f037"; +} +.icon-align-right:before { + content: "\f038"; +} +.icon-align-justify:before { + content: "\f039"; +} +.icon-list:before { + content: "\f03a"; +} +.icon-indent-left:before { + content: "\f03b"; +} +.icon-indent-right:before { + content: "\f03c"; +} +.icon-facetime-video:before { + content: "\f03d"; +} +.icon-picture:before { + content: "\f03e"; +} +.icon-pencil:before { + content: "\f040"; +} +.icon-map-marker:before { + content: "\f041"; +} +.icon-adjust:before { + content: "\f042"; +} +.icon-tint:before { + content: "\f043"; +} +.icon-edit:before { + content: "\f044"; +} +.icon-share:before { + content: "\f045"; +} +.icon-check:before { + content: "\f046"; +} +.icon-move:before { + content: "\f047"; +} +.icon-step-backward:before { + content: "\f048"; +} +.icon-fast-backward:before { + content: "\f049"; +} +.icon-backward:before { + content: "\f04a"; +} +.icon-play:before { + content: "\f04b"; +} +.icon-pause:before { + content: "\f04c"; +} +.icon-stop:before { + content: "\f04d"; +} +.icon-forward:before { + content: "\f04e"; +} +.icon-fast-forward:before { + content: "\f050"; +} +.icon-step-forward:before { + content: "\f051"; +} +.icon-eject:before { + content: "\f052"; +} +.icon-chevron-left:before { + content: "\f053"; +} +.icon-chevron-right:before { + content: "\f054"; +} +.icon-plus-sign:before { + content: "\f055"; +} +.icon-minus-sign:before { + content: "\f056"; +} +.icon-remove-sign:before { + content: "\f057"; +} +.icon-ok-sign:before { + content: "\f058"; +} +.icon-question-sign:before { + content: "\f059"; +} +.icon-info-sign:before { + content: "\f05a"; +} +.icon-screenshot:before { + content: "\f05b"; +} +.icon-remove-circle:before { + content: "\f05c"; +} +.icon-ok-circle:before { + content: "\f05d"; +} +.icon-ban-circle:before { + content: "\f05e"; +} +.icon-arrow-left:before { + content: "\f060"; +} +.icon-arrow-right:before { + content: "\f061"; +} +.icon-arrow-up:before { + content: "\f062"; +} +.icon-arrow-down:before { + content: "\f063"; +} +.icon-share-alt:before, +.icon-mail-forward:before { + content: "\f064"; +} +.icon-resize-full:before { + content: "\f065"; +} +.icon-resize-small:before { + content: "\f066"; +} +.icon-plus:before { + content: "\f067"; +} +.icon-minus:before { + content: "\f068"; +} +.icon-asterisk:before { + content: "\f069"; +} +.icon-exclamation-sign:before { + content: "\f06a"; +} +.icon-gift:before { + content: "\f06b"; +} +.icon-leaf:before { + content: "\f06c"; +} +.icon-fire:before { + content: "\f06d"; +} +.icon-eye-open:before { + content: "\f06e"; +} +.icon-eye-close:before { + content: "\f070"; +} +.icon-warning-sign:before { + content: "\f071"; +} +.icon-plane:before { + content: "\f072"; +} +.icon-calendar:before { + content: "\f073"; +} +.icon-random:before { + content: "\f074"; +} +.icon-comment:before { + content: "\f075"; +} +.icon-magnet:before { + content: "\f076"; +} +.icon-chevron-up:before { + content: "\f077"; +} +.icon-chevron-down:before { + content: "\f078"; +} +.icon-retweet:before { + content: "\f079"; +} +.icon-shopping-cart:before { + content: "\f07a"; +} +.icon-folder-close:before { + content: "\f07b"; +} +.icon-folder-open:before { + content: "\f07c"; +} +.icon-resize-vertical:before { + content: "\f07d"; +} +.icon-resize-horizontal:before { + content: "\f07e"; +} +.icon-bar-chart:before { + content: "\f080"; +} +.icon-twitter-sign:before { + content: "\f081"; +} +.icon-facebook-sign:before { + content: "\f082"; +} +.icon-camera-retro:before { + content: "\f083"; +} +.icon-key:before { + content: "\f084"; +} +.icon-cogs:before { + content: "\f085"; +} +.icon-comments:before { + content: "\f086"; +} +.icon-thumbs-up:before { + content: "\f087"; +} +.icon-thumbs-down:before { + content: "\f088"; +} +.icon-star-half:before { + content: "\f089"; +} +.icon-heart-empty:before { + content: "\f08a"; +} +.icon-signout:before { + content: "\f08b"; +} +.icon-linkedin-sign:before { + content: "\f08c"; +} +.icon-pushpin:before { + content: "\f08d"; +} +.icon-external-link:before { + content: "\f08e"; +} +.icon-signin:before { + content: "\f090"; +} +.icon-trophy:before { + content: "\f091"; +} +.icon-github-sign:before { + content: "\f092"; +} +.icon-upload-alt:before { + content: "\f093"; +} +.icon-lemon:before { + content: "\f094"; +} +.icon-phone:before { + content: "\f095"; +} +.icon-check-empty:before { + content: "\f096"; +} +.icon-bookmark-empty:before { + content: "\f097"; +} +.icon-phone-sign:before { + content: "\f098"; +} +.icon-twitter:before { + content: "\f099"; +} +.icon-facebook:before { + content: "\f09a"; +} +.icon-github:before { + content: "\f09b"; +} +.icon-unlock:before { + content: "\f09c"; +} +.icon-credit-card:before { + content: "\f09d"; +} +.icon-rss:before { + content: "\f09e"; +} +.icon-hdd:before { + content: "\f0a0"; +} +.icon-bullhorn:before { + content: "\f0a1"; +} +.icon-bell:before { + content: "\f0a2"; +} +.icon-certificate:before { + content: "\f0a3"; +} +.icon-hand-right:before { + content: "\f0a4"; +} +.icon-hand-left:before { + content: "\f0a5"; +} +.icon-hand-up:before { + content: "\f0a6"; +} +.icon-hand-down:before { + content: "\f0a7"; +} +.icon-circle-arrow-left:before { + content: "\f0a8"; +} +.icon-circle-arrow-right:before { + content: "\f0a9"; +} +.icon-circle-arrow-up:before { + content: "\f0aa"; +} +.icon-circle-arrow-down:before { + content: "\f0ab"; +} +.icon-globe:before { + content: "\f0ac"; +} +.icon-wrench:before { + content: "\f0ad"; +} +.icon-tasks:before { + content: "\f0ae"; +} +.icon-filter:before { + content: "\f0b0"; +} +.icon-briefcase:before { + content: "\f0b1"; +} +.icon-fullscreen:before { + content: "\f0b2"; +} +.icon-group:before { + content: "\f0c0"; +} +.icon-link:before { + content: "\f0c1"; +} +.icon-cloud:before { + content: "\f0c2"; +} +.icon-beaker:before { + content: "\f0c3"; +} +.icon-cut:before { + content: "\f0c4"; +} +.icon-copy:before { + content: "\f0c5"; +} +.icon-paper-clip:before { + content: "\f0c6"; +} +.icon-save:before { + content: "\f0c7"; +} +.icon-sign-blank:before { + content: "\f0c8"; +} +.icon-reorder:before { + content: "\f0c9"; +} +.icon-list-ul:before { + content: "\f0ca"; +} +.icon-list-ol:before { + content: "\f0cb"; +} +.icon-strikethrough:before { + content: "\f0cc"; +} +.icon-underline:before { + content: "\f0cd"; +} +.icon-table:before { + content: "\f0ce"; +} +.icon-magic:before { + content: "\f0d0"; +} +.icon-truck:before { + content: "\f0d1"; +} +.icon-pinterest:before { + content: "\f0d2"; +} +.icon-pinterest-sign:before { + content: "\f0d3"; +} +.icon-google-plus-sign:before { + content: "\f0d4"; +} +.icon-google-plus:before { + content: "\f0d5"; +} +.icon-money:before { + content: "\f0d6"; +} +.icon-caret-down:before { + content: "\f0d7"; +} +.icon-caret-up:before { + content: "\f0d8"; +} +.icon-caret-left:before { + content: "\f0d9"; +} +.icon-caret-right:before { + content: "\f0da"; +} +.icon-columns:before { + content: "\f0db"; +} +.icon-sort:before { + content: "\f0dc"; +} +.icon-sort-down:before { + content: "\f0dd"; +} +.icon-sort-up:before { + content: "\f0de"; +} +.icon-envelope-alt:before { + content: "\f0e0"; +} +.icon-linkedin:before { + content: "\f0e1"; +} +.icon-undo:before, +.icon-rotate-left:before { + content: "\f0e2"; +} +.icon-legal:before { + content: "\f0e3"; +} +.icon-dashboard:before { + content: "\f0e4"; +} +.icon-comment-alt:before { + content: "\f0e5"; +} +.icon-comments-alt:before { + content: "\f0e6"; +} +.icon-bolt:before { + content: "\f0e7"; +} +.icon-sitemap:before { + content: "\f0e8"; +} +.icon-umbrella:before { + content: "\f0e9"; +} +.icon-paste:before { + content: "\f0ea"; +} +.icon-lightbulb:before { + content: "\f0eb"; +} +.icon-exchange:before { + content: "\f0ec"; +} +.icon-cloud-download:before { + content: "\f0ed"; +} +.icon-cloud-upload:before { + content: "\f0ee"; +} +.icon-user-md:before { + content: "\f0f0"; +} +.icon-stethoscope:before { + content: "\f0f1"; +} +.icon-suitcase:before { + content: "\f0f2"; +} +.icon-bell-alt:before { + content: "\f0f3"; +} +.icon-coffee:before { + content: "\f0f4"; +} +.icon-food:before { + content: "\f0f5"; +} +.icon-file-alt:before { + content: "\f0f6"; +} +.icon-building:before { + content: "\f0f7"; +} +.icon-hospital:before { + content: "\f0f8"; +} +.icon-ambulance:before { + content: "\f0f9"; +} +.icon-medkit:before { + content: "\f0fa"; +} +.icon-fighter-jet:before { + content: "\f0fb"; +} +.icon-beer:before { + content: "\f0fc"; +} +.icon-h-sign:before { + content: "\f0fd"; +} +.icon-plus-sign-alt:before { + content: "\f0fe"; +} +.icon-double-angle-left:before { + content: "\f100"; +} +.icon-double-angle-right:before { + content: "\f101"; +} +.icon-double-angle-up:before { + content: "\f102"; +} +.icon-double-angle-down:before { + content: "\f103"; +} +.icon-angle-left:before { + content: "\f104"; +} +.icon-angle-right:before { + content: "\f105"; +} +.icon-angle-up:before { + content: "\f106"; +} +.icon-angle-down:before { + content: "\f107"; +} +.icon-desktop:before { + content: "\f108"; +} +.icon-laptop:before { + content: "\f109"; +} +.icon-tablet:before { + content: "\f10a"; +} +.icon-mobile-phone:before { + content: "\f10b"; +} +.icon-circle-blank:before { + content: "\f10c"; +} +.icon-quote-left:before { + content: "\f10d"; +} +.icon-quote-right:before { + content: "\f10e"; +} +.icon-spinner:before { + content: "\f110"; +} +.icon-circle:before { + content: "\f111"; +} +.icon-reply:before, +.icon-mail-reply:before { + content: "\f112"; +} +.icon-folder-close-alt:before { + content: "\f114"; +} +.icon-folder-open-alt:before { + content: "\f115"; +} +.icon-expand-alt:before { + content: "\f116"; +} +.icon-collapse-alt:before { + content: "\f117"; +} +.icon-smile:before { + content: "\f118"; +} +.icon-frown:before { + content: "\f119"; +} +.icon-meh:before { + content: "\f11a"; +} +.icon-gamepad:before { + content: "\f11b"; +} +.icon-keyboard:before { + content: "\f11c"; +} +.icon-flag-alt:before { + content: "\f11d"; +} +.icon-flag-checkered:before { + content: "\f11e"; +} +.icon-terminal:before { + content: "\f120"; +} +.icon-code:before { + content: "\f121"; +} +.icon-reply-all:before { + content: "\f122"; +} +.icon-mail-reply-all:before { + content: "\f122"; +} +.icon-star-half-full:before, +.icon-star-half-empty:before { + content: "\f123"; +} +.icon-location-arrow:before { + content: "\f124"; +} +.icon-crop:before { + content: "\f125"; +} +.icon-code-fork:before { + content: "\f126"; +} +.icon-unlink:before { + content: "\f127"; +} +.icon-question:before { + content: "\f128"; +} +.icon-info:before { + content: "\f129"; +} +.icon-exclamation:before { + content: "\f12a"; +} +.icon-superscript:before { + content: "\f12b"; +} +.icon-subscript:before { + content: "\f12c"; +} +.icon-eraser:before { + content: "\f12d"; +} +.icon-puzzle-piece:before { + content: "\f12e"; +} +.icon-microphone:before { + content: "\f130"; +} +.icon-microphone-off:before { + content: "\f131"; +} +.icon-shield:before { + content: "\f132"; +} +.icon-calendar-empty:before { + content: "\f133"; +} +.icon-fire-extinguisher:before { + content: "\f134"; +} +.icon-rocket:before { + content: "\f135"; +} +.icon-maxcdn:before { + content: "\f136"; +} +.icon-chevron-sign-left:before { + content: "\f137"; +} +.icon-chevron-sign-right:before { + content: "\f138"; +} +.icon-chevron-sign-up:before { + content: "\f139"; +} +.icon-chevron-sign-down:before { + content: "\f13a"; +} +.icon-html5:before { + content: "\f13b"; +} +.icon-css3:before { + content: "\f13c"; +} +.icon-anchor:before { + content: "\f13d"; +} +.icon-unlock-alt:before { + content: "\f13e"; +} +.icon-bullseye:before { + content: "\f140"; +} +.icon-ellipsis-horizontal:before { + content: "\f141"; +} +.icon-ellipsis-vertical:before { + content: "\f142"; +} +.icon-rss-sign:before { + content: "\f143"; +} +.icon-play-sign:before { + content: "\f144"; +} +.icon-ticket:before { + content: "\f145"; +} +.icon-minus-sign-alt:before { + content: "\f146"; +} +.icon-check-minus:before { + content: "\f147"; +} +.icon-level-up:before { + content: "\f148"; +} +.icon-level-down:before { + content: "\f149"; +} +.icon-check-sign:before { + content: "\f14a"; +} +.icon-edit-sign:before { + content: "\f14b"; +} +.icon-external-link-sign:before { + content: "\f14c"; +} +.icon-share-sign:before { + content: "\f14d"; +} diff --git a/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.eot b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.eot new file mode 100644 index 000000000..c080283bd Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.eot differ diff --git a/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.svg b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.svg new file mode 100644 index 000000000..10a1e1bbf --- /dev/null +++ b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.svg @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.ttf b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.ttf new file mode 100644 index 000000000..908f69ec9 Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.ttf differ diff --git a/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.woff b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.woff new file mode 100644 index 000000000..a33af950a Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/fontawesome-webfont.woff differ diff --git a/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.eot b/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.eot new file mode 100644 index 000000000..332499946 Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.eot differ diff --git a/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.ttf b/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.ttf new file mode 100644 index 000000000..9248b9a4e Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/museo_slab_300-webfont.ttf differ diff --git a/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.eot b/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.eot new file mode 100644 index 000000000..2eb7a8977 Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.eot differ diff --git a/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.ttf b/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.ttf new file mode 100644 index 000000000..bf78a2aef Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/museo_slab_500-webfont.ttf differ diff --git a/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.eot b/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.eot new file mode 100644 index 000000000..ecf0cb15e Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.eot differ diff --git a/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.ttf b/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.ttf new file mode 100644 index 000000000..564f1aae7 Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/proximanova-sbold-webfont.ttf differ diff --git a/modules/tmhtmlcontent/views/css/font/proximanova-webfont.eot b/modules/tmhtmlcontent/views/css/font/proximanova-webfont.eot new file mode 100644 index 000000000..1f28b415c Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/proximanova-webfont.eot differ diff --git a/modules/tmhtmlcontent/views/css/font/proximanova-webfont.ttf b/modules/tmhtmlcontent/views/css/font/proximanova-webfont.ttf new file mode 100644 index 000000000..e9aa413bb Binary files /dev/null and b/modules/tmhtmlcontent/views/css/font/proximanova-webfont.ttf differ diff --git a/modules/tmhtmlcontent/views/css/hooks.css b/modules/tmhtmlcontent/views/css/hooks.css new file mode 100644 index 000000000..fdff4e144 --- /dev/null +++ b/modules/tmhtmlcontent/views/css/hooks.css @@ -0,0 +1,37 @@ +/* Home hook CSS */ +#htmlcontent_home { +} + +ul.htmlcontent-home { +} + +li.htmlcontent-item { +} + +li.htmlcontent-item a.item-link { +} + +li.htmlcontent-item img.item-img { +} + +li.htmlcontent-item h3.item-title { +} + +li.htmlcontent-item div.item-html { +} + +/* Top hook CSS */ +#htmlcontent_top { +} + +/* Left hook CSS */ +#htmlcontent_left { +} + +/* Right hook CSS */ +#htmlcontent_right { +} + +/* Footer hook CSS */ +#htmlcontent_footer { +} diff --git a/modules/tmhtmlcontent/views/index.php b/modules/tmhtmlcontent/views/index.php new file mode 100644 index 000000000..198b35f62 --- /dev/null +++ b/modules/tmhtmlcontent/views/index.php @@ -0,0 +1,10 @@ + +

{$htmlcontent.info.name} (v.{$htmlcontent.info.version})

+ + {if $error} + {include file="{$htmlcontent.admin_tpl_path}messages.tpl" id="main" text=$error class='error'} + {/if} + {if $confirmation} + {include file="{$htmlcontent.admin_tpl_path}messages.tpl" id="main" text=$confirmation class='conf'} + {/if} + + + {include file="{$htmlcontent.admin_tpl_path}new.tpl"} + + {include file="{$htmlcontent.admin_tpl_path}items.tpl"} + + \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/templates/admin/index.php b/modules/tmhtmlcontent/views/templates/admin/index.php new file mode 100644 index 000000000..198b35f62 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/admin/index.php @@ -0,0 +1,10 @@ + + {foreach from=$htmlitems.lang.all item=lang} +
  • {$lang.name} {$lang.name}
  • + {/foreach} + +
    +{foreach name=langs from=$htmlitems.items key=lang item=langItems} + +
    + {foreach name=hooks from=$langItems key=hook item=hookItems} + +

    {l s='Hook' mod='tmhtmlcontent'} "{$hook}"

    + {if $hookItems} +
      + {foreach name=items from=$hookItems item=hItem} +
    • + {if $hItem.item_order le 9}0{/if}{$hItem.item_order} + + {$hItem.title} + {l s='Edit' mod='tmhtmlcontent'} + {l s='Close' mod='tmhtmlcontent'} + +
      +
      + + + +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + +
      +
      + +
      +
      +
      + + +
      +
      + + +
      +
      + + +
      +
      + + +
      + + +
      +
      +
    • + {/foreach} +
    + {else} +
    + {l s='No items available' mod='tmhtmlcontent'} +
    + {/if} + {/foreach} +
    +{/foreach} +
    diff --git a/modules/tmhtmlcontent/views/templates/admin/messages.tpl b/modules/tmhtmlcontent/views/templates/admin/messages.tpl new file mode 100644 index 000000000..45f30c839 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/admin/messages.tpl @@ -0,0 +1,3 @@ +
    +
    {if isset($text)}{$text}{/if}
    +
    \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/templates/admin/new.tpl b/modules/tmhtmlcontent/views/templates/admin/new.tpl new file mode 100644 index 000000000..3df5064f6 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/admin/new.tpl @@ -0,0 +1,57 @@ +
    + {l s='Add item' mod='tmhtmlcontent'} +
    +
    +
    + +
      + {foreach from=$htmlitems.lang.all item=lang} +
    • {$lang.name}
    • + {/foreach} +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    +
    +
    diff --git a/modules/tmhtmlcontent/views/templates/hooks/footer.tpl b/modules/tmhtmlcontent/views/templates/hooks/footer.tpl new file mode 100644 index 000000000..ddf20e55d --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/hooks/footer.tpl @@ -0,0 +1,27 @@ +{if isset($htmlitems.items) && $htmlitems.items} + +{/if} diff --git a/modules/tmhtmlcontent/views/templates/hooks/home.tpl b/modules/tmhtmlcontent/views/templates/hooks/home.tpl new file mode 100644 index 000000000..285b07aea --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/hooks/home.tpl @@ -0,0 +1,27 @@ +{if isset($htmlitems.items) && $htmlitems.items} +
    + +
    +{/if} diff --git a/modules/tmhtmlcontent/views/templates/hooks/left.tpl b/modules/tmhtmlcontent/views/templates/hooks/left.tpl new file mode 100644 index 000000000..afc5afbb6 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/hooks/left.tpl @@ -0,0 +1,27 @@ +{if isset($htmlitems.items) && $htmlitems.items} +
    + +
    +{/if} \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/templates/hooks/right.tpl b/modules/tmhtmlcontent/views/templates/hooks/right.tpl new file mode 100644 index 000000000..6fe8b6c57 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/hooks/right.tpl @@ -0,0 +1,27 @@ +{if isset($htmlitems.items) && $htmlitems.items} +
    + +
    +{/if} \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/templates/hooks/top.tpl b/modules/tmhtmlcontent/views/templates/hooks/top.tpl new file mode 100644 index 000000000..e9f9f958c --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/hooks/top.tpl @@ -0,0 +1,27 @@ +{if isset($htmlitems.items) && $htmlitems.items} +
    + +
    +{/if} \ No newline at end of file diff --git a/modules/tmhtmlcontent/views/templates/index.php b/modules/tmhtmlcontent/views/templates/index.php new file mode 100644 index 000000000..198b35f62 --- /dev/null +++ b/modules/tmhtmlcontent/views/templates/index.php @@ -0,0 +1,10 @@ + li { + position: static; +} +#categories_block_top .sf-menu > li > ul { + width: 100%; + top: 60px; + margin: 0 20px; +} +#categories_block_top .sf-menu > li > ul > li { + display: block; + float: left; + width: 20%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0 10px; +} +#categories_block_top .sf-menu > li > ul > .category_thumb { + display: block; + clear: both; + overflow: hidden; + width: 100%; +} +#categories_block_top .sf-menu > li > ul > .category_thumb img { + display: inline-block; + width: 33%; +} +#categories_block_top .sf-menu > li h4 a { + font-size: 1.1em; +} +#categories_block_top .sf-menu > li h4 a:before { + display: none; +} +#categories_block_top .sf-menu > li .main-level-submenus { + position: relative; + display: block !important; + visibility: visible !important; + top: 0; + background: none; + box-shadow: none; + padding: 0; + left: 0; +} +#categories_block_top .sf-menu .category_thumb { + display: none; +} + #categories_block_left .block_content > ul { border-top: 1px solid #d6d4d4; } @@ -1334,11 +1390,19 @@ ul.footer_links li + li { display: block; padding: 4px 0; } +@media (max-width: 767px) { + .top-pagination-content ul.pagination li.pagination_previous > a b, .top-pagination-content ul.pagination li.pagination_previous > span b, .top-pagination-content ul.pagination li.pagination_next > a b, .top-pagination-content ul.pagination li.pagination_next > span b, .bottom-pagination-content ul.pagination li.pagination_previous > a b, .bottom-pagination-content ul.pagination li.pagination_previous > span b, .bottom-pagination-content ul.pagination li.pagination_next > a b, .bottom-pagination-content ul.pagination li.pagination_next > span b { + display: none; + } +} .top-pagination-content ul.pagination li.pagination_previous > a span, .top-pagination-content ul.pagination li.pagination_previous > span span, .top-pagination-content ul.pagination li.pagination_next > a span, .top-pagination-content ul.pagination li.pagination_next > span span, .bottom-pagination-content ul.pagination li.pagination_previous > a span, .bottom-pagination-content ul.pagination li.pagination_previous > span span, .bottom-pagination-content ul.pagination li.pagination_next > a span, .bottom-pagination-content ul.pagination li.pagination_next > span span { border: none; padding: 0; background: none; } +.top-pagination-content ul.pagination li.pagination_previous > a b, .top-pagination-content ul.pagination li.pagination_previous > span b, .top-pagination-content ul.pagination li.pagination_next > a b, .top-pagination-content ul.pagination li.pagination_next > span b, .bottom-pagination-content ul.pagination li.pagination_previous > a b, .bottom-pagination-content ul.pagination li.pagination_previous > span b, .bottom-pagination-content ul.pagination li.pagination_next > a b, .bottom-pagination-content ul.pagination li.pagination_next > span b { + font-weight: bold; +} .top-pagination-content ul.pagination li.pagination_previous, .bottom-pagination-content ul.pagination li.pagination_previous { margin-right: 10px; } @@ -1552,7 +1616,7 @@ ul.step li.step_done { } ul.step li.step_done a { color: white; - text-shadow: 1px 1px rgba(0, 0, 0, 0); + text-shadow: 1px 1px rgba(0, 0, 0, 0.3); border: 1px solid; border-color: #8b8a8a; background: #727171; @@ -1791,7 +1855,7 @@ div.star_hover a, div.star a:hover { font-weight: bold; padding: 8px 10px 10px 10px; color: white; - text-shadow: 1px 1px rgba(0, 0, 0, 0); + text-shadow: 1px 1px rgba(0, 0, 0, 0.2); } @media (max-width: 479px) { #header #currencies-block-top div.current, #header #languages-block-top div.current { @@ -1862,7 +1926,7 @@ div.star_hover a, div.star a:hover { color: white; font-weight: bold; padding: 8px 10px 11px 10px; - text-shadow: 1px 1px rgba(0, 0, 0, 0); + text-shadow: 1px 1px rgba(0, 0, 0, 0.2); } @media (max-width: 479px) { #header #contact-link a { @@ -1994,7 +2058,7 @@ div.star_hover a, div.star a:hover { } .footer-container #footer ul li a { font-weight: bold; - text-shadow: 1px 1px 0px rgba(0, 0, 0, 0); + text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4); } .footer-container #footer #block_contact_infos { border-left: 1px solid #515151; @@ -2736,7 +2800,6 @@ p.cheque-indent { #manufacturers_list.list li .mansup-container, #suppliers_list.list li .mansup-container { border-top: 1px solid #d6d4d4; padding: 31px 0 30px 0; - /* < 768 */ } @media (max-width: 767px) { #manufacturers_list.list li .mansup-container, #suppliers_list.list li .mansup-container { @@ -2755,7 +2818,6 @@ p.cheque-indent { } #manufacturers_list.list li .middle-side, #suppliers_list.list li .middle-side { padding-left: 0; - /* < 768 */ } @media (max-width: 767px) { #manufacturers_list.list li .middle-side, #suppliers_list.list li .middle-side { @@ -2767,7 +2829,6 @@ p.cheque-indent { border-left: 1px solid #d6d4d4; padding: 0 0 32px 31px; min-height: 108px; - /* < 768 */ } @media (max-width: 767px) { #manufacturers_list.list li .right-side-content, #suppliers_list.list li .right-side-content { @@ -2780,18 +2841,12 @@ p.cheque-indent { position: relative; top: -6px; margin-bottom: 12px; - /* < 768 */ } @media (max-width: 767px) { #manufacturers_list.list li .right-side-content .product-counter, #suppliers_list.list li .right-side-content .product-counter { top: 0; } } -#manufacturers_list.grid, #suppliers_list.grid { - /* > 1199 */ - /*768 -> 1199*/ - /*< 768 */ -} #manufacturers_list.grid li, #suppliers_list.grid li { text-align: center; } @@ -2844,7 +2899,6 @@ p.cheque-indent { } #manufacturer .bottom-pagination-content #pagination .showall, #manufacturer .top-pagination-content #pagination .showall, #supplier .bottom-pagination-content #pagination .showall, #supplier .top-pagination-content #pagination .showall { margin-right: 0; - /* > 1199 */ } @media (min-width: 1200px) { #manufacturer .bottom-pagination-content #pagination .showall, #manufacturer .top-pagination-content #pagination .showall, #supplier .bottom-pagination-content #pagination .showall, #supplier .top-pagination-content #pagination .showall { @@ -2873,9 +2927,6 @@ table.discount i.icon-remove { /***************************************************************************************************** GUEST TRACKING ******************************************************************************************************/ -#guestTracking { - /* > 1200px */ -} #guestTracking .form-control { max-width: 271px; } @@ -2943,7 +2994,6 @@ table.discount i.icon-remove { max-width: 293px; display: inline-block; margin-right: 5px; - /* max 767px */ } @media (max-width: 767px) { #pagenotfound .pagenotfound .form-control { @@ -3172,3 +3222,139 @@ div.star_hover a, div.star a:hover { content: ""; font-family: "FontAwesome"; } + +/********************************************* Homepage pre-footer *****************************************/ +#facebook_block, #cmsinfo_block { + margin-top: 40px; + overflow: hidden; + background: #f2f2f2; + min-height: 344px; + padding-right: 29px; + padding-left: 29px; +} +@media (max-width: 991px) { + #facebook_block, #cmsinfo_block { + padding-left: 15px; + padding-right: 15px; + } +} +@media (max-width: 767px) { + #facebook_block, #cmsinfo_block { + width: 100%; + min-height: 1px; + } +} +#facebook_block h4, #cmsinfo_block h4 { + font: 600 21px/25px "Open Sans", sans-serif; + color: #555454; + margin-bottom: 26px; +} +@media (max-width: 991px) { + #facebook_block h4, #cmsinfo_block h4 { + font-size: 16px; + } +} +@media (max-width: 767px) { + #facebook_block h4, #cmsinfo_block h4 { + padding-top: 20px !important; + } +} + +#facebook_block h4 { + padding-top: 44px; +} +#facebook_block .facebook-fanbox { + background: white; + border: 1px solid #aaaaaa; + padding-bottom: 10px; +} + +#cmsinfo_block { + border-left: 1px solid #d9d9d9; +} +@media (max-width: 767px) { + #cmsinfo_block { + border: none; + margin-top: 10px; + } +} +#cmsinfo_block > div { + padding-top: 45px; + padding-left: 0; +} +@media (max-width: 767px) { + #cmsinfo_block > div { + padding-top: 20px; + } +} +@media (max-width: 479px) { + #cmsinfo_block > div { + width: 100%; + border-top: 1px solid #d9d9d9; + } +} +#cmsinfo_block > div + div { + border-left: 1px solid #d9d9d9; + min-height: 344px; + padding-left: 29px; +} +@media (max-width: 479px) { + #cmsinfo_block > div + div { + border-left: none; + padding-left: 10px; + min-height: 1px; + padding-bottom: 15px; + } +} +#cmsinfo_block > div + div h3 { + margin-bottom: 12px; +} +#cmsinfo_block em { + float: left; + font-size: 35px; + color: white; + width: 59px; + height: 59px; + line-height: 59px; + text-align: center; + background: #333333; + -webkit-border-radius: 100px; + -moz-border-radius: 100px; + -ms-border-radius: 100px; + -o-border-radius: 100px; + border-radius: 100px; + margin: 3px 10px 0 0; +} +@media (max-width: 991px) { + #cmsinfo_block em { + width: 30px; + height: 30px; + line-height: 30px; + font-size: 20px; + } +} +#cmsinfo_block .type-text { + overflow: hidden; +} +#cmsinfo_block h3 { + font: 600 21px/25px "Open Sans", sans-serif; + color: #555454; +} +@media (max-width: 1199px) { + #cmsinfo_block h3 { + font-size: 18px; + } +} +#cmsinfo_block ul li { + padding-bottom: 22px; +} +@media (max-width: 1199px) { + #cmsinfo_block ul li { + padding-bottom: 10px; + } +} +@media (max-width: 991px) { + #cmsinfo_block ul li { + padding-bottom: 0; + } +} diff --git a/themes/default-bootstrap/css/modules/blocklayered/blocklayered-15.css b/themes/default-bootstrap/css/modules/blocklayered/blocklayered-15.css index d7448b880..c898ef199 100644 --- a/themes/default-bootstrap/css/modules/blocklayered/blocklayered-15.css +++ b/themes/default-bootstrap/css/modules/blocklayered/blocklayered-15.css @@ -10,7 +10,7 @@ padding-bottom: 11px; } #enabled_filters li { - padding: 1px 0; + padding: 1px 15px 1px 0; color: #9c9b9b; cursor: pointer; position: relative; diff --git a/themes/default-bootstrap/css/modules/homeslider/bx_styles.css b/themes/default-bootstrap/css/modules/homeslider/bx_styles.css index e7e8fd7a0..cc8d96652 100644 --- a/themes/default-bootstrap/css/modules/homeslider/bx_styles.css +++ b/themes/default-bootstrap/css/modules/homeslider/bx_styles.css @@ -16,11 +16,20 @@ #homepage-slider { padding-left: 0; padding-right: 0; - padding-top: 29px; - margin-bottom: 35px; + padding-top: 50px; + margin-bottom: 14px; + width: 66.6%; max-width: 779px; position: relative; z-index: 1; + float: left; +} +@media (max-width: 767px) { + #homepage-slider { + width: 100%; + max-width: 100%; + padding-top: 20px; + } } #homepage-slider #homeslider { margin: 0 auto; diff --git a/themes/default-bootstrap/css/modules/tmhtmlcontent/views/css/hooks.css b/themes/default-bootstrap/css/modules/tmhtmlcontent/views/css/hooks.css new file mode 100644 index 000000000..e851709ae --- /dev/null +++ b/themes/default-bootstrap/css/modules/tmhtmlcontent/views/css/hooks.css @@ -0,0 +1,72 @@ +@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic); +/* Home hook CSS */ +#htmlcontent_home ul { + margin: 0 -5px; +} +#htmlcontent_home ul li { + padding: 0 5px 10px; +} +@media (max-width: 479px) { + #htmlcontent_home ul li { + width: 100%; + } +} +#htmlcontent_home ul li img { + max-width: 100%; + height: auto; +} +@media (max-width: 479px) { + #htmlcontent_home ul li img { + min-width: 100%; + } +} +#htmlcontent_home ul li.htmlcontent-item-4 { + width: 66.6667%; +} +@media (max-width: 479px) { + #htmlcontent_home ul li.htmlcontent-item-4 { + width: 100%; + } +} + +/* Top hook CSS */ +#htmlcontent_top { + float: left; + padding-top: 40px; + width: 33.4%; + max-width: 391px; + padding-left: 10px; +} +@media (max-width: 767px) { + #htmlcontent_top { + width: 100%; + max-width: 100%; + padding-left: 0; + padding-top: 0px; + } +} +@media (max-width: 767px) { + #htmlcontent_top ul { + margin: 0 -5px; + } +} +#htmlcontent_top ul li { + padding-top: 10px; + width: 100%; +} +@media (max-width: 767px) { + #htmlcontent_top ul li { + float: left; + padding-left: 5px; + padding-right: 5px; + width: 50%; + } +} +#htmlcontent_top ul li img { + max-width: 100%; + height: auto; +} + +/* Left hook CSS */ +/* Right hook CSS */ +/* Footer hook CSS */ diff --git a/themes/default-bootstrap/header.tpl b/themes/default-bootstrap/header.tpl index 3caaf49c9..be2963702 100644 --- a/themes/default-bootstrap/header.tpl +++ b/themes/default-bootstrap/header.tpl @@ -40,7 +40,17 @@ - + + +