API Docs for:
Show:

MainView Class

Extends Y.View
Module: views
Parent Module: juju.browser

Base shared view for MainView sidebar and fullscreen.

Methods

_bindSearchWidgetEvents

() private

Bind events watching for search widget changes.

_renderSearchWidget

(
  • node
)

Render out the main search widget and controls shared across various views.

Parameters:

  • node Node

    the node to render into.

_searchChanged

(
  • ev
)
private

When the search term or filter is changed, fetch new data and redraw.

Parameters:

  • ev Event

    event object from catching changes.

_toggle_sidebar

(
  • ev
)

Toggle the visibility of the browser. Bound to nav controls in the view, however this will be expanded to be controlled from the new constant nav menu outside of the view once it's completed.

Parameters:

  • ev Event

    event to trigger the toggle.

apiFailure

(
  • data
  • request
)

Shared method to generate a message to the user based on a bad api call.

Parameters:

  • data Object

    the json decoded response text.

  • request Object

    the original io_request object for debugging.

destructor

()

Destroy this view and clear from the dom world.

initializer

(
  • cfg
)

General YUI initializer.

Parameters:

  • cfg Object

    configuration object.

isFullscreen

() Bool

Check if this view is the fullscreen version to help aid us in template work.

Returns:

Bool: }

Attributes

_fullscreenTarget

String

When we click the fullscreen toggle UX widget, what url do we route to. We have to dump this into the template because we can't dynamically showView/navigate from here.

Views extending this should implement the url path.

Default: ''

charmID

String

If this view is called from the point of view of a specific charmId it'll be set here.

Default: undefined

store

Charmworld0

An instance of the Charmworld API object to hit for any data that needs fetching.

Default: undefined

subpath

String

If this were a route that had a subpath component it's passed into the view to aid in rendering.

e.g. /bws/fullscreen/*charmid/hooks to load the hooks tab correctly.

Default: undefined

template

Object

Extending classes need to specify the template used to render display.

Default: ''

visible

Boolean

Is this view currently visible? Tracked for use with the show/hide toggle control in the Search widget.

Default: true