list_select_shield.js

Summary
list_select_shield.js
bbop.widget.list_select_shieldBBOP object to produce a self-constructing/self-destructing term information shield.
Functions
list_select_shieldContructor for the bbop.widget.list_select_shield object.

bbop.widget.list_select_shield

BBOP object to produce a self-constructing/self-destructing term information shield.

A simple invocation could be

new bbop.widget.list_select_shield({title: 'foo', blurb: 'explanation', list_of_lists: [[['a', 'b'], ['c', 'd', true]], [[1, 2], [3, 4]]], title_list: ['title 1', 'title 2'], action: function(selected_args){ alert(selected_args.join(', '));}})

This is a completely self-contained UI and manager.

Summary
Functions
list_select_shieldContructor for the bbop.widget.list_select_shield object.

Functions

list_select_shield

bbop.widget.list_select_shield = function(in_argument_hash)

Contructor for the bbop.widget.list_select_shield object.

The purpose of this object to to create a popup that 1) display multiple lists for the user to select from and 2) triggers an action (by function argument) to act on the list selections.

The “list_of_lists” argument is a list of lists structured like

[[[label, value, nil|true|false], ...], ...]

Items that are true will appear as pre-checked when the lists come up.

The “action” argument is a function that takes a list of selected values.

The argument hash looks like

title[optional] the title to be displayed
blurb[optional] a text chunk to explain the point of the action
title_lista list of titles/explanations for the lists
list_of_listsa list of lists (see above)
action*[optional] * the action function to be triggered (see above, defaults to no-op)
width[optional] width as px integer (defaults to 800)

Arguments

in_argument_hashhash of arguments (see above)

Returns

self

bbop.widget.list_select_shield = function(in_argument_hash)
Contructor for the bbop.widget.list_select_shield object.
Close