Index: autocomplete_widgets.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autocomplete_widgets/Attic/autocomplete_widgets.module,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 autocomplete_widgets.module
--- autocomplete_widgets.module	4 Oct 2009 17:03:17 -0000	1.1.2.8
+++ autocomplete_widgets.module	10 Dec 2009 19:04:35 -0000
@@ -201,3 +201,14 @@ function autocomplete_widgets_json($type
 function theme_autocomplete_widgets($element) {
   return $element['#children'];
 }
+
+/**
+ * Implementation of hook_views_api().
+ */
+function autocomplete_widgets_views_api() {
+  return array(
+    'api' => 3.0,
+  );
+}
+
+
Index: autocomplete_widgets.views.inc
===================================================================
RCS file: autocomplete_widgets.views.inc
diff -N autocomplete_widgets.views.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ autocomplete_widgets.views.inc	10 Dec 2009 19:04:35 -0000
@@ -0,0 +1,22 @@
+<?php
+// $Id: autocomplete_widgets.views.inc,v 1.0.0 2009/12/10 14:51:47 dagmar Exp $
+
+/**
+ * Implementation of hook_views_plugins().
+ */
+function autocomplete_widgets_views_plugins() {
+  return array(
+    'exposed_form' => array(
+      'autocomplete_widgets_basic' => array(
+        'title' => t('Autocomplete widgets'),
+        'help' => t('Allow use autocomplete widgets for Text and Number CCK exposed filters.'),
+        'handler' => 'autocomplete_widgets_basic_exposed_form_plugin',
+        'uses row plugin' => FALSE,
+        'uses fields' => TRUE,
+        'uses options' => TRUE,
+        'type' => 'normal',
+        'parent' => 'basic',
+      ),
+    ),
+  );
+}
Index: autocomplete_widgets_basic_exposed_form_plugin.inc
===================================================================
RCS file: autocomplete_widgets_basic_exposed_form_plugin.inc
diff -N autocomplete_widgets_basic_exposed_form_plugin.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ autocomplete_widgets_basic_exposed_form_plugin.inc	10 Dec 2009 19:04:35 -0000
@@ -0,0 +1,57 @@
+<?php
+// $Id: autocomplete_widgets_basic_exposed_form_plugin.inc,v 1.0.0 2009/12/10 14:57:46 dagmar Exp $
+
+class autocomplete_widgets_basic_exposed_form_plugin extends views_plugin_exposed_form_basic {
+
+  function option_definition() {
+    $options = parent::option_definition();
+    
+    $options['make_autocompletable'] = array('default' => array());
+    return $options;
+  }
+
+  function summary_title() {
+    return t('Autocomplete widgets');
+  }
+
+  function exposed_form_alter(&$form, &$form_state) {
+    parent::exposed_form_alter($form, $form_state);
+    
+    if (count($this->options['make_autocompletable'])) {
+      foreach ($this->options['make_autocompletable'] as $filter) {
+        //dsm($this->view->filter[$filter]);
+        $field_name = $this->view->filter[$filter]->content_field['field_name'];
+        $type_name = $this->view->filter[$filter]->content_field['type_name'];
+        $autocomplete_path = "autocomplete_widgets/$type_name/$field_name";
+        $form[$filter]['#autocomplete_path'] = $autocomplete_path;
+      }
+    }
+  }
+
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    foreach ($this->display->handler->get_handlers('filter') as $filter => $handler) {
+      if ($handler->is_exposed() ) {
+        if ($handler->content_field['widget']['module'] == 'autocomplete_widgets') {
+          $options[$filter] = $handler->ui_name();
+          $options[$filter] = $handler->ui_name();
+
+          if (!empty($handler->options['relationship']) && !empty($relationships[$handler->options['relationship']])) {
+            $options[$filter] = '(' . $relationships[$handler->options['relationship']] . ') ' . $options[$filter];
+          }
+        }
+      }
+    }
+
+    if (count($options)) {
+      $form['make_autocompletable'] = array(
+        '#type' => 'checkboxes',
+        '#title' => t('Convert into a autocomplete widget'),
+        '#options' => $options,
+        '#default_value' => $this->options['make_autocompletable'],
+        '#description' => t('This list contains only exposed filters for Text and Numeric CCK fields'),
+      );
+    }
+  }
+}
