inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.widget.DDList
Search:
 
Filters

Class inputEx.widget.DDList

Create a sortable list

Constructor

inputEx.widget.DDList ( options )
Parameters:
options <Object> Options:
  • id: id of the ul element
  • value: initial value of the list

Methods

addItem

void addItem ( item )
Add an item to the list
Parameters:
item <String|Object> Either a string with the given value or an object with "label" and "value" attributes

getValue

Array getValue ( )
Return the current value of the field
Returns: Array
array of values

onReordered

void onReordered ( )
Called by the DDListItem when an item as been moved

removeItem

void removeItem ( index )
Method to remove an item (_removeItem function + event firing)
Parameters:
index <Integer> Item index

setOptions

void setOptions ( )
Set the options

setValue

void setValue ( value )
Set the value of the list
Parameters:
value <Array> list of values

updateItem

void updateItem ( index , value )
Update the value of a given item
Parameters:
index <Integer> Item index
value <Any> New value

Events

YAHOO custom event fired when an item is removed

YAHOO custom event fired when an item is removed ( itemValue )
Parameters:
itemValue <Any> value of the removed item

YAHOO custom event fired when the list is reordered

YAHOO custom event fired when the list is reordered ( )


Copyright © 2011 Eric Abouaf All rights reserved.