git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11066 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
sThiebaut
2011-12-08 17:07:55 +00:00
parent e9ee2e68ca
commit 085f64c85f
10 changed files with 36 additions and 17 deletions
@@ -31,6 +31,7 @@
#best-sellers_block_right li p {
float:left;
margin-left:7px;
padding:0;
width:125px;
font-weight:bold;
font-size:12px
+15 -5
View File
@@ -167,10 +167,20 @@ class BlockCategories extends Module
$id_lang = (int)($params['cookie']->id_lang);
$smartyCacheId = 'blockcategories|'.$id_current_shop.'_'.$groups.'_'.$id_lang.'_'.$id_product.'_'.$id_category;
Tools::enableCache();
/*Tools::enableCache();
if (!$this->isCached('blockcategories.tpl', $smartyCacheId))
{
{*/
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
/*p('
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->addSqlRestrictionOnLang('cl').')
LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
WHERE (c.`active` = 1 OR c.`id_category` = 1)
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
AND cg.`id_group` IN ('.pSQL($groups).')
GROUP BY id_category
ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'c.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'));*/
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
FROM `'._DB_PREFIX_.'category` c
@@ -193,10 +203,10 @@ class BlockCategories extends Module
$resultParents[$row['id_parent']][] = &$row;
$resultIds[$row['id_category']] = &$row;
}
//p($resultParents);
$blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'));
unset($resultParents, $resultIds);
//d($blockCategTree);
$isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false);
if (Tools::isSubmit('id_category'))
{
@@ -220,7 +230,7 @@ class BlockCategories extends Module
else
$this->context->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
$this->context->smarty->assign('isDhtml', $isDhtml);
}
//}
$this->context->smarty->cache_lifetime = 31536000; // 1 Year
$display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId);
Tools::restoreCacheSettings();
@@ -25,11 +25,11 @@
*}
<li {if isset($last) && $last == 'true'}class="last"{/if}>
<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
<a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>
{if $node.children|@count > 0}
<ul>
{foreach from=$node.children item=child name=categoryTreeBranch}
{if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
{if $smarty.foreach.categoryTreeBranch.last}
{include file="$branche_tpl_path" node=$child last='true'}
{else}
{include file="$branche_tpl_path" node=$child last='false'}
Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

+3
View File
@@ -31,6 +31,9 @@
text-indent:-5000px;
background:url(img/icon/less.gif) no-repeat 2px 2px;
}
#layered_block_left span.closed a {
background:url(img/icon/more.gif) no-repeat 2px 2px;
}
#layered_block_left .layered_subtitle {
display: inline-block;
+2
View File
@@ -240,11 +240,13 @@ function openCloseFilter()
{
$('#'+$(this).attr('rel')).show();
$(this).html('v');
$(this).parent().removeClass('closed');
}
else
{
$('#'+$(this).attr('rel')).hide();
$(this).html('&lt;');
$(this).parent().addClass('closed');
}
e.preventDefault();
@@ -60,7 +60,7 @@ ul.sf-menu li.sfHover li ul {
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
left: 10em; /* match ul width */
left: 9.7em; /* match ul width */
top: 0;
}
ul.sf-menu li li:hover li ul,
@@ -94,7 +94,7 @@ ul.sf-menu li li li.sfHover ul {
background: rgba(113, 113, 113, 0.9);
}
.sf-menu li li li {
background: #ebebed;
background: rgba(113, 113, 113, 0.9);
}
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: transparent url(../img/bg_blocktopmenu_li_hover.png) repeat-x 0 0;
+11 -8
View File
@@ -97,17 +97,20 @@
text-align:right
}
#mywishlist td.wishlist_delete {text-align:center}
#mywishlist td.wishlist_delete {
text-align:center;
border-right: 1px solid #999
}
#mywishlist td.wishlist_delete a {
display:inline-block;
font-size:8px;
padding:1px 2px;
display:inline-block;
font-size:8px;
padding:1px 2px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
color:#666;
text-shadow:0 1px 0 #fff;
text-transform:uppercase;
border-radius:3px;
color:#666;
text-shadow:0 1px 0 #fff;
text-transform:uppercase;
background: none repeat scroll 0 0 #ccc;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B