API Docs for:
Show:

CharmDescriptionView Class

Module: views.charm-panel
Parent Module: views

Charm description view. It describes a charm's features in detail, together with a "Deploy" button.

Methods

_setScroll

() Undefined protected

When the view's "height" attribute is set, adjust the internal scrollable div to have the appropriate height.

Returns:

Undefined: Mutates only.

CharmDescriptionView.initializer

()

CharmDescriptionView.render

()

deploy

(
  • ev
)
Undefined

Fire an event indicating that the charm panel should switch to the "configuration" panel for the current charm.

Parameters:

  • ev Object

    An event object (with a "halt" method).

Returns:

Undefined: Sends a signal only.

getRelatedCharms

(
  • charm
  • slot
)
Undefined

Get related charms and render them in the provided node. Typically this is asynchronous, waiting on charm store results.

Parameters:

  • charm Object

    A charm model. Finds charms related to the required and provided interfaces of this charm.

  • slot Object

    An YUI node that will contain the results (using setHTML).

Returns:

Undefined: Mutates slot only.

getRelatedCharms.store.find.failure

()

If there was a failure, render it to the console and to the notifications section.

getRelatedCharms.store.find.success

()

If the charm we searched for is still the same as the view's charm, ask renderRelatedCharms to render the results. If they differ, discard the results, because they are no longer relevant.

goBack

(
  • ev
)
Undefined

Fire an event indicating that the charm panel should switch to the "charms" search result view.

Parameters:

  • ev Object

    An event object (with a "halt" method).

Returns:

Undefined: Sends a signal only.

renderRelatedCharms

(
  • related
  • slot
)
Undefined

Given a grouped list of related charms such as those returned by the charm store's "find" method, and a node into which the results should be rendered, render the results into HTML and sets that into the node.

Parameters:

  • related Array

    A list of grouped charms such as those returned by the charm store's "find" method.

  • slot Object

    A node into which the results should be rendered.

Returns:

Undefined: Mutates only.

showDetails

(
  • ev
)
Undefined

Fire an event indicating that the charm panel should switch to the same "description" panel but with a new charm. This is used by the "related charms" links.

Parameters:

  • ev Object

    An event object (with a "halt" method).

Returns:

Undefined: Sends a signal only.