You are here

function apachesolr_autocomplete_init in Apache Solr Autocomplete 7.2

Same name and namespace in other branches
  1. 6 apachesolr_autocomplete.module \apachesolr_autocomplete_init()
  2. 7 apachesolr_autocomplete.module \apachesolr_autocomplete_init()

Implementation of hook_init().

File

./apachesolr_autocomplete.module, line 11
Alters search forms to suggest terms using Apache Solr using AJAX.

Code

function apachesolr_autocomplete_init() {
  drupal_add_js(drupal_get_path('module', 'apachesolr_autocomplete') . '/apachesolr_autocomplete.js');

  // TODO: Use #attached in forms instead of including JS in hook_init()?

  #drupal_add_css( drupal_get_path('module', 'apachesolr_autocomplete') . '/apachesolr_autocomplete.css'); // TODO: Remove css?
  drupal_add_library('system', 'ui.autocomplete');
}