drop_select_shield.js

Summary
drop_select_shield.js
bbop.widget.drop_select_shieldBBOP object to produce a self-constructing/self-destructing DnD selection and ordering shield.
Functions
drop_select_shieldContructor for the bbop.widget.drop_select_shield object.

bbop.widget.drop_select_shield

BBOP object to produce a self-constructing/self-destructing DnD selection and ordering shield.

A simple invocation could be

new bbop.widget.drop_select_shield({title: 'foo', blurb: 'explanation', pool_list: [['a', 'b'], ['c', 'd']], selected_list [['a', 'b']], action: function(selected_items){ alert(selected_items.join(', '));}})

This is a completely self-contained UI and manager.

Summary
Functions
drop_select_shieldContructor for the bbop.widget.drop_select_shield object.

Functions

drop_select_shield

bbop.widget.drop_select_shield = function(in_argument_hash)

Contructor for the bbop.widget.drop_select_shield object.

The purpose of this object to to create a popup that 1) displays a drag selectable and reorderable list of items and 2) define an action (by function argument) to act on the selection.

The list arguments take the form of: [“label”, “id”].

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

The argument hash looks like

title[optional] the title to be displayed
blurb[optional] a text chunk to explain the point of the action
pool_lista list of lists (see above)
selected_lista list of lists (see above)
action_label*[optional] * defaults to “Select”
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.drop_select_shield = function(in_argument_hash)
Contructor for the bbop.widget.drop_select_shield object.
Close