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_p | whether or not to fill the input with the val on select(default true) |
label_template | string template for dropdown, can use any document field |
value_template | string template for selected, can use any document field |
minimum_length | wait for this many characters to start (default 3) |
list_select_callback | function 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_loc | string url to GOlr server; |
golr_conf_obj | a bbop.golr.conf object |
interface_id | string id of the element to build on |
in_argument_hash | [optional] optional hash of optional arguments |
Returns
this object