Table of Contents

Selectable Auto Complete

Requirement

* The tag implementation that we currently have should be modified and re-factored to what is in this video on the Screen Design page: https://wiki.exphosted.com/doku.php/screendesigns - Tag Dropdown Video

* And, this should be a reusable component.

Implementation

The implementation is done by making use of existing auto_completer plugin. The typical differences between the required component and the existing auto_complete are

  1. The panel should be dockable on the UI.
  2. We should be able to select multiple items from the response.

Usage

The component is available as a helper(SelectableAutoCompleteHelper) in the application.

Files to include -

 crossbow/trunk/public/javascripts/selectable_auto_completer.js
 crossbow/trunk/public/stylesheets/selectable_auto_completer.css 

The css file can be overriden/replaced to have the required styles.

It can be used in the Haml view as

text_field_with_selectable_auto_complete(field_name, default_values_array, url_options, display_options, completions_options)

UI screenshot