[-] FO : Do not fade out on bigpic source change
This commit is contained in:
1 parent
a77111dc62
commit
9173a35a2b
2 files changed
+8
-16
No files matched your search
@@ -414,21 +414,14 @@ function displayImage(domAAroundImgThumb, no_animation)
|
|||||||
{
|
{
|
||||||
if (typeof(no_animation) == 'undefined')
|
if (typeof(no_animation) == 'undefined')
|
||||||
no_animation = false;
|
no_animation = false;
|
||||||
|
|
||||||
if (domAAroundImgThumb.attr('href'))
|
if (domAAroundImgThumb.attr('href'))
|
||||||
{
|
{
|
||||||
var newSrc = domAAroundImgThumb.attr('href').replace('thickbox','large');
|
var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large');
|
||||||
if(typeof(bigpicSrc) == 'undefined' || bigpicSrc == '')
|
if ($('#bigpic').attr('src') != newSrc)
|
||||||
bigpicSrc = $('#bigpic').attr('src');
|
|
||||||
if (bigpicSrc != newSrc)
|
|
||||||
{
|
{
|
||||||
//fadeOut is too slow, displayImage can be called again before bigpic source has really changed so we use a global bigpicSrc
|
$('#bigpic').attr('src', newSrc);
|
||||||
bigpicSrc = newSrc;
|
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
|
||||||
$('#bigpic').fadeOut((no_animation ? 0 : 'fast'), function(){
|
$(this).attr('alt', domAAroundImgThumb.attr('href'));
|
||||||
$(this).attr('src', newSrc).show();
|
|
||||||
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
|
|
||||||
$(this).attr('alt', domAAroundImgThumb.attr('href'));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
$('#views_block li a').removeClass('shown');
|
$('#views_block li a').removeClass('shown');
|
||||||
$(domAAroundImgThumb).addClass('shown');
|
$(domAAroundImgThumb).addClass('shown');
|
||||||
@@ -481,7 +474,7 @@ function refreshProductImages(id_product_attribute)
|
|||||||
$('#thumbs_list').trigger('goto', 0);
|
$('#thumbs_list').trigger('goto', 0);
|
||||||
for (var i = 0; i < combinationImages[id_product_attribute].length; i++)
|
for (var i = 0; i < combinationImages[id_product_attribute].length; i++)
|
||||||
$('#thumbnail_' + parseInt(combinationImages[id_product_attribute][i])).show();
|
$('#thumbnail_' + parseInt(combinationImages[id_product_attribute][i])).show();
|
||||||
if (parseInt($('#thumbs_list_frame >li').length) != parseInt($('#thumbs_list_frame >li:visible').length))
|
if (parseInt($('#thumbs_list_frame >li:visible').length) < parseInt($('#thumbs_list_frame >li').length))
|
||||||
$('#wrapResetImages').show('slow');
|
$('#wrapResetImages').show('slow');
|
||||||
else
|
else
|
||||||
$('#wrapResetImages').hide('slow');
|
$('#wrapResetImages').hide('slow');
|
||||||
@@ -559,7 +552,6 @@ $(document).ready(function()
|
|||||||
|
|
||||||
original_url = window.location + '';
|
original_url = window.location + '';
|
||||||
first_url_check = true;
|
first_url_check = true;
|
||||||
bigpicSrc = $('#bigpic').attr('src');
|
|
||||||
checkUrl();
|
checkUrl();
|
||||||
initLocationChange();
|
initLocationChange();
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
|||||||
{foreach from=$images item=image name=thumbnails}
|
{foreach from=$images item=image name=thumbnails}
|
||||||
{assign var=imageIds value="`$product->id`-`$image.id_image`"}
|
{assign var=imageIds value="`$product->id`-`$image.id_image`"}
|
||||||
<li id="thumbnail_{$image.id_image}">
|
<li id="thumbnail_{$image.id_image}">
|
||||||
<a href="{$link->getImageLink($product->link_rewrite, $imageIds, thickbox_default)}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">
|
<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')}" rel="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" title="{$image.legend|htmlspecialchars}">
|
||||||
<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />
|
<img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium_default')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -540,7 +540,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
|||||||
{foreach from=$accessories item=accessory name=accessories_list}
|
{foreach from=$accessories item=accessory name=accessories_list}
|
||||||
{if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)}
|
{if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)}
|
||||||
{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
|
{assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
|
||||||
<li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description">
|
<li class="ajax_block_product{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if} product_accessories_description">
|
||||||
<p class="s_title_block">
|
<p class="s_title_block">
|
||||||
<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|escape:'htmlall':'UTF-8'}</a>
|
<a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|escape:'htmlall':'UTF-8'}</a>
|
||||||
{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - <span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
|
{if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - <span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user