- Ocultar los precios cuando sea 0.00€ en la ventana de lightbox.

- Descripciones en la ventana de lightbox en 2 líneas.
- Mejorado el sistema de escoger la descripción a partir del título del enlace en lightbox.

git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@58 54e8636e-a86c-764f-903d-b964358a1ae2
This commit is contained in:
David Arranz 2011-07-20 17:49:02 +00:00
parent 18e8376c8a
commit 2cabe81016
4 changed files with 48 additions and 13 deletions

View File

@ -150,7 +150,7 @@
settings.rel = settings.rel || element.rel || 'nofollow';
settings.href = settings.href || $(element).attr('href');
settings.title = settings.title || element.title;
settings.title = settings.title || $(element).data('title'); //element.title;
if (typeof settings.href === "string") {
settings.href = $.trim(settings.href);

View File

@ -1,8 +1,8 @@
<?php
global $woo_options;
global $query_string;
get_header();
?>
<div id="content" class="col-full">
<div id="main" class="fullwidth">
@ -18,7 +18,10 @@
<div class="fix"></div>
<div class="post_container">
<div class="posts">
<?php while ( have_posts() ) { the_post(); $count++; ?>
<?php while ( have_posts() ) {
the_post(); $count++; ?>
<div <?php post_class(); ?>>
<?php if ( $woo_options[ 'woo_title_show' ] == 'true' ) { ?>
@ -34,7 +37,7 @@
$description = get_the_content();
$attrib = array('title' => $title);
?>
<a rel="lightbox-<?php echo $count; ?>" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
<a rel="lightbox" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
<span></span>
<?php echo the_post_thumbnail($thumb_size, $attrib); ?>
</a>

View File

@ -4,7 +4,29 @@
jQuery(document).ready(function() {
/*$.colorbox.settings.title = function() {
// would apply to all instances of colorbox
return $(this).find('img').attr('alt') || this.title || '';
}*/
if ( jQuery( 'a.size-thumbnail' ).length ) {
jQuery("a.size-thumbnail").each(function() {
var $this = jQuery(this);
$this.data('title', $this.attr('title'));
$this.removeAttr('title');
});
}
if ( jQuery( '.post_container .posts .post .entry a' ).length ) {
jQuery('.post_container .posts .post .entry a').each( function() {
var $this = jQuery(this);
$this.data('title', $this.attr('title'));
$this.removeAttr('title');
});
}
/*if ( jQuery( '.post_container .posts .post .entry a' ).length ) {
jQuery('.post_container .posts .post .entry a').each( function() {
var $this = jQuery(this);
$this.data('title',$this.attr('title'));
@ -30,7 +52,7 @@ jQuery(document).ready(function() {
var $title = $this.data('title');
$this.attr('title', $title);
});
}
}*/

View File

@ -26,7 +26,7 @@
?>
<?php /* If there are no products to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<?php if (0) : /* ! have_posts() ) :*/ ?>
<div class="entry margin">
<h1><?php _e( 'Error 404 - Page not found!', 'woothemes' ); ?></h1>
<p><?php _e( 'The page you trying to reach does not exist, or has been moved. Please use the menus or the search box to find what you are looking for.', 'woothemes' ); ?></p>
@ -67,23 +67,33 @@ while ( have_posts() ) :
<div id="td-post-<?php the_ID(); ?>" class="tcp_product_thumb">
<?php
if ( $see_image ) {
$description = the_title_attribute('echo=0');
$description .= ' / ';
$description .= get_the_content();
$description .= ' / ';
$description .= tcp_the_price_label('', '', false);
$description = the_title_attribute('echo=0');
$precio = tcp_the_price_label('', '', false);
if ($precio != 0) {
$description .= ' - ';
$description .= $precio;
}
$content = trim(get_the_content());
if (strlen($content)) {
$description .= '<br/>';
$description .= $content;
}
if (has_post_thumbnail()) {
$attr = array('alt' => $description,
'title' => the_title_attribute('echo=0'));
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');
?>
<a rel="lightbox" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
<span></span>
<?php echo the_post_thumbnail($thumb_size); ?>
<?php echo the_post_thumbnail($thumb_size, $attr); ?>
</a>
<?php } else { ?>
<a rel="lightbox" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
<span></span>
<?php echo $description; ?>
<?php echo the_title_attribute('echo=0'); ?>
</a>
<?php }