Changeset 1080746
- Timestamp:
- 02/02/2015 09:35:55 AM (11 years ago)
- Location:
- afables/trunk
- Files:
-
- 5 edited
-
afables.php (modified) (1 diff)
-
css/afables-widget.css (modified) (2 diffs)
-
inc/afables-widget.php (modified) (3 diffs)
-
js/afables-widget.js (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
afables/trunk/afables.php
r1031871 r1080746 5 5 Author: OhayoWeb 6 6 Author URI: http://www.ohayoweb.com/ 7 Version: 1.3. 17 Version: 1.3.2 8 8 */ 9 9 10 10 11 define('AFABLES_PLUGIN_VERSION','1.3. 1');11 define('AFABLES_PLUGIN_VERSION','1.3.2'); 12 12 define('AFABLES_USERAGENT','Afables Wordpress Plugin '.AFABLES_PLUGIN_VERSION); 13 13 -
afables/trunk/css/afables-widget.css
r936600 r1080746 2 2 .afables-wrapper-widget hr{ border-bottom: 1px solid #fff;} 3 3 .afable-title{ text-align: center; } 4 .afables-wrapper-widget ul.afables-result{ list-style: none;} 4 5 .afables-wrapper-widget li {display: none; text-align: center;} 5 6 .afables-wrapper-widget li:first-child{display: block;} … … 8 9 .afables-wrapper-widget h5{ margin-top: 0px; } 9 10 .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;} 11 12 .afables-wrapper-widget .thumbnail { 12 13 -
afables/trunk/inc/afables-widget.php
r1031871 r1080746 93 93 94 94 <?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> 98 98 </div> 99 99 <?php endif;?> … … 296 296 $channel_feed->set_feed_url($url); 297 297 298 if(WP_DEBUG == true) $channel_feed->enable_cache = false; // Desactivamos la cache en debug298 #if(WP_DEBUG == true) $channel_feed->enable_cache = false; // Desactivamos la cache en debug 299 299 300 300 $channel_feed->init(); … … 321 321 echo '<h5>'.$titulo.'</h5>'; 322 322 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>'; 324 324 325 325 echo '<div class="rate">'; -
afables/trunk/js/afables-widget.js
r1031720 r1080746 5 5 var list = []; 6 6 var filter = ''; 7 var newfilter = []; 7 8 8 9 $.each(afablesObject, function( index, value ) { 9 10 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 11 35 }); 12 36 … … 18 42 $.each(afablesObject, function( index, value ) { 19 43 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(); 23 48 active = 0; 24 49 }); … … 26 51 $(value+' .afables-next').bind('click', function(event) { 27 52 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); 29 56 }); 30 57 … … 32 59 event.preventDefault(); 33 60 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); 34 63 }); 35 64 36 65 37 66 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() { 39 68 getActive(index,value).show().siblings().hide(); 40 69 }); … … 57 86 58 87 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); 60 92 }; 61 93 -
afables/trunk/readme.txt
r1031871 r1080746 3 3 Tags: afables, feed, widget, sidebar, city, channel 4 4 Requires at least: 3.7.1 5 Tested up to: 3.9.15 Tested up to: 4.1 6 6 License: GPLv2 or later 7 Stable tag: 1.3. 17 Stable tag: 1.3.2 8 8 9 9 == Description == … … 45 45 == Changelog == 46 46 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 47 51 = 1.3 = 48 52 * Fixed an error loading multiple instances of the widget on the same page.
Note: See TracChangeset
for help on using the changeset viewer.