APIs

Show:

StructuredView for a centralized area for all items in a client app

Constructor

reports.PMRecordsView

(
  • [options.model]
)

Parameters:

  • [options.model] PatientModel optional

    sets patient for this view

Methods

addSection

(
  • section
)
Undefined deprecated

For multi section structured views (i.e. patients record or settings area)

Parameters:

  • section Object

    Section config

    • name Object

      Displayable name

    • group Object

      Used for grouping on sidebars

    • icon Object

      recommended icon

    • section Object

      Key/id for section

    • callback Function

      Called when view is requested

Returns:

Undefined:

addSections

(
  • sections
)
Undefined

For multi section structured views (i.e. patients record or settings area)

Parameters:

  • sections Array

    array of section args

Returns:

Undefined:

getContents

() jQuery.Element

returns the contents element

Returns:

jQuery.Element:

View Jquery selector element for contents

getContext

() jQuery.Element

overrides backbone.view's render method. Sets the rendered property to rendered and renders any provided templates. This also binds any buttons in the view to it's action IF it has an actions attribute. The actione attribute value should match the name of the function in the view class.

Returns:

jQuery.Element:

View Jquery selector element for contents

getSection

() Object

override this method to return views based on the parameters provided.

Returns:

Object:

Configuration object

getViewFromSection

(
  • sectionConfig
)
Mixed

override this method to return views based on the parameters provided.

Parameters:

  • sectionConfig Object

    Section config to match against

    • section Object

      key/id for section

Returns:

Mixed:

varies depending on if config provides a callback If the section has no classpath, but has a callback, the result from that callback will be returned with sectionConfig passed as the argument If the section has a classpath, but no callback, an attempt is made to require and instantiate the view at the classpath. If this succeeds, the new instance is returned. If the section has a classpath and a callback, an attempt is made to require and instantiate the view at the classpath. If this succeeds, that view is passed as the arg to the callback. Otherwise undefined is returned.

hideControls

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

hideSidebar

() awa.mvc.StructuredView chainable

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Returns:

popup

(
  • [createArgs]
)
Object

Parameters:

  • [createArgs] Object optional

    arguments used on creation of popup

    • [controlsOnTop] Boolean optional

      defaults to false

    • [x] Integer optional

      defaults to false

    • [y] Integer optional

      defaults to false

    • [onRender] Function optional

      defaults to false

Returns:

Object:

popup

render

() awa.mvc.StructuredView chainable

overrides backbone.view's render method. Sets the rendered property to rendered and renders any provided templates. This also binds any buttons in the view to it's action IF it has an actions attribute. The actione attribute value should match the name of the function in the view class.

Returns:

setContents

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

setContextText

(
  • text
)
Undefined

Sets a subtitle for the structured view

Parameters:

  • text String

    Context text

Returns:

Undefined:

setControls

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

setCurrentControlsView

(
  • view
)
awa.mvc.StructuredView

Sets an internal pointer for the current controls view. Also replaces the existing controls view on the dom but keeps the current element alive.

Parameters:

Returns:

setHeader

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

setHeaderText

(
  • text
)
Undefined

Sets a title in the very top bar of the structured view

Parameters:

  • text String

    Header text I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

setSidebar

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

showControls

(
  • $el
)
Undefined

Adds a child View. Added children automatically get cleaned up after (destroy is called, events are unbound). Be sure to always add child view AND large ui element (like autoselect)

Parameters:

  • $el String | jQuery.Element

    This can be either the constructor method or an already constructed view. I'd suggest you construct your view first as it's easier to track any issues.

Returns:

Undefined:

showSidebar

(
  • show
)
awa.mvc.StructuredView chainable

Parameters:

  • show Boolean

    if undefined, defaults to true

Returns:

toggleSidebar

() Undefined

overrides backbone.view's render method. Sets the rendered property to rendered and renders any provided templates. This also binds any buttons in the view to it's action IF it has an actions attribute. The actione attribute value should match the name of the function in the view class.

Returns:

Undefined: