Class uki.Collection


Defined in: collection.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Collection performs group operations on uki.view objects.
Method Summary
Method Attributes Method Name and Description
<static>  
uki.Collection.addAttrs(attrNames)
 
 
 
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()
 
 
 
 
 
data()
 
 
 
each(callback)
Iterates trough all items within itself
 
 
find(selector)
Finds views within collection context
 
 
 
grep(callback)
Creates a new uki.Collection populated with found items
 
html()
 
id()
 
 
 
 
 
 
 
load()
 
 
 
 
 
 
 
 
name()
 
next()
 
 
prev()
 
rect()
 
 
 
 
 
 
 
 
 
 
 
 
 
text()
 
 
 
 
 
 
Class Detail
uki.Collection(elems)
Collection performs group operations on uki.view objects.

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()

Documentation generated by JsDoc Toolkit 2.3.3 on Thu Sep 02 2010 13:38:18 GMT+0400 (MSD) with uki-doc template.