52 lines
1.7 KiB
Smarty
52 lines
1.7 KiB
Smarty
|
{if $menu_sales}
|
||
|
<div id="sales_menu">
|
||
|
<div class="home">
|
||
|
<a href="{$base_dir_ssl}">{l s='Go to the homepage' mod='privatesales_salemenu'}</a>
|
||
|
</div>
|
||
|
<ul>
|
||
|
{foreach $menu_sales as $menu_sale}
|
||
|
<li>
|
||
|
{if count(array_intersect($customer_groups, $menu_sale->groups))>0}
|
||
|
<a href="{$link->getCategoryLink($menu_sale->id_category, $menu_sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}"><span>{$menu_sale->title[$cookie->id_lang]|escape:'htmlall':'UTF-8'}</span></a>
|
||
|
{/if}
|
||
|
</li>
|
||
|
{/foreach}
|
||
|
</ul>
|
||
|
<span id="sales_menu_arrow"></span>
|
||
|
<script type="text/javascript">
|
||
|
<!--{literal}
|
||
|
var anim = false;
|
||
|
var is_index = false;
|
||
|
if($("body#index").length > 0) {
|
||
|
is_index = true;
|
||
|
}
|
||
|
|
||
|
$("#sales_menu_arrow").click(function() {
|
||
|
if(!anim) {
|
||
|
anim = true;
|
||
|
|
||
|
if($("#sales_menu_arrow").hasClass("active")) {
|
||
|
var offset = - $("#sales_menu ul").height() + 47;
|
||
|
$("#sales_menu").animate({height: 47});
|
||
|
$("#subheader").animate({top: $("#subheader").position().top + offset});
|
||
|
$("body #columns > .content").animate({"padding-top": (is_index? 18: 47)});
|
||
|
$("body #columns .breadcrumb").animate({top: 133}, 400, "swing", function() {
|
||
|
anim = false;
|
||
|
});
|
||
|
} else {
|
||
|
var offset = $("#sales_menu ul").height() - 47;
|
||
|
$("#sales_menu").animate({height: $("#sales_menu ul").height()});
|
||
|
$("#subheader").animate({top: $("#subheader").position().top + offset});
|
||
|
$("body #columns > .content").animate({"padding-top": (is_index? 18: 47) + offset});
|
||
|
$("body #columns .breadcrumb").animate({top: 133 + offset}, 400, "swing", function() {
|
||
|
anim = false;
|
||
|
});
|
||
|
}
|
||
|
$("#sales_menu_arrow").toggleClass("active");
|
||
|
}
|
||
|
});
|
||
|
{/literal}-->
|
||
|
</script>
|
||
|
</div>
|
||
|
{/if}
|