button_templates.js

Summary
button_templates.js
bbop.widget.display.button_templatesTemplate generators for various button “templates” that can be fed into the search_pane widget.
Functions
field_downloadGenerate the template for a simple download button.
restmarkGenerate the template for a simple bookmark button with pop-up.
bookmarkGenerate the template for a simple bookmark (for search) button with pop-up.
send_fields_to_galaxyGenerate the template for a button that sends fields to a Galaxy instance.
open_facet_matrixGenerate the template for a button that sends the user to the facet_matrix page with the current manager state and two facets.
flexible_downloadGenerate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.
flexible_downloadGenerate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.

bbop.widget.display.button_templates

Template generators for various button “templates” that can be fed into the search_pane widget.

These templates foten have functions that manipulate the environment outside, such as window.*, etc.  Be aware and look at the code carefully--there is a reason they’re in the widgets/display area.

Note: this is a collection of methods, not a constructor/object.

Summary
Functions
field_downloadGenerate the template for a simple download button.
restmarkGenerate the template for a simple bookmark button with pop-up.
bookmarkGenerate the template for a simple bookmark (for search) button with pop-up.
send_fields_to_galaxyGenerate the template for a button that sends fields to a Galaxy instance.
open_facet_matrixGenerate the template for a button that sends the user to the facet_matrix page with the current manager state and two facets.
flexible_downloadGenerate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.
flexible_downloadGenerate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.

Functions

field_download

bbop.widget.display.button_templates.field_download = function(label,
count,
fields)

Generate the template for a simple download button.

Arguments

labelthe text to use for the hover
countthe number of items to download
fieldsthe field to download

Returns

hash form of jQuery button template for consumption by search_pane.

restmark

bbop.widget.display.button_templates.restmark = function(linker)

Generate the template for a simple bookmark button with pop-up.

Arguments

linkerthe linker to be used for this bookmarking

Returns

hash form of jQuery button template for consumption by search_pane.

bookmark

bbop.widget.display.button_templates.bookmark = function(linker)

Generate the template for a simple bookmark (for search) button with pop-up.

Arguments

linkerthe linker to be used for this bookmarking

Returns

hash form of jQuery button template for consumption by search_pane.

send_fields_to_galaxy

bbop.widget.display.button_templates.send_fields_to_galaxy = function(label,
count,
fields,
galaxy)

Generate the template for a button that sends fields to a Galaxy instance.

Arguments

labelthe text to use for the hover
countthe number of items to download
fieldsthe field to download
galaxythe url to the galaxy instance we’re sending to

Returns

hash form of jQuery button template for consumption by search_pane.

open_facet_matrix

bbop.widget.display.button_templates.open_facet_matrix = function(gconf,
instance_data)

Generate the template for a button that sends the user to the facet_matrix page with the current manager state and two facets.

TODO: The facet_matrix link should be handled by the linker, not manually using the app_base info.

Arguments

gconfa copy of the <golr_conf> for the currrent setup
instance_dataa copy of an amigo.data.server() for app_base info

Returns

hash form of jQuery button template for consumption by search_pane.

flexible_download

bbop.widget.display.button_templates.flexible_download = function(label,
count,
start_fields,
personality,
gconf)

Generate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.

Arguments

labelthe text to use for the hover
countthe number of items to be downloadable
start_fieldsordered list of the initially selected fields
personalitythe personality (id) that we want to work with
gconfa copy of the <golr_conf> for the currrent setup

Returns

hash form of jQuery button template for consumption by search_pane.

flexible_download

bbop.widget.display.button_templates.flexible_download_b3 = function(
   label,
   count,
   start_fields,
   personality,
   gconf
)

Generate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.

Arguments

labelthe text to use for the hover
countthe number of items to be downloadable
start_fieldsordered list of the initially selected fields
personalitythe personality (id) that we want to work with
gconfa copy of the <golr_conf> for the currrent setup

Returns

hash form of jQuery button template for consumption by other widgets

BBOP object to produce a self-constructing/self-destructing term general filtering search tool for an index.
bbop.widget.display.button_templates.field_download = function(label,
count,
fields)
Generate the template for a simple download button.
bbop.widget.display.button_templates.restmark = function(linker)
Generate the template for a simple bookmark button with pop-up.
bbop.widget.display.button_templates.bookmark = function(linker)
Generate the template for a simple bookmark (for search) button with pop-up.
bbop.widget.display.button_templates.send_fields_to_galaxy = function(label,
count,
fields,
galaxy)
Generate the template for a button that sends fields to a Galaxy instance.
bbop.widget.display.button_templates.open_facet_matrix = function(gconf,
instance_data)
Generate the template for a button that sends the user to the facet_matrix page with the current manager state and two facets.
bbop.widget.display.button_templates.flexible_download = function(label,
count,
start_fields,
personality,
gconf)
Generate the template for a button that gives the user a DnD and reorderable selector for how they want their tab-delimited downloads.
Close