search_box.js

Summary
search_box.js
bbop.widget.search_boxBBOP object to draw various UI elements that have to do with autocompletion.
Functions
search_boxContructor for the bbop.widget.search_box object.
destroyRemove the autocomplete and functionality from the DOM.
contentGet the current text contents of the search box.

bbop.widget.search_box

BBOP object to draw various UI elements that have to do with autocompletion.

This is a completely self-contained UI and manager.

Summary
Functions
search_boxContructor for the bbop.widget.search_box object.
destroyRemove the autocomplete and functionality from the DOM.
contentGet the current text contents of the search box.

Functions

search_box

bbop.widget.search_box = function(golr_loc,
golr_conf_obj,
interface_id,
in_argument_hash)

Contructor for the bbop.widget.search_box object.

This is a specialized (and widgetized) subclass of bbop.golr.manager.jquery.

The function for the callback argument should either accept a JSONized solr document representing the selected item or null (nothing found).

While everything in the argument hash is technically optional, there are probably some fields that you’ll want to fill out to make things work decently.  The options for the argument hash are:

fill_pwhether or not to fill the input with the val on select(default true)
label_templatestring template for dropdown, can use any document field
value_templatestring template for selected, can use any document field
minimum_lengthwait for this many characters to start (default 3)
list_select_callbackfunction takes a json solr doc on dropdown selection

To get a better idea on how to use the templates, see the demo page at http://cdn.berkeleybop.org/jsapi/bbop-js/demo/index.html and read the documentation for bbop.template.

Arguments

golr_locstring url to GOlr server;
golr_conf_obja bbop.golr.conf object
interface_idstring id of the element to build on
in_argument_hash[optional] optional hash of optional arguments

Returns

this object

destroy

this.destroy = function()

Remove the autocomplete and functionality from the DOM.

Arguments

n/a

Returns

n/a

content

this.content = function()

Get the current text contents of the search box.

Arguments

n/a

Returns

string

bbop.widget.search_box = function(golr_loc,
golr_conf_obj,
interface_id,
in_argument_hash)
Contructor for the bbop.widget.search_box object.
this.destroy = function()
Remove the autocomplete and functionality from the DOM.
this.content = function()
Get the current text contents of the search box.
jQuery BBOP manager for dealing with actual ajax calls.
BBOP JS template object/enginette.
Close