The listMan
"class".
theListId
: Specifies the id of the list element.theList
theListId
parameter. Typcially a tbody
, ul
or ol
.ajaxRespEl
'ajax-response'
.inputData
grabInputs
method.clearInputs
select
s are set to their first option. The values of all other inputs are set to the empty string. Automatically populated by grabInputs
.topAdder
0
(bottom).showLink
alt
0
to work with lists without alternating classes. Defaults to 'alternate'
. Note: construct all alternating lists such that the first and all subsequent odd items are assigned the alternate class.recolorPos
reg_color
'#'
specifying the background color of the regular (non-alternate) list items.alt_color
'#'
specifying the background color of the alternate list items.addComplete
, delComplete
and dimComplete
listType
'table'
or 'list'
.listItems
aTrap
The "scope" of these methods may change in the future.
ajaxAdder(string what, string where)
what
from the data contained in the input elements that are descendents of the HTML element with id equal to where
. The new item(s) are then added to the list. The addComplete
function will be run after all the items have been added and before the list is recolored. Items being added to the list that already exist in the list will be moved from their initial position to the beginning or end of the list (depending on topAdder
. Returns false on success (to block traditional form submission), true on failure.ajaxUpdater(string what, string where)
ajaxAdder
. Tthis function is specifically designed to edit an item's data rather than create a new item. Returns false on success, true on failure.ajaxDelete(string what, string id)
what
and with element id what-id
, then removes that item from the list. The delComplete
function will be run after all the item has been deleted and removed, and before the list is recolored. Returns false on success, true on failure.ajaxDimmer(string what, string id, string dimClass)
dimClass
. Again, the item is of type what
and has element id what-id
. The dimComplete
function will be run after all the item has been dimmed. Returns false on success, true on failure.makeEl(string rawHTML)
rawHTML
into an HTML element appropriate for insertion into the list.addListItem(string rawHTML, int totalNumber)
rawHTML
to the list. The totalNumber
parameter specifies how many items are being added "at once" in this set.removeListItem(string id, bool noFade)
id
from red and then deletes it. If noFode==true
, the item is simply deleted without fading.replaceListItem(string id, string rawHTML)
id
with rawHTML
. Also used internally to first remove and then replace an item.dimItem(string id, string dimClass, bool noFade)
dimClass
of the list item identified by id
and fades from yellow.grabInputs( string container)
container
(specified by an id). Looks only for text
, password
, textarea
, hidden
, and select
form elements. Also populates clearInputs
with the ids of all of these elements excluding hidden
elements.deleteSomething(what, id, string message)
theList.ajaxDelete
that also asks the user to confirm the deletion by responding to message
.dimSomething(what, id, dimClass)
theList.ajaxDimmer
.killSubmit(string code, event e)
code
. If the JS evaluates to false
the form is not submitted. Should be bound to elements' onkeypress or onclick event handlers.getNodeValue(DOM Object tree, string tagName)
tagName
that is a descendant of tree
.encloseFunc(function func, [mixed arg])
func
optionally evaluated at arg
.