presentation-components
Augmented.js Presentation Simple Components Module
API
Table of Contents
Article
Extends DecoratorView
An article class for setting up a 'page'
Supported options are:
- name - The name of the article view
- el - The mount point
- style - The style class
- header - The header markup
- headerEl - The header mount point
- footer - The footer markup
- footerEl - The footer mount point
- body - The body markup
- bodyEl - The body mount point (will generate a div)
- sections - array of sections to prefill (see addSection API for format)
Parameters
optionsobject Options to pass to the constructor
Examples
const article = new Presentation.Component.Article(
{ "el": "#mount", "header": "html", "footerEl": "#foot" });header
Header property
Parameters
header
Properties
headerstring
footer
Footer for the article
Parameters
footer
Properties
footerstring
body
The body content of the card (supports HTML)
Parameters
body
Properties
bodystring
sections
The section array
Parameters
sections
Properties
sectionsarray
addSection
Add a section object to the article
Parameters
sectionobject a section object
Examples
Section Object format:
{
"id" "something",
"body" "html",
"class" "something"
}clearSections
Clear the sections
render
render - render the article
Card
Extends DecoratorView
A card view - simple panel/dialog-like panel
Parameters
options
style
body property - the body of the card
Parameters
style
style
style property - the style
Parameters
style
body
The body content of the card (supports HTML)
Parameters
body
render
render - render the card
remove
remove
Footer
Extends DecoratorView
A Footer Component
Parameters
options
body
The body content of the card (supports HTML)
Parameters
body
render
render - render the footer
Header
Extends DecoratorView
A Header Component
Parameters
options
title
Parameters
title
Properties
titlestring A title property
subTitle
Parameters
subTitle
Properties
subTitlestring A subTitle property
render
render - render the header
remove
Remove the Header
Returns object Returns the view context ('this')
Manager
Extends Mediator
A Component Manager or Mediator
Parameters
options
Meta
- deprecated: Use Mediator
manageComponent
Manages a component (colleague)
Parameters
componentView A component or view to manage
unmanageComponent
Unmanages a component (colleague)
Parameters
componentView A component or view to manage
SelectBox
Extends DecoratorView
A SelectBox
Parameters
options(optional, default{})
render
Render the SelectBox
Returns object Returns the view context ('this')
remove
remove
addOption
Adds an option to the select
Parameters
Examples
addOption({"dog", 0, true});