+{if isset($htmlitems) && $htmlitems}
+
- {foreach name=items from=$htmlitems.items item=hItem}
+ {foreach name=items from=$htmlitems item=hItem}
-
{if $hItem.url}
diff --git a/modules/themeconfigurator/views/templates/index.php b/modules/themeconfigurator/views/templates/index.php
index 54b3024eb..198b35f62 100644
--- a/modules/themeconfigurator/views/templates/index.php
+++ b/modules/themeconfigurator/views/templates/index.php
@@ -1,36 +1,10 @@
-* @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: ../");
-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/tmhtmlcontent/config.xml b/modules/tmhtmlcontent/config.xml
deleted file mode 100644
index e888346f6..000000000
--- a/modules/tmhtmlcontent/config.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- tmhtmlcontent
-
-
-
-
-
- 1
- 1
-
-
\ No newline at end of file
diff --git a/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg b/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg
deleted file mode 100644
index 368ac88e8..000000000
Binary files a/modules/tmhtmlcontent/images/4124625121355c962edd8c86ef14f3ee.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg b/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg
deleted file mode 100644
index 2a114607c..000000000
Binary files a/modules/tmhtmlcontent/images/471dd22ba78685f12e457c16c9e3a005.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg b/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg
deleted file mode 100644
index adaf02324..000000000
Binary files a/modules/tmhtmlcontent/images/4f15eb95ccf54ffc141222224b86b2ac.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg b/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg
deleted file mode 100644
index 428a289c1..000000000
Binary files a/modules/tmhtmlcontent/images/67d43d531b80880be4bf34fa50c3c2d5.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg b/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg
deleted file mode 100644
index 3a3cfcde6..000000000
Binary files a/modules/tmhtmlcontent/images/73c2f0d3133082d7d2879648d7b72e8d.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg b/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg
deleted file mode 100644
index 45256d5b0..000000000
Binary files a/modules/tmhtmlcontent/images/86a740c6973b2c0fdd9211583fb51dc3.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg b/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg
deleted file mode 100644
index d0c7fa27d..000000000
Binary files a/modules/tmhtmlcontent/images/eb27ba8719f4206d861d8ce84dad7891.jpg and /dev/null differ
diff --git a/modules/tmhtmlcontent/index.php b/modules/tmhtmlcontent/index.php
deleted file mode 100644
index 803f6c658..000000000
--- a/modules/tmhtmlcontent/index.php
+++ /dev/null
@@ -1,8 +0,0 @@
-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->bootstrap = true;
-
- $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/views/js/index.php b/modules/tmhtmlcontent/views/js/index.php
deleted file mode 100644
index 198b35f62..000000000
--- a/modules/tmhtmlcontent/views/js/index.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-{/if}
diff --git a/modules/tmhtmlcontent/views/templates/hooks/left.tpl b/modules/tmhtmlcontent/views/templates/hooks/left.tpl
deleted file mode 100644
index afc5afbb6..000000000
--- a/modules/tmhtmlcontent/views/templates/hooks/left.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-{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
deleted file mode 100644
index 6fe8b6c57..000000000
--- a/modules/tmhtmlcontent/views/templates/hooks/right.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-{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
deleted file mode 100644
index e9f9f958c..000000000
--- a/modules/tmhtmlcontent/views/templates/hooks/top.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-{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
deleted file mode 100644
index 198b35f62..000000000
--- a/modules/tmhtmlcontent/views/templates/index.php
+++ /dev/null
@@ -1,10 +0,0 @@
- li {
float: left;
border-right: 1px solid #d6d4d4;
margin-bottom: -3px;
}
+@media (max-width: 767px) {
+ .sf-menu > li {
+ float: none;
+ position: relative;
+ border-right: none;
+ }
+ .sf-menu > li span {
+ position: absolute;
+ right: 6px;
+ top: 20px;
+ display: none;
+ width: 30px;
+ height: 30px;
+ z-index: 2;
+ }
+ .sf-menu > li span:after {
+ font-family: "FontAwesome";
+ content: "";
+ font-size: 26px;
+ }
+}
.sf-menu > li > a {
font: 600 18px/22px "Open Sans", sans-serif;
text-transform: uppercase;
@@ -62,14 +90,25 @@
padding: 17px 20px;
border-bottom: 3px solid #e9e9e9;
}
+@media (max-width: 767px) {
+ .sf-menu > li > a.sf-with-ul:after {
+ position: absolute;
+ right: 15px;
+ top: 18px;
+ font-family: "FontAwesome";
+ content: "";
+ font-size: 26px;
+ z-index: 1;
+ }
+}
.sf-menu > li.sfHover > a, .sf-menu > li > a:hover, .sf-menu > li.sfHoverForce > a {
background: #333333;
border-bottom-color: #666666;
color: white;
}
-.sf-menu li li a {
- display: block;
+.sf-menu li li li a {
+ display: inline-block;
position: relative;
color: #777777;
font-size: 13px;
@@ -77,13 +116,13 @@
font-weight: bold;
padding-bottom: 10px;
}
-.sf-menu li li a:before {
+.sf-menu li li li a:before {
content: "";
display: inline-block;
font-family: "FontAwesome";
padding-right: 10px;
}
-.sf-menu li li a:hover {
+.sf-menu li li li a:hover {
color: #333333;
}
@@ -93,12 +132,34 @@
top: 59px;
/* match top ul list item height */
z-index: 99;
- width: 220px;
- padding: 25px 30px;
+ padding: 12px 0px 18px 0px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 13px;
}
+@media (max-width: 767px) {
+ .sf-menu li ul {
+ top: 0;
+ }
+}
+
+.sf-menu li li ul {
+ position: static;
+ display: block !important;
+ opacity: 1 !important;
+ background: none;
+ -webkit-box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px;
+ -moz-box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px;
+ box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px;
+}
+
+.sf-menu li li li ul {
+ padding: 0 0 0 20px;
+}
+
+.sf-menu li li li ul {
+ width: 220px;
+}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
@@ -123,3 +184,113 @@ ul.sf-menu li li li.sfHover ul {
/* match ul width */
top: 0;
}
+
+.sf-menu > li > ul {
+ padding: 26px 30px 31px;
+ width: 100%;
+}
+.sf-menu > li > ul > li > a {
+ text-transform: uppercase;
+ font: 600 16px/20px "Open Sans", sans-serif;
+ color: #333333;
+}
+.sf-menu > li > ul > li > a:hover {
+ color: #515151;
+}
+
+.sf-menu > li > ul > li:not(#category-thumbnail) {
+ float: left;
+ width: 20%;
+ padding-right: 15px;
+}
+@media (max-width: 767px) {
+ .sf-menu > li > ul > li:not(#category-thumbnail) {
+ width: 50%;
+ }
+}
+@media (max-width: 479px) {
+ .sf-menu > li > ul > li:not(#category-thumbnail) {
+ width: 100%;
+ }
+}
+@media (min-width: 768px) {
+ .sf-menu > li > ul > li:not(#category-thumbnail).first-in-line-lg {
+ clear: left;
+ }
+}
+@media (min-width: 480px) and (max-width: 767px) {
+ .sf-menu > li > ul > li:not(#category-thumbnail).first-in-line-xs {
+ clear: left;
+ }
+}
+
+.sf-menu > li > ul > li#category-thumbnail {
+ width: 100%;
+ clear: both;
+ overflow: hidden;
+}
+.sf-menu > li > ul > li#category-thumbnail > div {
+ float: left;
+ padding-left: 10px;
+ width: 33.333%;
+}
+@media (max-width: 479px) {
+ .sf-menu > li > ul > li#category-thumbnail > div {
+ width: 100%;
+ padding-left: 0;
+ padding-top: 10px;
+ text-align: center;
+ }
+}
+.sf-menu > li > ul > li#category-thumbnail > div:first-child {
+ padding-left: 0;
+}
+.sf-menu > li > ul > li#category-thumbnail > div img {
+ max-width: 100%;
+ width: 100%;
+ display: block;
+}
+
+.cat-title {
+ display: none;
+}
+@media (max-width: 767px) {
+ .cat-title {
+ display: block;
+ font: 600 18px/22px "Open Sans", sans-serif;
+ text-transform: uppercase;
+ color: #484848;
+ display: block;
+ padding: 17px 20px;
+ border-bottom: 3px solid #e9e9e9;
+ background: #f6f6f6;
+ position: relative;
+ }
+ .cat-title:hover {
+ background: #333333;
+ border-bottom-color: #666666;
+ color: white;
+ }
+ .cat-title:after {
+ display: block;
+ font-family: "FontAwesome";
+ content: "";
+ position: absolute;
+ right: 15px;
+ top: 18px;
+ font-size: 26px;
+ }
+ .cat-title.active:after {
+ content: "";
+ }
+}
+
+@media (max-width: 767px) {
+ .sf-menu > li.sfHover > a.sf-with-ul:after, .sf-menu > li.sfHoverForce > a.sf-with-ul:after {
+ display: none;
+ }
+
+ .sf-menu > li.sfHover > span, .sf-menu > li.sfHoverForce > span {
+ display: block;
+ }
+}
diff --git a/themes/default-bootstrap/js/jquery/resonsive_utilites.js b/themes/default-bootstrap/js/jquery/resonsive_utilites.js
index 87b3ab5d7..46b7b1b53 100644
--- a/themes/default-bootstrap/js/jquery/resonsive_utilites.js
+++ b/themes/default-bootstrap/js/jquery/resonsive_utilites.js
@@ -78,7 +78,7 @@ function accordion(status){
}
-function resposiveResize(){
+function responsiveResize(){
if ($(document).width() <= 767 && responsiveflag == false){
accordion('enable'),
accordionFooter('enable'),
@@ -91,8 +91,8 @@ function resposiveResize(){
}
}
-$(document).ready(resposiveResize);
-$(window).resize(resposiveResize);
+$(document).ready(responsiveResize);
+$(window).resize(responsiveResize);
//replace top banner to top of page, before #header
$(document).ready(function(){
diff --git a/themes/default-bootstrap/js/modules/blocktopmenu/js/hoverIntent.js b/themes/default-bootstrap/js/modules/blocktopmenu/js/hoverIntent.js
index 91da57b24..cbe3ae715 100644
--- a/themes/default-bootstrap/js/modules/blocktopmenu/js/hoverIntent.js
+++ b/themes/default-bootstrap/js/modules/blocktopmenu/js/hoverIntent.js
@@ -1,84 +1,114 @@
-(function($){
- /* hoverIntent by Brian Cherne */
- $.fn.hoverIntent = function(f,g) {
- // default configuration options
- var cfg = {
- sensitivity: 7,
- interval: 100,
- timeout: 0
- };
- // override configuration options with user supplied object
- cfg = $.extend(cfg, g ? { over: f, out: g } : f );
+/**
+ * hoverIntent is similar to jQuery's built-in "hover" method except that
+ * instead of firing the handlerIn function immediately, hoverIntent checks
+ * to see if the user's mouse has slowed down (beneath the sensitivity
+ * threshold) before firing the event. The handlerOut function is only
+ * called after a matching handlerIn.
+ *
+ * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
+ * http://cherne.net/brian/resources/jquery.hoverIntent.html
+ *
+ * You may use hoverIntent under the terms of the MIT license. Basically that
+ * means you are free to use hoverIntent as long as this header is left intact.
+ * Copyright 2007, 2013 Brian Cherne
+ *
+ * // basic usage ... just like .hover()
+ * .hoverIntent( handlerIn, handlerOut )
+ * .hoverIntent( handlerInOut )
+ *
+ * // basic usage ... with event delegation!
+ * .hoverIntent( handlerIn, handlerOut, selector )
+ * .hoverIntent( handlerInOut, selector )
+ *
+ * // using a basic configuration object
+ * .hoverIntent( config )
+ *
+ * @param handlerIn function OR configuration object
+ * @param handlerOut function OR selector for delegation OR undefined
+ * @param selector selector OR undefined
+ * @author Brian Cherne
+ **/
+(function($) {
+ $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
- // instantiate variables
- // cX, cY = current X and Y position of mouse, updated by mousemove event
- // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
- var cX, cY, pX, pY;
+ // default configuration values
+ var cfg = {
+ interval: 100,
+ sensitivity: 7,
+ timeout: 0
+ };
- // A private function for getting mouse position
- var track = function(ev) {
- cX = ev.pageX;
- cY = ev.pageY;
- };
+ if ( typeof handlerIn === "object" ) {
+ cfg = $.extend(cfg, handlerIn );
+ } else if ($.isFunction(handlerOut)) {
+ cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
+ } else {
+ cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
+ }
- // A private function for comparing current and previous mouse position
- var compare = function(ev,ob) {
- ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
- // compare mouse positions to see if they've crossed the threshold
- if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
- $(ob).unbind("mousemove",track);
- // set hoverIntent state to true (so mouseOut can be called)
- ob.hoverIntent_s = 1;
- return cfg.over.apply(ob,[ev]);
- } else {
- // set previous coordinates for next time
- pX = cX; pY = cY;
- // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
- ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
- }
- };
+ // instantiate variables
+ // cX, cY = current X and Y position of mouse, updated by mousemove event
+ // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
+ var cX, cY, pX, pY;
- // A private function for delaying the mouseOut function
- var delay = function(ev,ob) {
- ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
- ob.hoverIntent_s = 0;
- return cfg.out.apply(ob,[ev]);
- };
+ // A private function for getting mouse position
+ var track = function(ev) {
+ cX = ev.pageX;
+ cY = ev.pageY;
+ };
- // A private function for handling mouse 'hovering'
- var handleHover = function(e) {
- // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
- var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
- while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
- if ( p == this ) { return false; }
+ // A private function for comparing current and previous mouse position
+ var compare = function(ev,ob) {
+ ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
+ // compare mouse positions to see if they've crossed the threshold
+ if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
+ $(ob).off("mousemove.hoverIntent",track);
+ // set hoverIntent state to true (so mouseOut can be called)
+ ob.hoverIntent_s = 1;
+ return cfg.over.apply(ob,[ev]);
+ } else {
+ // set previous coordinates for next time
+ pX = cX; pY = cY;
+ // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
+ ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
+ }
+ };
- // copy objects to be passed into t (required for event object to be passed in IE)
- var ev = jQuery.extend({},e);
- var ob = this;
+ // A private function for delaying the mouseOut function
+ var delay = function(ev,ob) {
+ ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
+ ob.hoverIntent_s = 0;
+ return cfg.out.apply(ob,[ev]);
+ };
- // cancel hoverIntent timer if it exists
- if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
+ // A private function for handling mouse 'hovering'
+ var handleHover = function(e) {
+ // copy objects to be passed into t (required for event object to be passed in IE)
+ var ev = jQuery.extend({},e);
+ var ob = this;
- // else e.type == "onmouseover"
- if (e.type == "mouseover") {
- // set "previous" X and Y position based on initial entry point
- pX = ev.pageX; pY = ev.pageY;
- // update "current" X and Y position based on mousemove
- $(ob).bind("mousemove",track);
- // start polling interval (self-calling timeout) to compare mouse coordinates over time
- if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
+ // cancel hoverIntent timer if it exists
+ if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
- // else e.type == "onmouseout"
- } else {
- // unbind expensive mousemove event
- $(ob).unbind("mousemove",track);
- // if hoverIntent state is true, then call the mouseOut function after the specified delay
- if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
- }
- };
+ // if e.type == "mouseenter"
+ if (e.type == "mouseenter") {
+ // set "previous" X and Y position based on initial entry point
+ pX = ev.pageX; pY = ev.pageY;
+ // update "current" X and Y position based on mousemove
+ $(ob).on("mousemove.hoverIntent",track);
+ // start polling interval (self-calling timeout) to compare mouse coordinates over time
+ if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
- // bind the function to the two event listeners
- return this.mouseover(handleHover).mouseout(handleHover);
- };
-
+ // else e.type == "mouseleave"
+ } else {
+ // unbind expensive mousemove event
+ $(ob).off("mousemove.hoverIntent",track);
+ // if hoverIntent state is true, then call the mouseOut function after the specified delay
+ if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
+ }
+ };
+
+ // listen for mouseenter and mouseleave
+ return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
+ };
})(jQuery);
\ No newline at end of file
diff --git a/themes/default-bootstrap/js/modules/blocktopmenu/js/superfish-modified.js b/themes/default-bootstrap/js/modules/blocktopmenu/js/superfish-modified.js
index d0dfb5090..03b614702 100644
--- a/themes/default-bootstrap/js/modules/blocktopmenu/js/superfish-modified.js
+++ b/themes/default-bootstrap/js/modules/blocktopmenu/js/superfish-modified.js
@@ -1,124 +1,257 @@
-
/*
- * Superfish v1.4.8 - jQuery menu widget
- * Copyright (c) 2008 Joel Birch
+ * jQuery Superfish Menu Plugin - v1.7.4
+ * Copyright (c) 2013 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
*/
-;(function($){
- $.fn.superfish = function(op){
+;(function ($) {
+ "use strict";
- var sf = $.fn.superfish,
- c = sf.c,
- $arrow = $([' »'].join('')),
- over = function(){
- var $$ = $(this), menu = getMenu($$);
- clearTimeout(menu.sfTimer);
- $$.showSuperfishUl().siblings().hideSuperfishUl();
+ var methods = (function () {
+ // private properties and methods go here
+ var c = {
+ bcClass: 'sf-breadcrumb',
+ menuClass: 'sf-js-enabled',
+ anchorClass: 'sf-with-ul',
+ menuArrowClass: 'sf-arrows'
},
- out = function(){
- var $$ = $(this), menu = getMenu($$), o = sf.op;
- clearTimeout(menu.sfTimer);
- menu.sfTimer=setTimeout(function(){
- o.retainPath=($.inArray($$[0],o.$path)>-1);
- $$.hideSuperfishUl();
- if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
- },o.delay);
+ ios = (function () {
+ var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent);
+ if (ios) {
+ // iOS clicks only bubble as far as body children
+ $(window).load(function () {
+ $('body').children().on('click', $.noop);
+ });
+ }
+ return ios;
+ })(),
+ wp7 = (function () {
+ var style = document.documentElement.style;
+ return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent));
+ })(),
+ toggleMenuClasses = function ($menu, o) {
+ var classes = c.menuClass;
+ if (o.cssArrows) {
+ classes += ' ' + c.menuArrowClass;
+ }
+ $menu.toggleClass(classes);
},
- getMenu = function($menu){
- var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
- sf.op = sf.o[menu.serial];
- return menu;
+ setPathToCurrent = function ($menu, o) {
+ return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels)
+ .addClass(o.hoverClass + ' ' + c.bcClass)
+ .filter(function () {
+ return ($(this).children(o.popUpSelector).hide().show().length);
+ }).removeClass(o.pathClass);
},
- addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
-
- return this.each(function() {
- var s = this.serial = sf.o.length;
- var o = $.extend({},sf.defaults,op);
- o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
- $(this).addClass([o.hoverClass,c.bcClass].join(' '))
- .filter('li:has(ul)').removeClass(o.pathClass);
- });
- sf.o[s] = sf.op = o;
-
- $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
- if (o.autoArrows) addArrow( $('>a:first-child',this) );
- })
- .not('.'+c.bcClass)
- .hideSuperfishUl();
-
- var $a = $('a',this);
- $a.each(function(i){
- var $li = $a.eq(i).parents('li');
- $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
- });
- o.onInit.call(this);
-
- }).each(function() {
- menuClasses = [c.menuClass];
- if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
- $(this).addClass(menuClasses.join(' '));
- });
- };
+ toggleAnchorClass = function ($li) {
+ $li.children('a').toggleClass(c.anchorClass);
+ },
+ toggleTouchAction = function ($menu) {
+ var touchAction = $menu.css('ms-touch-action');
+ touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y';
+ $menu.css('ms-touch-action', touchAction);
+ },
+ applyHandlers = function ($menu, o) {
+ var targets = 'li:has(' + o.popUpSelector + ')';
+ if ($.fn.hoverIntent && !o.disableHI) {
+ $menu.hoverIntent(over, out, targets);
+ }
+ else {
+ $menu
+ .on('mouseenter.superfish', targets, over)
+ .on('mouseleave.superfish', targets, out);
+ }
+ var touchevent = 'MSPointerDown.superfish';
+ if (!ios) {
+ touchevent += ' touchend.superfish';
+ }
+ if (wp7) {
+ touchevent += ' mousedown.superfish';
+ }
+ $menu
+ .on('focusin.superfish', 'li', over)
+ .on('focusout.superfish', 'li', out)
+ .on(touchevent, 'a', o, touchHandler);
+ },
+ touchHandler = function (e) {
+ var $this = $(this),
+ $ul = $this.siblings(e.data.popUpSelector);
- var sf = $.fn.superfish;
- sf.o = [];
- sf.op = {};
- sf.IE7fix = function(){
- var o = sf.op;
- if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
- this.toggleClass(sf.c.shadowClass+'-off');
+ if ($ul.length > 0 && $ul.is(':hidden')) {
+ $this.one('click.superfish', false);
+ if (e.type === 'MSPointerDown') {
+ $this.trigger('focus');
+ } else {
+ $.proxy(over, $this.parent('li'))();
+ }
+ }
+ },
+ over = function () {
+ var $this = $(this),
+ o = getOptions($this);
+ clearTimeout(o.sfTimer);
+ $this.siblings().superfish('hide').end().superfish('show');
+ },
+ out = function () {
+ var $this = $(this),
+ o = getOptions($this);
+ if (ios) {
+ $.proxy(close, $this, o)();
+ }
+ else {
+ clearTimeout(o.sfTimer);
+ o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay);
+ }
+ },
+ close = function (o) {
+ o.retainPath = ($.inArray(this[0], o.$path) > -1);
+ this.superfish('hide');
+
+ if (!this.parents('.' + o.hoverClass).length) {
+ o.onIdle.call(getMenu(this));
+ if (o.$path.length) {
+ $.proxy(over, o.$path)();
+ }
+ }
+ },
+ getMenu = function ($el) {
+ return $el.closest('.' + c.menuClass);
+ },
+ getOptions = function ($el) {
+ return getMenu($el).data('sf-options');
+ };
+
+ return {
+ // public methods
+ hide: function (instant) {
+ if (this.length) {
+ var $this = this,
+ o = getOptions($this);
+ if (!o) {
+ return this;
+ }
+ var not = (o.retainPath === true) ? o.$path : '',
+ $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),
+ speed = o.speedOut;
+
+ if (instant) {
+ $ul.show();
+ speed = 0;
+ }
+ o.retainPath = false;
+ o.onBeforeHide.call($ul);
+ $ul.stop(true, true).animate(o.animationOut, speed, function () {
+ var $this = $(this);
+ o.onHide.call($this);
+ });
+ }
+ return this;
+ },
+ show: function () {
+ var o = getOptions(this);
+ if (!o) {
+ return this;
+ }
+ var $this = this.addClass(o.hoverClass),
+ $ul = $this.children(o.popUpSelector);
+
+ o.onBeforeShow.call($ul);
+ $ul.stop(true, true).animate(o.animation, o.speed, function () {
+ o.onShow.call($ul);
+ });
+ return this;
+ },
+ destroy: function () {
+ return this.each(function () {
+ var $this = $(this),
+ o = $this.data('sf-options'),
+ $hasPopUp;
+ if (!o) {
+ return false;
+ }
+ $hasPopUp = $this.find(o.popUpSelector).parent('li');
+ clearTimeout(o.sfTimer);
+ toggleMenuClasses($this, o);
+ toggleAnchorClass($hasPopUp);
+ toggleTouchAction($this);
+ // remove event handlers
+ $this.off('.superfish').off('.hoverIntent');
+ // clear animation's inline display style
+ $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) {
+ return style.replace(/display[^;]+;?/g, '');
+ });
+ // reset 'current' path classes
+ o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass);
+ $this.find('.' + o.hoverClass).removeClass(o.hoverClass);
+ o.onDestroy.call($this);
+ $this.removeData('sf-options');
+ });
+ },
+ init: function (op) {
+ return this.each(function () {
+ var $this = $(this);
+ if ($this.data('sf-options')) {
+ return false;
+ }
+ var o = $.extend({}, $.fn.superfish.defaults, op),
+ $hasPopUp = $this.find(o.popUpSelector).parent('li');
+ o.$path = setPathToCurrent($this, o);
+
+ $this.data('sf-options', o);
+
+ toggleMenuClasses($this, o);
+ toggleAnchorClass($hasPopUp);
+ toggleTouchAction($this);
+ applyHandlers($this, o);
+
+ $hasPopUp.not('.' + c.bcClass).superfish('hide', true);
+
+ o.onInit.call(this);
+ });
+ }
};
- sf.c = {
- bcClass : 'sf-breadcrumb',
- menuClass : 'sf-js-enabled',
- anchorClass : 'sf-with-ul',
- arrowClass : 'sf-sub-indicator',
- shadowClass : 'sf-shadow'
- };
- sf.defaults = {
- hoverClass : 'sfHover',
- pathClass : 'overideThisToUse',
- pathLevels : 1,
- delay : 800,
- animation : {opacity:'show'},
- speed : 'fast',
- autoArrows : false,
- dropShadows : false,
- disableHI : false, // true disables hoverIntent detection
- onInit : function(){}, // callback functions
- onBeforeShow: function(){},
- onShow : function(){},
- onHide : function(){}
- };
- $.fn.extend({
- hideSuperfishUl : function(){
- var o = sf.op,
- not = (o.retainPath===true) ? o.$path : '';
- o.retainPath = false;
- var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
- .find('>ul').hide().css('visibility','hidden');
- o.onHide.call($ul);
- return this;
- },
- showSuperfishUl : function(){
- var o = sf.op,
- sh = sf.c.shadowClass+'-off',
- $ul = this.addClass(o.hoverClass)
- .find('>ul:hidden').css('visibility','visible');
- sf.IE7fix.call($ul);
- o.onBeforeShow.call($ul);
- $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
- return this;
+ })();
+
+ $.fn.superfish = function (method, args) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
+ else if (typeof method === 'object' || ! method) {
+ return methods.init.apply(this, arguments);
+ }
+ else {
+ return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish');
+ }
+ };
+
+ $.fn.superfish.defaults = {
+ popUpSelector: 'ul,.sf-mega', // within menu context
+ hoverClass: 'sfHover',
+ pathClass: 'overrideThisToUse',
+ pathLevels: 1,
+ delay: 800,
+ animation: {opacity: 'show'},
+ animationOut: {opacity: 'hide'},
+ speed: 'normal',
+ speedOut: 'fast',
+ cssArrows: true,
+ disableHI: false,
+ onInit: $.noop,
+ onBeforeShow: $.noop,
+ onShow: $.noop,
+ onBeforeHide: $.noop,
+ onHide: $.noop,
+ onIdle: $.noop,
+ onDestroy: $.noop
+ };
+
+ // soon to be deprecated
+ $.fn.extend({
+ hideSuperfishUl: methods.hide,
+ showSuperfishUl: methods.show
});
-})(jQuery);
-jQuery(function(){
- jQuery('ul.sf-menu').superfish();
-});
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl b/themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl
index a2914e0df..2257fe616 100644
--- a/themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl
+++ b/themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl
@@ -2,7 +2,8 @@
-
-{/if}
\ No newline at end of file
+ {literal}
+
+ {/literal}
+{/if}
diff --git a/themes/default-bootstrap/sass/modules/blocktopmenu/css/superfish-modified.scss b/themes/default-bootstrap/sass/modules/blocktopmenu/css/superfish-modified.scss
index a3f7c34a7..c38417b6a 100644
--- a/themes/default-bootstrap/sass/modules/blocktopmenu/css/superfish-modified.scss
+++ b/themes/default-bootstrap/sass/modules/blocktopmenu/css/superfish-modified.scss
@@ -2,6 +2,15 @@
/*** ESSENTIAL STYLES ***/
.sf-contener {
clear:both;
+ float:left;
+ width:100%;
+ margin: 50px 0 0;
+ @media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
+ margin-top:80px;
+ }
+ @media (max-width: $screen-xs - 1) { // max 479px
+ margin-top:70px;
+ }
}
.sf-right {
}
@@ -11,23 +20,22 @@
list-style: none;
}
.sf-menu {
- margin: 50px 0 0;
+ position: relative;
padding: 0;
width: 100%;
border-bottom: 3px solid #e9e9e9;
background: #f6f6f6;
- @media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
- margin-top:80px;
- }
- @media (max-width: $screen-xs - 1) { // max 479px
- margin-top:70px;
+ @media (max-width: $screen-xs-max) { // max 767px
+ display:none;
}
}
.sf-menu ul {
position: absolute;
top: -999em;
- width: 10em; /* left offset of submenus need to match (see below) */
background: $light-background;
+ @media (max-width: $screen-xs-max) { // max 767px
+ position:relative;
+ }
}
.sf-menu ul li {
width: 100%;
@@ -35,14 +43,31 @@
.sf-menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
-.sf-menu li {
- position: relative;
-}
.sf-menu > li {
float: left;
border-right: 1px solid $base-border-color;
margin-bottom: -3px;
-
+ @media (max-width: $screen-xs-max) { // max 767px
+ float:none;
+ position:relative;
+ border-right:none;
+
+ span {
+ position:absolute;
+ right:6px;
+ top:20px;
+ display:none;
+ width:30px;
+ height:30px;
+ z-index:2;
+
+ &:after {
+ font-family:$font-icon;
+ content:"";
+ font-size:26px;
+ }
+ }
+ }
> a {
font: 600 18px/22px $font-custom;
text-transform: uppercase;
@@ -50,6 +75,19 @@
display: block;
padding: 17px 20px;
border-bottom: 3px solid #e9e9e9;
+ @media (max-width: $screen-xs-max) { // max 767px
+ &.sf-with-ul {
+ &:after {
+ position:absolute;
+ right:15px;
+ top:18px;
+ font-family:$font-icon;
+ content:"";
+ font-size:26px;
+ z-index:1;
+ }
+ }
+ }
}
&.sfHover > a, > a:hover, &.sfHoverForce > a {
@@ -58,8 +96,8 @@
color: $light-text-color;
}
}
-.sf-menu li li a {
- display: block;
+.sf-menu li li li a {
+ display: inline-block;
position: relative;
color: #777777;
font-size: 13px;
@@ -83,9 +121,24 @@
left: 0;
top: 59px; /* match top ul list item height */
z-index: 99;
- width: 220px;
- padding: 25px 30px;
+ padding: 12px 0px 18px 0px;
@include box-shadow(rgba(black, 0.20) 0px 5px 13px);
+ @media (max-width: $screen-xs-max) { // max 767px
+ top:0;
+ }
+}
+.sf-menu li li ul {
+ position:static;
+ display:block !important;
+ opacity:1 !important;
+ background:none;
+ @include box-shadow(rgba(black, 0) 0px 0px 0px);
+}
+.sf-menu li li li ul {
+ padding:0 0 0 20px;
+}
+.sf-menu li li li ul {
+ width: 220px;
}
ul.sf-menu li:hover li ul,
ul.sf-menu li.sfHover li ul {
@@ -105,3 +158,100 @@ ul.sf-menu li li li.sfHover ul {
left: 200px; /* match ul width */
top: 0;
}
+.sf-menu > li > ul {
+ padding:26px 30px 31px;
+ width:100%;
+
+ > li {
+ > a {
+ text-transform:uppercase;
+ font:600 16px/20px $font-custom;
+ color:$base-text-color;
+
+ &:hover {
+ color:$link-hover-color;
+ }
+ }
+ }
+}
+.sf-menu > li > ul > li:not(#category-thumbnail) {
+ float:left;
+ width:20%;
+ padding-right:15px;
+ @media (max-width: $screen-xs-max) { // max 767px
+ width:50%;
+ }
+ @media (max-width: $screen-xs - 1) { // max 479px
+ width:100%;
+ }
+ @media (min-width: $screen-sm) { // min 768px
+ &.first-in-line-lg {clear:left;}
+ }
+ @media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
+ &.first-in-line-xs {clear:left;}
+ }
+}
+.sf-menu > li > ul > li#category-thumbnail {
+ width:100%;
+ clear:both;
+ overflow:hidden;
+
+ > div {
+ float:left;
+ padding-left:10px;
+ width:33.333%;
+ @media (max-width: $screen-xs - 1) { // max 479px
+ width:100%;
+ padding-left:0;
+ padding-top:10px;
+ text-align:center;
+ }
+
+ &:first-child {padding-left:0;}
+ img {
+ max-width:100%;
+ width:100%;
+ display:block;
+ }
+ }
+}
+.cat-title {
+ display:none;
+ @media (max-width: $screen-xs-max) { // max 767px
+ display: block;
+ font: 600 18px/22px $font-custom;
+ text-transform: uppercase;
+ color: #484848;
+ display: block;
+ padding: 17px 20px;
+ border-bottom: 3px solid #e9e9e9;
+ background: #f6f6f6;
+ position:relative;
+
+ &:hover {
+ background: $dark-background;
+ border-bottom-color: #666666;
+ color: $light-text-color;
+ }
+ &:after {
+ display:block;
+ font-family:$font-icon;
+ content:"";
+ position:absolute;
+ right:15px;
+ top:18px;
+ font-size:26px;
+ }
+ &.active:after{
+ content:"";
+ }
+ }
+}
+@media (max-width: $screen-xs-max) { // max 767px
+.sf-menu > li.sfHover > a.sf-with-ul:after, .sf-menu > li.sfHoverForce > a.sf-with-ul:after {
+ display:none;
+}
+.sf-menu > li.sfHover > span, .sf-menu > li.sfHoverForce > span {
+ display:block;
+}
+}
\ No newline at end of file