diff --git a/modules/blockbanner/blockbanner.php b/modules/blockbanner/blockbanner.php new file mode 100644 index 000000000..68f4eafee --- /dev/null +++ b/modules/blockbanner/blockbanner.php @@ -0,0 +1,184 @@ + +* @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 BlockBanner extends Module +{ + public function __construct() + { + $this->name = 'blockbanner'; + $this->tab = 'other'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->bootstrap = true; + parent::__construct(); + + $this->displayName = $this->l('Banner block'); + $this->description = $this->l('Displays banner at the top of the store.'); + } + + public function install() + { + Configuration::updateValue('BLOCKBANNER_IMG', 'store.jpg'); + Configuration::updateValue('BLOCKBANNER_LINK', ''); + Configuration::updateValue('BLOCKBANNER_DESC', ''); + return parent::install() && $this->registerHook('displayTop') && $this->registerHook('header'); + } + + public function uninstall() + { + Configuration::deleteByName('BLOCKBANNER_IMG'); + Configuration::deleteByName('BLOCKBANNER_LINK'); + Configuration::deleteByName('BLOCKBANNER_DESC'); + return parent::uninstall(); + } + + public function hookDisplayTop($params) + { + if (!$this->isCached('blockbanner.tpl', $this->getCacheId())) + { + $this->smarty->assign('banner_img', Configuration::get('BLOCKBANNER_IMG')); + $this->smarty->assign('banner_link', Configuration::get('BLOCKBANNER_LINK')); + $this->smarty->assign('banner_desc', Configuration::get('BLOCKBANNER_DESC')); + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'store s' + .Shop::addSqlAssociation('store', 's'); + $total = Db::getInstance()->getValue($sql); + + if ($total <= 0) + return; + } + return $this->display(__FILE__, 'blockbanner.tpl', $this->getCacheId()); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'blockbanner.css', 'all'); + } + + public function postProcess() + { + if (Tools::isSubmit('submitStoreConf')) + { + if (isset($_FILES['BLOCKBANNER_IMG']) && isset($_FILES['BLOCKBANNER_IMG']['tmp_name']) && !empty($_FILES['BLOCKBANNER_IMG']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['BLOCKBANNER_IMG'], 4000000)) + return $this->displayError($this->l('Invalid image')); + else + { + $ext = substr($_FILES['BLOCKBANNER_IMG']['name'], strrpos($_FILES['BLOCKBANNER_IMG']['name'], '.') + 1); + $file_name = md5($_FILES['BLOCKBANNER_IMG']['name']).'.'.$ext; + if (!move_uploaded_file($_FILES['BLOCKBANNER_IMG']['tmp_name'], dirname(__FILE__).'/'.$file_name)) + return $this->displayError($this->l('An error occurred while attempting to upload the file.')); + else + { + if (Configuration::hasContext('BLOCKBANNER_IMG', null, Shop::getContext()) && Configuration::get('BLOCKBANNER_IMG') != $file_name) + @unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKBANNER_IMG')); + Configuration::updateValue('BLOCKBANNER_IMG', $file_name); + $this->_clearCache('blockbanner.tpl'); + return $this->displayConfirmation($this->l('The settings have been updated.')); + } + } + } + Configuration::updateValue('BLOCKBANNER_LINK', Tools::getValue('BLOCKBANNER_LINK')); + Configuration::updateValue('BLOCKBANNER_DESC', Tools::getValue('BLOCKBANNER_DESC')); + } + return ''; + } + + public function getContent() + { + return $this->postProcess().$this->renderForm(); + return $output; + } + + public function renderForm() + { + $fields_form = array( + 'form' => array( + 'legend' => array( + 'title' => $this->l('Settings'), + 'icon' => 'icon-cogs' + ), + 'input' => array( + array( + 'type' => 'file', + 'label' => $this->l('Block image'), + 'name' => 'BLOCKBANNER_IMG', + 'desc' => $this->l('Please upload banner image'), + 'thumb' => '../modules/'.$this->name.'/'.Configuration::get('BLOCKBANNER_IMG'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Image Link'), + 'name' => 'BLOCKBANNER_LINK', + 'desc' => $this->l('Please input banner link') + ), + array( + 'type' => 'text', + 'label' => $this->l('Image description'), + 'name' => 'BLOCKBANNER_DESC', + 'desc' => $this->l('Please input banner image description') + ) + ), + '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; + $helper->identifier = $this->identifier; + $helper->submit_action = 'submitStoreConf'; + $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( + 'BLOCKBANNER_IMG' => Tools::getValue('BLOCKBANNER_IMG', Configuration::get('BLOCKBANNER_IMG')), + 'BLOCKBANNER_LINK' => Tools::getValue('BLOCKBANNER_LINK', Configuration::get('BLOCKBANNER_LINK')), + 'BLOCKBANNER_DESC' => Tools::getValue('BLOCKBANNER_DESC', Configuration::get('BLOCKBANNER_DESC')), + ); + } +} \ No newline at end of file diff --git a/modules/blockbanner/blockbanner.tpl b/modules/blockbanner/blockbanner.tpl new file mode 100644 index 000000000..3e26f8647 --- /dev/null +++ b/modules/blockbanner/blockbanner.tpl @@ -0,0 +1,36 @@ +{* +* 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 +*} + + + + diff --git a/modules/blockbanner/cde397c130d468ca53313a09bbb5f9aa.gif b/modules/blockbanner/cde397c130d468ca53313a09bbb5f9aa.gif new file mode 100644 index 000000000..af099bf05 Binary files /dev/null and b/modules/blockbanner/cde397c130d468ca53313a09bbb5f9aa.gif differ diff --git a/modules/blockbanner/config.xml b/modules/blockbanner/config.xml new file mode 100644 index 000000000..6271f1933 --- /dev/null +++ b/modules/blockbanner/config.xml @@ -0,0 +1,12 @@ + + + blockbanner + + + + + + 1 + 0 + + \ No newline at end of file diff --git a/modules/blockbanner/index.php b/modules/blockbanner/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/blockbanner/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/blockbanner/logo.gif b/modules/blockbanner/logo.gif new file mode 100644 index 000000000..659aace81 Binary files /dev/null and b/modules/blockbanner/logo.gif differ diff --git a/modules/blockbanner/logo.png b/modules/blockbanner/logo.png new file mode 100644 index 000000000..a4b55f7d6 Binary files /dev/null and b/modules/blockbanner/logo.png differ diff --git a/modules/blockbanner/translations/index.php b/modules/blockbanner/translations/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/blockbanner/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/productpaymentlogos/config.xml b/modules/productpaymentlogos/config.xml new file mode 100644 index 000000000..0c85eaeab --- /dev/null +++ b/modules/productpaymentlogos/config.xml @@ -0,0 +1,12 @@ + + + productpaymentlogos + + + + + + 1 + 0 + + \ No newline at end of file diff --git a/modules/productpaymentlogos/e4ee7a7ece2c90b3186c362c26d22a83.png b/modules/productpaymentlogos/e4ee7a7ece2c90b3186c362c26d22a83.png new file mode 100644 index 000000000..fc09af124 Binary files /dev/null and b/modules/productpaymentlogos/e4ee7a7ece2c90b3186c362c26d22a83.png differ diff --git a/modules/productpaymentlogos/index.php b/modules/productpaymentlogos/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/productpaymentlogos/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/productpaymentlogos/logo.gif b/modules/productpaymentlogos/logo.gif new file mode 100644 index 000000000..659aace81 Binary files /dev/null and b/modules/productpaymentlogos/logo.gif differ diff --git a/modules/productpaymentlogos/logo.png b/modules/productpaymentlogos/logo.png new file mode 100644 index 000000000..a4b55f7d6 Binary files /dev/null and b/modules/productpaymentlogos/logo.png differ diff --git a/modules/productpaymentlogos/payment-logo.png b/modules/productpaymentlogos/payment-logo.png new file mode 100644 index 000000000..fc09af124 Binary files /dev/null and b/modules/productpaymentlogos/payment-logo.png differ diff --git a/modules/productpaymentlogos/productpaymentlogos.php b/modules/productpaymentlogos/productpaymentlogos.php new file mode 100644 index 000000000..c64a3d81f --- /dev/null +++ b/modules/productpaymentlogos/productpaymentlogos.php @@ -0,0 +1,184 @@ + +* @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 ProductPaymentLogos extends Module +{ + public function __construct() + { + $this->name = 'productpaymentlogos'; + $this->tab = 'other'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->bootstrap = true; + parent::__construct(); + + $this->displayName = $this->l('Product payment logos block'); + $this->description = $this->l('Displays payment system logos at the product page.'); + } + + public function install() + { + Configuration::updateValue('PRODUCTPAYMENTLOGOS_IMG', 'payment-logo.png'); + Configuration::updateValue('PRODUCTPAYMENTLOGOS_LINK', ''); + Configuration::updateValue('PRODUCTPAYMENTLOGOS_TITLE', ''); + return parent::install() && $this->registerHook('displayProductButtons') && $this->registerHook('header'); + } + + public function uninstall() + { + Configuration::deleteByName('PRODUCTPAYMENTLOGOS_IMG'); + Configuration::deleteByName('PRODUCTPAYMENTLOGOS_LINK'); + Configuration::deleteByName('PRODUCTPAYMENTLOGOS_TITLE'); + return parent::uninstall(); + } + + public function hookDisplayProductButtons($params) + { + if (!$this->isCached('productpaymentlogos.tpl', $this->getCacheId())) + { + $this->smarty->assign('banner_img', Configuration::get('PRODUCTPAYMENTLOGOS_IMG')); + $this->smarty->assign('banner_link', Configuration::get('PRODUCTPAYMENTLOGOS_LINK')); + $this->smarty->assign('banner_title', Configuration::get('PRODUCTPAYMENTLOGOS_TITLE')); + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'store s' + .Shop::addSqlAssociation('store', 's'); + $total = Db::getInstance()->getValue($sql); + + if ($total <= 0) + return; + } + return $this->display(__FILE__, 'productpaymentlogos.tpl', $this->getCacheId()); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'productpaymentlogos.css', 'all'); + } + + public function postProcess() + { + if (Tools::isSubmit('submitStoreConf')) + { + if (isset($_FILES['PRODUCTPAYMENTLOGOS_IMG']) && isset($_FILES['PRODUCTPAYMENTLOGOS_IMG']['tmp_name']) && !empty($_FILES['PRODUCTPAYMENTLOGOS_IMG']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['PRODUCTPAYMENTLOGOS_IMG'], 4000000)) + return $this->displayError($this->l('Invalid image')); + else + { + $ext = substr($_FILES['PRODUCTPAYMENTLOGOS_IMG']['name'], strrpos($_FILES['PRODUCTPAYMENTLOGOS_IMG']['name'], '.') + 1); + $file_name = md5($_FILES['PRODUCTPAYMENTLOGOS_IMG']['name']).'.'.$ext; + if (!move_uploaded_file($_FILES['PRODUCTPAYMENTLOGOS_IMG']['tmp_name'], dirname(__FILE__).'/'.$file_name)) + return $this->displayError($this->l('An error occurred while attempting to upload the file.')); + else + { + if (Configuration::hasContext('PRODUCTPAYMENTLOGOS_IMG', null, Shop::getContext()) && Configuration::get('PRODUCTPAYMENTLOGOS_IMG') != $file_name) + @unlink(dirname(__FILE__).'/'.Configuration::get('PRODUCTPAYMENTLOGOS_IMG')); + Configuration::updateValue('PRODUCTPAYMENTLOGOS_IMG', $file_name); + $this->_clearCache('productpaymentlogos.tpl'); + return $this->displayConfirmation($this->l('The settings have been updated.')); + } + } + } + Configuration::updateValue('PRODUCTPAYMENTLOGOS_LINK', Tools::getValue('PRODUCTPAYMENTLOGOS_LINK')); + Configuration::updateValue('PRODUCTPAYMENTLOGOS_TITLE', Tools::getValue('PRODUCTPAYMENTLOGOS_TITLE')); + } + return ''; + } + + public function getContent() + { + return $this->postProcess().$this->renderForm(); + return $output; + } + + 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('Logos heading'), + 'name' => 'PRODUCTPAYMENTLOGOS_TITLE', + 'desc' => $this->l('Please input logos heading') + ), + array( + 'type' => 'file', + 'label' => $this->l('Block image'), + 'name' => 'PRODUCTPAYMENTLOGOS_IMG', + 'desc' => $this->l('Please upload banner image'), + 'thumb' => '../modules/'.$this->name.'/'.Configuration::get('PRODUCTPAYMENTLOGOS_IMG'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Image Link'), + 'name' => 'PRODUCTPAYMENTLOGOS_LINK', + 'desc' => $this->l('Please input banner link') + ) + ), + '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; + $helper->identifier = $this->identifier; + $helper->submit_action = 'submitStoreConf'; + $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( + 'PRODUCTPAYMENTLOGOS_IMG' => Tools::getValue('PRODUCTPAYMENTLOGOS_IMG', Configuration::get('PRODUCTPAYMENTLOGOS_IMG')), + 'PRODUCTPAYMENTLOGOS_LINK' => Tools::getValue('PRODUCTPAYMENTLOGOS_LINK', Configuration::get('PRODUCTPAYMENTLOGOS_LINK')), + 'PRODUCTPAYMENTLOGOS_TITLE' => Tools::getValue('PRODUCTPAYMENTLOGOS_TITLE', Configuration::get('PRODUCTPAYMENTLOGOS_TITLE')), + ); + } +} \ No newline at end of file diff --git a/modules/productpaymentlogos/productpaymentlogos.tpl b/modules/productpaymentlogos/productpaymentlogos.tpl new file mode 100644 index 000000000..2952718e5 --- /dev/null +++ b/modules/productpaymentlogos/productpaymentlogos.tpl @@ -0,0 +1,38 @@ +{* +* 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 !$content_only} + +
+
+
{$banner_title}
+ {$banner_title} +
+{/if} + + + + diff --git a/modules/productpaymentlogos/translations/index.php b/modules/productpaymentlogos/translations/index.php new file mode 100644 index 000000000..3f6561f72 --- /dev/null +++ b/modules/productpaymentlogos/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/themeconfigurator/themeconfigurator.php b/modules/themeconfigurator/themeconfigurator.php index a2531c613..97114461e 100644 --- a/modules/themeconfigurator/themeconfigurator.php +++ b/modules/themeconfigurator/themeconfigurator.php @@ -37,6 +37,7 @@ class ThemeConfigurator extends Module parent::__construct(); $this->displayName = $this->l('Theme configurator'); $this->description = $this->l('Configure elements of your theme'); + $this->bootstrap = true; } @@ -187,6 +188,20 @@ class ThemeConfigurator extends Module 'label' => $this->l('Enable Quick view'), 'name' => 'quick_view', 'value' => (int)Tools::getValue('PS_QUICK_VIEW', Configuration::get('PS_QUICK_VIEW')) + ), + array( + 'label' => $this->l('Enable top banner'), + 'name' => 'blockbanner', + 'desc' => ''.$this->l('Configure').'', + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('blockbanner')) && $module->active), + 'is_module' => true, + ), + array( + 'label' => $this->l('Enable product payment logos'), + 'name' => 'productpaymentlogos', + 'desc' => ''.$this->l('Configure').'', + 'value' => (int)(Validate::isLoadedObject($module = Module::getInstanceByName('productpaymentlogos')) && $module->active), + 'is_module' => true, ) ); } diff --git a/modules/tmhtmlcontent/tmhtmlcontent.php b/modules/tmhtmlcontent/tmhtmlcontent.php index f4af5be56..a71daa12c 100644 --- a/modules/tmhtmlcontent/tmhtmlcontent.php +++ b/modules/tmhtmlcontent/tmhtmlcontent.php @@ -15,6 +15,7 @@ class TmHtmlContent extends Module { $this->author = 'TemplateMonster'; // Defines module author $this->version = '1.0'; // Defines module version $this->secure_key = Tools::encrypt($this->name); + $this->bootstrap = true; $this->_defaultLanguage = Language::getLanguage(Configuration::get('PS_LANG_DEFAULT')); $this->_languages = Language::getLanguages(); diff --git a/modules/tmhtmlcontent/views/css/admin.css b/modules/tmhtmlcontent/views/css/admin.css index c260e6160..f68e3251e 100644 --- a/modules/tmhtmlcontent/views/css/admin.css +++ b/modules/tmhtmlcontent/views/css/admin.css @@ -27,33 +27,13 @@ font-size:16px; color:#090; } -.new-item .languages { - float:left; - overflow:hidden; -} -.new-item .languages li { - float:left; - margin-right:5px; - padding:5px; - width:26px; - height:18px; - text-align:center; -} -.new-item .languages li.active { - background:#d1d1d1; -} - - .lang-tabs { position:relative; z-index:99; - clear:both; - overflow:hidden; - margin-top:20px; } .lang-tabs li { border:1px solid #f3f3f3; - border-bottom:1px solid #e9e9e9; + border-bottom:none; background:#FAFAFA; float:left; padding:15px; @@ -61,6 +41,7 @@ line-height:24px; margin-right:5px; cursor:pointer; + margin-bottom:0; } .lang-tabs li img { vertical-align:baseline; @@ -83,19 +64,22 @@ } -h3.hook-title { +h4.hook-title { border:1px solid #d1d1d1; background:#e5e5e5; padding:10px 10px; + margin:20px 0 !important; text-transform:capitalize; clear:both; } - +#items { + padding-left:0; +} .item { margin:0 0 5px; padding:10px; border:1px solid #e5e5e5; - background:#F1F1F1; + background:#fff; line-height:25px; font-weight:bold; color:#444; @@ -125,15 +109,6 @@ h3.hook-title { padding-left:10px; font-size:18px; } - -.item .button{ - float:right; - margin-left:10px; - cursor:pointer; - font-size:14px; - line-height:18px; - vertical-align: bottom; -} .item .button i{ margin-right:5px; font-size:16px; @@ -175,26 +150,13 @@ h3.hook-title { line-height:normal; position:relative; overflow:hidden; + padding-top:10px; } .new-item .item-container { display:none; - padding:10px; - border:1px solid #ccc; - background:#F1F1F1; - line-height:normal; - position:relative; - overflow:hidden; - clear:both; -} -.item .item-field, .new-item .item-field { - padding:10px 0; - clear:both; - overflow:hidden; } .item .image-display, .new-item .image-display { - position:absolute; - top:20px; - right:20px; + text-align:center; } .item .image-display img, .new-item .image-display img { max-width:400px; diff --git a/modules/tmhtmlcontent/views/js/admin.js b/modules/tmhtmlcontent/views/js/admin.js index de5c2de25..d2f7a8a02 100644 --- a/modules/tmhtmlcontent/views/js/admin.js +++ b/modules/tmhtmlcontent/views/js/admin.js @@ -1,6 +1,6 @@ jQuery(document).ready(function() { $('.button.new-item').click(function() { - var item_container = $(this).parent('.new-item'); + var item_container = $(this).parent().parent('.new-item'); item_container.toggleClass('active').children('.item-container').slideToggle(); }); $('.button-edit').click(function() { diff --git a/modules/tmhtmlcontent/views/templates/admin/items.tpl b/modules/tmhtmlcontent/views/templates/admin/items.tpl index 9f4bbd040..da603ab09 100644 --- a/modules/tmhtmlcontent/views/templates/admin/items.tpl +++ b/modules/tmhtmlcontent/views/templates/admin/items.tpl @@ -1,4 +1,4 @@ -
    +
diff --git a/themes/default-bootstrap/modules/blockspecials/blockspecials.tpl b/themes/default-bootstrap/modules/blockspecials/blockspecials.tpl index 0b01e23d2..5a63f521e 100644 --- a/themes/default-bootstrap/modules/blockspecials/blockspecials.tpl +++ b/themes/default-bootstrap/modules/blockspecials/blockspecials.tpl @@ -51,11 +51,11 @@ -

+

{l s='All specials' mod='blockspecials'} -

+
{else} -

{l s='No specials at this time' mod='blockspecials'}

+
{l s='No specials at this time' mod='blockspecials'}
{/if} diff --git a/themes/default-bootstrap/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl b/themes/default-bootstrap/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl index 471bfec44..cec9cacf7 100644 --- a/themes/default-bootstrap/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl +++ b/themes/default-bootstrap/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl @@ -83,6 +83,6 @@ $('document').ready(function() \ No newline at end of file diff --git a/themes/default-bootstrap/product.tpl b/themes/default-bootstrap/product.tpl index 0a59c37c8..b1e59efe2 100644 --- a/themes/default-bootstrap/product.tpl +++ b/themes/default-bootstrap/product.tpl @@ -493,15 +493,6 @@ var contentOnly = {if $content_only}true{else}false{/if} - - {if !$content_only} -
-
{l s='Your Security Guaranteed'}
- - -
- - {/if} diff --git a/themes/default-bootstrap/sass/global.scss b/themes/default-bootstrap/sass/global.scss index d3cdd5367..791efec70 100644 --- a/themes/default-bootstrap/sass/global.scss +++ b/themes/default-bootstrap/sass/global.scss @@ -240,6 +240,9 @@ input.button_large, input.button_large_disabled, input.exclusive_large, input.ex /*width: 180px; background-image: url('../img/button-large.png')*/ } +.btn.disabled, .btn[disabled]:hover { + opacity:0.3; +} .button.button-small { font:bold 13px/17px $font-famaly; color:$button-text-color; @@ -824,8 +827,20 @@ table.table_block td { margin-bottom:34px; } } -.block {margin-bottom:30px} -.block { +.block { + margin-bottom:30px; + @media (max-width: $screen-xs-max) { // max 767px + margin-bottom:0px; + } + .block_content { + @media (max-width: $screen-xs-max) { // max 767px + margin-bottom:20px; + } + } + +} +.block { + .title_block, h4 { font:600 18px/22px $font-custom; @@ -837,7 +852,27 @@ table.table_block td { margin-bottom:20px; @media (min-width: $screen-sm) and (max-width: $screen-sm-max) { font-size:14px; - } + } + // heading style for devices smaller that 767px width + @media (max-width: $screen-xs-max) { // max 767px + position:relative; + + &:after { + display:block; + font-family:$font-icon; + content:""; + position:absolute; + right:0; + top:15px; + height:36px; + width:36px; + font-size:26px; + font-weight:normal; + } + &.active:after { + content:""; + } + } a { color:$base-heading-color; @@ -860,6 +895,9 @@ table.table_block td { } .list-block { margin-top:-8px; + @media (max-width: $screen-xs-max) { // max 767px + margin-top:0; + } li { padding:5px 0 6px 20px; @@ -888,9 +926,13 @@ table.table_block td { .form-group { padding-top:20px; border-top:1px solid $base-border-color; + margin-bottom:0; select { - max-width:270px; + max-width:270px; + @media (max-width: $screen-xs-max) { // max 767px + width:270px; + } } } @@ -1858,7 +1900,10 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px } color:#777; position:relative; .footer-block { - margin-top:45px; + margin-top:45px; + @media (max-width: $screen-xs-max) { // max 767px + margin-top:20px; + } } a { @@ -1873,6 +1918,23 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px } font:600 18px/22px $font-custom; color:$light-text-color; margin:0 0 13px 0; + @media (max-width: $screen-xs-max) { // max 767px + position:relative; + margin-bottom:0; + padding-bottom:13px; + + &:after { + display:block; + content:""; + font-family:$font-icon; + position:absolute; + right:0; + top:1px; + } + &.active:after { + content:""; + } + } a {color:$light-text-color;} } @@ -2946,7 +3008,7 @@ div.star_hover a, div.star a:hover { background-position: 0 -13px } input, textarea { border:1px solid #46a74e; color:#35b33f; - background: url(../img/icon/form-ok.png) 98% 5px no-repeat #87f590; + background: url(../img/icon/form-ok.png) 98% 5px no-repeat #ddf9e1; } } &.form-error, &.form-ok { diff --git a/themes/default-bootstrap/sass/modules/blockcontact/blockcontact.scss b/themes/default-bootstrap/sass/modules/blockcontact/blockcontact.scss index 6c4b4284e..ffa3d05de 100644 --- a/themes/default-bootstrap/sass/modules/blockcontact/blockcontact.scss +++ b/themes/default-bootstrap/sass/modules/blockcontact/blockcontact.scss @@ -1,7 +1,9 @@ @import '../../_theme_variables'; /* block CONTACT ******************************************************************************* */ #contact_block { - + @media (max-width: $screen-xs-max) { // max 767px + margin-bottom:20px; + } .label {display: none} .block_content { diff --git a/themes/default-bootstrap/sass/modules/blocknewsletter/blocknewsletter.scss b/themes/default-bootstrap/sass/modules/blocknewsletter/blocknewsletter.scss index d3664ce0c..a6257c622 100644 --- a/themes/default-bootstrap/sass/modules/blocknewsletter/blocknewsletter.scss +++ b/themes/default-bootstrap/sass/modules/blocknewsletter/blocknewsletter.scss @@ -52,6 +52,7 @@ font-size:21px; line-height:25px; border:none; + &:after {display:none;} } .block_content { diff --git a/themes/default-bootstrap/sass/modules/blockwishlist/blockwishlist.scss b/themes/default-bootstrap/sass/modules/blockwishlist/blockwishlist.scss index 5c665959f..18a423054 100644 --- a/themes/default-bootstrap/sass/modules/blockwishlist/blockwishlist.scss +++ b/themes/default-bootstrap/sass/modules/blockwishlist/blockwishlist.scss @@ -77,7 +77,10 @@ margin-bottom:20px; select { - max-width:192px; + max-width:192px; + @media (max-width: $screen-xs-max) { // max 767px + width:192px; + } } } }