forked from 0x2620/oxjs
various documentation-related changes
This commit is contained in:
parent
b6fdf0c28b
commit
a6ed310087
13 changed files with 880 additions and 301 deletions
|
|
@ -1,4 +1,14 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
|
||||
/*@
|
||||
Basic list object
|
||||
(options) -> that
|
||||
(options, self) -> that
|
||||
options <obj> the list's options
|
||||
self <obj> shared private variable
|
||||
@*/
|
||||
|
||||
|
||||
Ox.List = function(options, self) {
|
||||
|
||||
/***
|
||||
|
|
@ -17,23 +27,26 @@ Ox.List = function(options, self) {
|
|||
var self = self || {},
|
||||
that = new Ox.Container({}, self)
|
||||
.defaults({
|
||||
centered: false,
|
||||
construct: null,
|
||||
draggable: false,
|
||||
format: [],
|
||||
itemHeight: 16,
|
||||
items: null,
|
||||
itemWidth: 16,
|
||||
keys: [],
|
||||
max: -1,
|
||||
min: 0,
|
||||
orientation: 'vertical',
|
||||
pageLength: 100,
|
||||
selected: [],
|
||||
sort: [],
|
||||
sortable: false,
|
||||
type: 'text',
|
||||
unique: ''
|
||||
centered: false, //@ <boo> if true, and orientation is 'horizontal',
|
||||
//@ then keep the selected item centered
|
||||
construct: null, //@ <fun> (data) returns the list item HTML
|
||||
draggable: false, //@ <boo> true if the items can be reordered
|
||||
format: [], //@ <arr> ???
|
||||
itemHeight: 16, //@ <num> item height
|
||||
items: null, //@ <arr> list items
|
||||
//@ <fun> (data) returns {items, size, ...}
|
||||
//@ (data, callback) returns [items]
|
||||
itemWidth: 16, //@ <num> item width
|
||||
keys: [], //@ <arr> keys of the list items
|
||||
max: -1, //@ <num> max number of items that can be selected
|
||||
min: 0, //@ <num> min number of items that must be selected
|
||||
orientation: 'vertical', //@ <str> 'horizontal' or 'vertical'
|
||||
pageLength: 100, //@ <num> number of items per page
|
||||
selected: [], //@ <arr> ids of the selected elements
|
||||
sort: [], //@ <arr>
|
||||
sortable: false, //@ <boo>
|
||||
type: 'text', //@ <str>
|
||||
unique: '' //@ <str> name of the key that acts as unique id
|
||||
})
|
||||
.options(options || {})
|
||||
.scroll(scroll);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue