Base

ICE.UI. Base

new Base(model)

The base class for all components.
Parameters:
Name Type Description
model ICE.UI.Model The component model.

Members

$dom :jQuery

The component's DOM.
Type:

_kids :Array.<ICE.UI.Base>|Object.<String, ICE.UI.Base>

The children components.
Type:

_locked :Boolean

The flag whether component is locked.
Type:
  • Boolean

_name :String

The name of component.
Type:
  • String

_parent :ICE.UI.Base

The parent component.
Type:

content :ICE.UI.Content

The model of component's content.
Type:

hidden :Boolean

The flag whether component is hidden.
Type:
  • Boolean

model :ICE.UI.Model

The component model.
Type:

Methods

ancestor(type) → {ICE.UI.Base}

Returns ancestor of specified type.
Parameters:
Name Type Description
type ICE.UI.Base The type to look for.
Returns:
The UI component or null if there is none.
Type
ICE.UI.Base

has(name) → {Boolean}

Determines whether component has property set.
Parameters:
Name Type Description
name String The property name.
Returns:
true if it has property set, false otherwise.
Type
Boolean

hide()

Hides component.

(abstract) html(formopt) → {jQuery}

Returns component's DOM element.
Parameters:
Name Type Attributes Description
form ICE.UI.Form <optional>
The form.
Returns:
jQuery collection of DOM element.
Type
jQuery

htmlOf(content, formopt) → {jQuery}

Returns a collection of DOM elements of a content.
Parameters:
Name Type Attributes Description
content ICE.UI.Content The content model.
form ICE.UI.Form <optional>
The form.
Returns:
jQuery collection of DOM element(s).
Type
jQuery

is(prop)

Determines value of boolean property.
Parameters:
Name Type Description
prop string The property name.
Returns:
true if property evaluates to true, false otherwise.

lock()

Locks root component.

postHtml(form)

Invoked after html method invocation for component during modeling.
Parameters:
Name Type Description
form ICE.UI.Form The form

preHtml(form)

Invoked before html method invocation for component during modeling.
Parameters:
Name Type Description
form ICE.UI.Form The form

show()

Shows component.

trigger(event)

Triggers custom event for component and its descendants.
Parameters:
Name Type Description
event String The event name.

unlock()

Unlocks root component.

(abstract) update(model)

Updates component according to a new model.
Parameters:
Name Type Description
model ICE.UI.Model The component model.

updateWith(content)

Updates content of component.
Parameters:
Name Type Description
content ICE.UI.Content The content model.