small fixes

This commit is contained in:
TMMeilleur
2013-12-04 10:08:35 +02:00
parent f274103b0e
commit 689fcb005d
8 changed files with 171 additions and 238 deletions
+2 -2
View File
@@ -158,7 +158,7 @@ class CrossSelling extends Module
$taxCalc = Product::getTaxCalculationMethod();
foreach ($orderProducts AS &$orderProduct)
{
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('home'));
$orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']);
if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2))
$orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL);
@@ -215,7 +215,7 @@ class CrossSelling extends Module
$taxCalc = Product::getTaxCalculationMethod();
foreach ($orderProducts AS &$orderProduct)
{
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('home'));
$orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']);
if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2))
$orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL);
@@ -56,7 +56,7 @@
}
.lang-items {
position:relative;
z-index:0;
z-index:1;
background:#f4f4f4;
border:1px solid #e9e9e9;
margin-top:-1px;
@@ -168,3 +168,4 @@ h4.hook-title {
.item .displayed_flag, .new-item .displayed_flag {
margin:0 0 0 10px;
}
.item .normal { font-weight:normal;}
+2 -2
View File
@@ -4,11 +4,11 @@ jQuery(document).ready(function() {
item_container.toggleClass('active').children('.item-container').slideToggle();
});
$('.button-edit').click(function() {
var item_container = $(this).parent('.item');
var item_container = $(this).parents('.item');
item_container.toggleClass('active').children('.item-container').slideToggle();
});
$('.button-close').click(function() {
var item_container = $(this).parent('.item');
var item_container = $(this).parents('.item');
item_container.toggleClass('active').children('.item-container').slideToggle();
});
@@ -14,12 +14,33 @@
<ul id="items">
{foreach name=items from=$hookItems item=hItem}
<li id="item-{$hItem.id_item}" class="item panel">
<span class="item-order">{if $hItem.item_order le 9}0{/if}{$hItem.item_order}</span>
{if $hItem.image}<span><img src="{$module_dir}images/{$hItem.image}" alt="" title="" class="preview" /></span>{/if}
<div class="clearfix">
<span class="item-order pull-left">{if $hItem.item_order le 9}0{/if}{$hItem.item_order}</span>
{if $hItem.image}
<span class="pull-left">
<img width="130" src="{$module_dir}images/{$hItem.image}" rel="#comments_{$hItem.id_item}" alt="" title="" class="preview" />
<br /><small class="normal">{l s='Click image to enlarge/reduce' mod='themeconfigurator'}</small>
</span>
<script type="text/javascript">
$(document).ready(function() {
var htmlContent = $('#comments_{$hItem.id_item}').html();
$("[rel=#comments_{$hItem.id_item}]").popover({
placement : 'bottom', //placement of the popover. also can use top, bottom, left or right
title : false, //this is the top title bar of the popover. add some basic css
html: 'true', //needed to show html of course
content : htmlContent //this is the content of the html box. add the image here or anything you want really.
});
});
</script>
<div style="display:none" id="comments_{$hItem.id_item}">
<img class="img-responsive" src="{$module_dir}images/{$hItem.image}" alt="" title="" class="preview" />
</div>
{/if}
<span class="item-title">{$hItem.title}</span>
<span class="button btn btn-default button-edit pull-right"><i class="icon-edit"></i>{l s='Edit' mod='themeconfigurator'}</span>
<span class="button btn btn-default button-close pull-right"><i class="icon-remove"></i>{l s='Close' mod='themeconfigurator'}</span>
</div>
<div class="item-container">
<form method="post" action="{$htmlitems.postAction}" enctype="multipart/form-data" class="item-form defaultForm form-horizontal">
<input type="hidden" name="id_lang" value="{$lang}" />