Selection Lists is the component based on Ember.Component. It represents two list
with drag'n'drop capabilities from one to another. It accepts to array where the first is the array of
possible items, the second is the array of the selected items that appear in the second column. However,
the items of the first column are available items - selected. The members of the array might of any type.
v0.0.5
- Drag'n'Drop of multiple items
- Multiple selection with
ctrl,shiftkeys - Select all with
shift+a - Arrow
upanddownnavigation
- jQuery >= 1.9
- Handlebars
- EmberJS >= 1.0
- IE 10+
- Chrome
- Firefox
- Opera
Selection Lists component is based on Ember.Components, thus it can be instantiated from the
Handlebars template:
<script type="text/x-handlebars">
{{selection-lists}}
</script>
It also accepts the set of attributes for component customization which are described the the chapter API.
The constructor can accept the following parameters:
- {string}
availableItemsTitleTitle of the column A - {string}
chosenItemsTitleTitle of the column B - {array}
availableItemsArray of all possible items - {array}
chosenItemsArray of chosen items that appear in column B - {string}
chosenItemChangedName of the function to be invoked in the hosting controller when swapping occurs - {string}
sortPropertiesThe string with enumerated by comma sorting properties inside the array item - {string}
rowRenderRender that is used to the template of list item
Example:
{{selection-lists
availableItemsTitle='Column A:'
chosenItemsTitle='Column B'
availableItems=SNB.allItems
chosenItems=SNB.selectedItems
chosenItemChanged="chosenItemChanged"
sortProperties="val"
rowRender='<img src="http://icons.iconarchive.com/icons/aha-soft/people/16/engineer-icon.png" /> {{view.content}}'
}}
- Sergey N. Bolshchikov (New ProImage)
- Liat Ziv (New ProImage)
- Ilan Goldfeld (New ProImage)
The MIT License (MIT)
Copyright (c) 2013 New ProImage