| 1 |
// $Id: apachesolr.js,v 1.1.2.2.2.5 2009/07/28 13:53:37 robertDouglass Exp $ |
// $Id: apachesolr.js,v 1.1.2.2.2.6 2009/11/03 12:32:09 robertDouglass Exp $ |
| 2 |
|
|
| 3 |
Drupal.behaviors.apachesolr = function(context) { |
Drupal.behaviors.apachesolr = function(context) { |
| 4 |
$('.apachesolr-hidden-facet').hide(); |
$('.apachesolr-hidden-facet').hide(); |
| 12 |
$(this).text(Drupal.t('Show more')); |
$(this).text(Drupal.t('Show more')); |
| 13 |
} |
} |
| 14 |
return false; |
return false; |
| 15 |
}).appendTo($('.block-apachesolr_search:has(.apachesolr-hidden-facet), .block-apachesolr:has(.apachesolr-hidden-facet)')); |
}).appendTo($(Drupal.settings.apachesolr_show_more_blocks)); |
| 16 |
|
|
| 17 |
if (Drupal.settings.apachesolr_facetstyle == 'checkboxes') { |
if (Drupal.settings.apachesolr_facetstyle == 'checkboxes') { |
| 18 |
// Find all facet links and give them a checkbox |
// Find all facet links and give them a checkbox |
| 19 |
$('.apachesolr-facet', context).each(Drupal.apachesolr.addCheckbox); |
$('.apachesolr-facet', context).each(Drupal.apachesolr.addCheckbox); |
| 26 |
|
|
| 27 |
Drupal.apachesolr.addCheckbox = function() { |
Drupal.apachesolr.addCheckbox = function() { |
| 28 |
// Put href in context scope to be visible in the anonymous function. |
// Put href in context scope to be visible in the anonymous function. |
| 29 |
var href = $(this).attr('href'); |
var href = $(this).attr('href'); |
| 30 |
$(this).before($('<input type="checkbox" />') |
$(this).before($('<input type="checkbox" />') |
| 31 |
.attr('class', 'facet-checkbox') |
.attr('class', 'facet-checkbox') |
| 32 |
.click(function(){ |
.click(function(){ |