Class uki.Collection
Defined in: collection.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
uki.Collection(elems)
Collection performs group operations on uki.view objects.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
uki.Collection.addAttrs(attrNames)
|
|
addRow()
|
|
|
anchors()
|
|
|
append(views)
Appends views to the first item in collection
|
|
|
appendTo(target)
|
|
|
attachTo(dom, rect)
Attaches all child views to dom container
|
|
|
attr(name, value)
Sets an attribute on all views or gets the value of the attribute on the first view
|
|
|
bind()
|
|
|
blur()
|
|
|
change()
|
|
|
checked()
|
|
|
click()
|
|
|
data()
|
|
|
dblclick()
|
|
|
disabled()
|
|
|
each(callback)
Iterates trough all items within itself
|
|
|
error()
|
|
|
find(selector)
Finds views within collection context
|
|
|
focus()
|
|
|
grep(callback)
Creates a new uki.Collection populated with found items
|
|
|
html()
|
|
|
id()
|
|
|
keydown()
|
|
|
keypress()
|
|
|
keyup()
|
|
|
layout()
|
|
|
load()
|
|
|
mouseout()
|
|
|
mouseup()
|
|
|
name()
|
|
|
next()
|
|
|
parent()
|
|
|
prev()
|
|
|
rect()
|
|
|
resize()
|
|
|
scroll()
|
|
|
select()
|
|
|
style()
|
|
|
submit()
|
|
|
text()
|
|
|
toggle()
|
|
|
trigger()
|
|
|
typeName()
|
|
|
unload()
|
|
|
value()
|
|
|
visible()
|
Class Detail
uki.Collection(elems)
Collection performs group operations on uki.view objects.
Author: voloko.
Behaves much like result jQuery(dom nodes). Most methods are chainable like .attr('text', 'somevalue').bind('click', function() { ... })
Its easier to call uki([view1, view2]) or uki('selector') instead of creating collection directly
Author: voloko.
- Parameters:
- elems
Method Detail
<static>
uki.Collection.addAttrs(attrNames)
- Parameters:
- attrNames
addRow()
anchors()
{uki.view.Collection}
append(views)
Appends views to the first item in collection
- Parameters:
-
{Array.
} views - Views to append
- Returns:
- {uki.view.Collection} self
appendChild()
appendTo(target)
- Parameters:
- target
{uki.view.Collection}
attachTo(dom, rect)
Attaches all child views to dom container
- Parameters:
- {Element} dom
- Container dom element
- {uki.geometry.Rect} rect
- Default size
- Returns:
- {uki.view.Collection} self
{uki.view.Collection|Object}
attr(name, value)
Sets an attribute on all views or gets the value of the attribute on the first view
c.attr('text', 'my text') // sets text to 'my text' on all collection views
c.attr('name') // gets name attribute on the first view
- Parameters:
- {string} name
- Name of the attribute
- {object=} value
- Value to set
- Returns:
- {uki.view.Collection|Object} Self or attribute value
background()
bind()
blur()
change()
checked()
childViews()
click()
data()
Defined in: list.js.
dblclick()
disabled()
{uki.view.Collection}
each(callback)
Iterates trough all items within itself
- Parameters:
- {function(this:uki.view.Base|number|uki.view.Base)} callback
- Callback to call for every item
- Returns:
- {uki.view.Collection} self
error()
{uki.view.Collection}
find(selector)
Finds views within collection context
c.find('Button')
- Parameters:
- {string} selector
- Returns:
- {uki.view.Collection} Collection of found items
focus()
focusable()
{uki.view.Collection}
grep(callback)
Creates a new uki.Collection populated with found items
- Parameters:
- {function(uki.view.Base|number):boolean} callback
- Callback to call for every item
- Returns:
- {uki.view.Collection} created collection
html()
id()
insertBefore()
keydown()
keypress()
keyup()
lastClickIndex()
Defined in: list.js.
layout()
load()
mousedown()
mouseenter()
mouseleave()
mousemove()
mouseout()
mouseover()
mouseup()
name()
next()
parent()
prev()
rect()
removeChild()
removeRow()
resize()
resizeToContents()
scroll()
select()
selectedIndex()
Defined in: list.js.
selectedIndexes()
Defined in: list.js.
selectedRow()
Defined in: list.js.
selectedRows()
Defined in: list.js.
style()
submit()
text()
toggle()
trigger()
typeName()
unload()
value()
visible()