Plugin Directory

Changeset 1080746


Ignore:
Timestamp:
02/02/2015 09:35:55 AM (11 years ago)
Author:
ohayo-web
Message:

1.3.2

Location:
afables/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • afables/trunk/afables.php

    r1031871 r1080746  
    55 Author: OhayoWeb
    66 Author URI: http://www.ohayoweb.com/
    7  Version: 1.3.1
     7 Version: 1.3.2
    88*/
    99
    1010
    11 define('AFABLES_PLUGIN_VERSION','1.3.1');
     11define('AFABLES_PLUGIN_VERSION','1.3.2');
    1212define('AFABLES_USERAGENT','Afables Wordpress Plugin '.AFABLES_PLUGIN_VERSION);
    1313
  • afables/trunk/css/afables-widget.css

    r936600 r1080746  
    22.afables-wrapper-widget hr{ border-bottom: 1px solid #fff;}
    33.afable-title{ text-align: center; }
     4.afables-wrapper-widget ul.afables-result{ list-style: none;}
    45.afables-wrapper-widget li {display: none; text-align: center;}
    56.afables-wrapper-widget li:first-child{display: block;}
     
    89.afables-wrapper-widget h5{ margin-top: 0px; }
    910.afables-wrapper-widget span.price{ font-weight: bold; font-size: 14px; }
    10 .afables-wrapper-widget #filter-type { margin: 10px 0;}
     11.afables-wrapper-widget .filter-type { margin: 10px 0;}
    1112.afables-wrapper-widget .thumbnail  {
    1213
  • afables/trunk/inc/afables-widget.php

    r1031871 r1080746  
    9393           
    9494                <?php if($instance['type']== 'all'):?>
    95                 <div id="filter-type">
    96                     <label><input type="radio" name="type" value="INDIVIDUAL"> <?php _e('Caregivers','afables');?></label>
    97                     <label><input type="radio" name="type" value="COMPANY"> <?php _e('Home help companies','afables')?></label>
     95                <div id="filter-type" class="filterby">
     96                    <label><input type="radio" name="type_<?php echo $this->id;?>" value="INDIVIDUAL"> <?php _e('Caregivers','afables');?></label>
     97                    <label><input type="radio" name="type_<?php echo $this->id;?>" value="COMPANY"> <?php _e('Home help companies','afables')?></label>
    9898                </div>
    9999                <?php endif;?>
     
    296296        $channel_feed->set_feed_url($url);
    297297       
    298         if(WP_DEBUG == true) $channel_feed->enable_cache = false; // Desactivamos la cache en debug
     298        #if(WP_DEBUG == true) $channel_feed->enable_cache = false; // Desactivamos la cache en debug
    299299       
    300300        $channel_feed->init();
     
    321321            echo '<h5>'.$titulo.'</h5>';
    322322           
    323             if(!$hide_thumbnail) echo '<div class="thumbnail"><img src="'.$image[0]['data'].'"></div>';
     323            if(!$hide_thumbnail) echo '<div class="thumbnail"><img src="" data-src="'.$image[0]['data'].'"></div>';
    324324           
    325325            echo '<div class="rate">';
  • afables/trunk/js/afables-widget.js

    r1031720 r1080746  
    55    var list = [];
    66    var filter = '';
     7    var newfilter = [];
    78   
    89    $.each(afablesObject, function( index, value ) {
    910        list[index] =  $(value+' ul.afables-result');
    10         list[index].children(value +' .afables-result li'+filter).eq('0').siblings().hide(); // Hide all except first list element
     11        list[index].children(value +' .afables-result li'+newfilter[index]).eq('0').siblings().hide(); // Hide all except first list element
     12        //console.log(list[index]);
     13
     14        newfilter[index] = '';
     15       
     16        source = $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').data('src');
     17        $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').attr('src',source);
     18       
     19        $(value+' .filterby input[name=type_'+index+']').bind('click', function(){
     20            //console.log($(this).val());
     21            filter='.'+$(this).val();
     22            //console.log(filter);
     23            newfilter[index]='.'+$(this).val();
     24
     25            //console.log(index);
     26        });
     27       
     28    });
     29   
     30   
     31   
     32    $.each(afablesObject, function( index, value ) {
     33        list[index] =  $(value+' ul.afables-result');
     34        list[index].children(value +' .afables-result li'+newfilter[index]).eq('0').siblings().hide(); // Hide all except first list element
    1135    });
    1236   
     
    1842    $.each(afablesObject, function( index, value ) {
    1943       
    20         $(value+' .afables-wrapper-widget input[name=type]').bind('click', function(){
    21             filter[index] = $(value+' .afables-wrapper-widget input[name=type]:checked').val();
    22             list[index].children(value+' .afables-result li'+filter[index]).eq('0').siblings().hide();
     44       
     45        $(value+' .afables-wrapper-widget input[name=type_'+index+']').bind('click', function(){
     46            filter[index] = $(value+' .afables-wrapper-widget input[name=type_'+index+']:checked').val();
     47            list[index].children(value+' .afables-result li'+newfilter[index]).eq('0').siblings().hide();
    2348            active = 0;
    2449        });
     
    2651        $(value+' .afables-next').bind('click', function(event) {
    2752            event.preventDefault();
    28             active = active == list[index].children(value+' .afables-result li'+filter[index]).length-1 ? 0 : active + 1;
     53            active = active == list[index].children(value+' .afables-result li'+newfilter[index]).length-1 ? 0 : active + 1;
     54            source = $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').data('src');
     55            $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').attr('src',source);
    2956        });
    3057
     
    3259            event.preventDefault();
    3360            active = active == 0 ? list[index].children(value+' .afables-result li'+filter[index]).length-1 : active - 1;
     61            source = $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').data('src');
     62            $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').attr('src',source);
    3463        });
    3564       
    3665
    3766       
    38         $(value+' .afables-previous,'+ value +' .afables-next,'+ value +' .afables-wrapper-widget input[name=type]').bind('click', function() {
     67        $(value+' .afables-previous,'+ value +' .afables-next,'+ value +' .afables-wrapper-widget input[name=type_'+index+']').bind('click', function() {
    3968            getActive(index,value).show().siblings().hide();
    4069        });
     
    5786   
    5887    var getActive = function(index,value) {
    59         return list[index].children(value+' .afables-result li'+filter).eq(active);
     88        source = $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').data('src');
     89        $(value+' .afables-result li'+newfilter[index]).eq(active).find('.thumbnail > img').attr('src',source);
     90        //console.log(source);
     91        return list[index].children(value+' .afables-result li'+newfilter[index]).eq(active);
    6092    };
    6193   
  • afables/trunk/readme.txt

    r1031871 r1080746  
    33Tags: afables, feed, widget, sidebar, city, channel
    44Requires at least: 3.7.1
    5 Tested up to: 3.9.1
     5Tested up to: 4.1
    66License: GPLv2 or later
    7 Stable tag: 1.3.1
     7Stable tag: 1.3.2
    88
    99== Description ==
     
    4545== Changelog ==
    4646
     47= 1.3.2 =
     48* Fixed a bug filtering by Company or Individual. (Corregido el error al filtrar por compañia o individuo)
     49* Improvement in the request for images. ( Mejora en la petición de imágenes reduciendo la carga de la página)
     50
    4751= 1.3 =
    4852* Fixed an error loading multiple instances of the widget on the same page.
Note: See TracChangeset for help on using the changeset viewer.