search_pane.js | |
bbop. | BBOP object to produce a self-constructing/self-destructing term general filtering search tool for an index. |
Functions | |
search_pane | Contructor for the bbop.widget.search_pane object. |
establish_display | Completely redraw the display. |
get_selected_items | The idea is to return a list of the items selected (with checkboxes) in the display. |
add_button | Add a user-defined button to the display. |
clear_buttons | Remove all user-defined buttons from the display. |
set_query_field_text | Push text into the search box. |
set_initial_reset_callback | Add a callback to be run after the initial reset is finished. |
BBOP object to produce a self-constructing/self-destructing term general filtering search tool for an index. This is a completely self-contained UI and manager.
The function “.establish_display()” must be run after an initial personality is set. Also, in many use cases, you’ll want to have a line like the following before running “.establish_display()”: sp_widget.add_query_filter(‘document_category’, ‘annotation’, [‘*’]);
Also, establish_display() literally just establishes the physical presence of the display. To actually populate it with data once you start, a seeding call to the .reset() or .search() is necessary.
The search pane will display one less filter row than is set with .set_facet_limit(), it will use this runover to decide whether or not to display the “more” option for the filters.
Functions | |
search_pane | Contructor for the bbop.widget.search_pane object. |
establish_display | Completely redraw the display. |
get_selected_items | The idea is to return a list of the items selected (with checkboxes) in the display. |
add_button | Add a user-defined button to the display. |
clear_buttons | Remove all user-defined buttons from the display. |
set_query_field_text | Push text into the search box. |
set_initial_reset_callback | Add a callback to be run after the initial reset is finished. |
bbop.widget.search_pane = function( golr_loc, golr_conf_obj, interface_id, in_argument_hash )
Contructor for the bbop.widget.search_pane object.
This is a specialized (and widgetized) subclass of bbop.golr.manager.jquery.
Sticky filters (see manager documentation) are “hidden” from the user in all displays.
linker | the linker to be used; null function otherwise |
handler | special field handler to be used; null function otherwise |
show_filterbox_p | show currents filters and accordion (default true) |
show_pager_p | show the results pager (default true) |
show_checkboxes_p | show/enable the item select checkboxes (default true) |
spinner_search_source | source for the spinner used during typical searching |
spinner_shield_source | source for the spinner used shield waiting |
spinner_shield_message | message to display on the spinner shield while waiting |
icon_clear_label | (default: text button based on ‘X’) |
icon_clear_source | (default: ‘’) |
icon_reset_label | (default: text button based on ‘X’) |
icon_reset_source | (default: ‘’) |
icon_positive_label | (default: text button based on ‘+’) |
icon_positive_source | (default: ‘’) |
icon_negative_label | (default: text button based on ‘-’) |
icon_negative_source | (default: ‘’) |
icon_remove_label | (default: text button based on ‘X’) |
icon_remove_source | (default: ‘’) |
golr_loc | string url to GOlr server; not needed if local |
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 |
self
this.get_selected_items = function()
The idea is to return a list of the items selected (with checkboxes) in the display. This means that there are three possibilities. 1) We are not using checkboxes or the display has not been established, so we return null; 2) no or all items have been selected, so we get back an empty list (all == none in our view); 3) a subset list of strings (ids).
NOTE: Naturally, does not function until the display is established.
n/a
Returns string list or null
this.set_query_field_text = function( query )
Push text into the search box. Does not affect the state of the manager in any way.
NOTE: Does not function until the display is established.
query | the text to put into the search box |
Returns true or false on whether the task was accomplished
Contructor for the bbop.widget.search_pane object.
bbop.widget.search_pane = function( golr_loc, golr_conf_obj, interface_id, in_argument_hash )
Completely redraw the display.
this.establish_display = function()
The idea is to return a list of the items selected (with checkboxes) in the display.
this.get_selected_items = function()
Add a user-defined button to the display.
this.add_button = function( button_definition_hash )
Remove all user-defined buttons from the display.
this.clear_buttons = function()
Push text into the search box.
this.set_query_field_text = function( query )
Add a callback to be run after the initial reset is finished.
this.set_initial_reset_callback = function( callback )