? SolrPhpClient Index: apachesolr.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.js,v retrieving revision 1.1.2.2.2.6 diff -u -p -r1.1.2.2.2.6 apachesolr.js --- apachesolr.js 3 Nov 2009 12:32:09 -0000 1.1.2.2.2.6 +++ apachesolr.js 3 Nov 2009 13:05:52 -0000 @@ -12,8 +12,8 @@ Drupal.behaviors.apachesolr = function(c $(this).text(Drupal.t('Show more')); } return false; - }).appendTo($('.block-apachesolr_search:has(.apachesolr-hidden-facet), .block-apachesolr:has(.apachesolr-hidden-facet)')); - + }).appendTo($(Drupal.settings.apachesolr_show_more_blocks)); + if (Drupal.settings.apachesolr_facetstyle == 'checkboxes') { // Find all facet links and give them a checkbox $('.apachesolr-facet', context).each(Drupal.apachesolr.addCheckbox); @@ -26,7 +26,7 @@ Drupal.apachesolr = {} Drupal.apachesolr.addCheckbox = function() { // Put href in context scope to be visible in the anonymous function. - var href = $(this).attr('href'); + var href = $(this).attr('href'); $(this).before($('') .attr('class', 'facet-checkbox') .click(function(){ Index: apachesolr.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v retrieving revision 1.1.2.12.2.155.2.32 diff -u -p -r1.1.2.12.2.155.2.32 apachesolr.module --- apachesolr.module 26 Oct 2009 02:12:32 -0000 1.1.2.12.2.155.2.32 +++ apachesolr.module 3 Nov 2009 13:05:53 -0000 @@ -210,7 +210,7 @@ function apachesolr_comment($edit, $op) case 'delete': case 'publish': case 'unpublish': - // TODO: do we want to skip this if we are excluding comments + // TODO: do we want to skip this if we are excluding comments // from the index for this node type? apachesolr_mark_node($edit['nid']); break; @@ -1768,6 +1768,13 @@ function apachesolr_js() { // Only add the js stuff once. if (empty($settings)) { $settings['apachesolr_facetstyle'] = variable_get('apachesolr_facetstyle', 'checkboxes'); + $show_more_blocks = array(); + foreach (apachesolr_get_enabled_facets() as $module => $blocks) { + foreach ($blocks as $block) { + $show_more_selector[] = "#block-{$module}-{$block}:has(.apachesolr-hidden-facet)"; + } + } + $settings['apachesolr_show_more_blocks'] = implode(', ', $show_more_selector); drupal_add_js($settings, 'setting'); drupal_add_js(drupal_get_path('module', 'apachesolr') . '/apachesolr.js'); }