Card Class
Constructor
Card
-
el
-
options
Parameters:
-
el
HTMLElement -
options
ObjectConfiguration for the card
-
[id]
String optionalUnique identifier for this card
-
[cardType]
String optionalType of predefined card configuration
-
[title]
String optionalTitle for this card
-
[icon]
String optionalIcon class used for this card
-
[lazyLoad]
Boolean optionalWhether to load the details section on load or wait until its needed
-
[usePopoutLayout]
Boolean optionalWhether or not to place card content inside card layout when the card when the card is a popout
-
[hasPopout]
Boolean optionalWhether or not the card can be popped out into a new window
-
[expandable]
Boolean optionalWhether or not the card can be expanded
-
[showFooter]
Boolean optionalShow the footer for this card
-
[summaryContentHtml]
String | Function optionalCan be a HTMLElement or String of HTML or a function with a callback that takes the generated HTML for the summary section of the card
-
[summaryContentUrl]
String optionalUrl to request HTML content for summary section of card
-
[detailsContentHtml]
String | Function optionalCan be a HTMLElement or String of HTML or a function with a callback that takes the generated HTML for the details section of the card
-
[detailsContentUrl]
String optionalUrl to request HTML content for details section of card
-
[leftControlsHtml]
String | Function optionalCan be a HTMLElement or String of HTML or a function with a callback that takes the generated HTML for the left controls content for this card
-
[leftControlsContentUrl]
String optionalUrl to request HTML content for the left controls content for this card
-
[rightControlsHtml]
String | Function optionalCan be a HTMLElement or String of HTML or a function with a callback that takes the generated HTML for the right controls content for this card
-
[rightControlsContentUrl]
String optionalUrl to request HTML content for the right controls content for this card
-
[position]
Object optionalSettings for how to position this card in the deck
-
[size_x]
Number optionalNumber of columns this card spans in deck -
[size_y]
Number optionalNumber of rows this card spans in deck -
[expanded_x]
Number optionalMax number of columns this card spans when expanded -
[expanded_y]
Number optionalMax number of rows this card spans when expanded -
[col]
Number optionalCol the card should be positioned in -
[row]
Number optionalRow the card should be positioned in
-
-
[onSummaryLoad]
Function optionalFunction triggered when summary content is loaded; passes through the card
-
[onSummaryDisplayed]
Function optionalFunction triggered when summary content is displayed
-
[onDetailsLoad]
Function optionalFunction triggered when details content is loaded; passes through the card
-
[onDetailsDisplayed]
Function optionalFunction triggered when details content is displayed
-
[onResize]
Function optionalFunction triggered when this card is resized
-
[onExpand]
Function optionalFunction triggered when this card is expanded
-
[onCollapse]
Function optionalFunction triggered when this card is collapsed
-
[loadData]
Function optionalFunction used to load data into card
-
Item Index
Methods
changeSection
-
newSection
-
oldSection
Changes the section of the card from one section to another section
Parameters:
-
newSection
ObjectSection the card is being changed to
-
oldSection
ObjectCurrent section
Returns:
collapseCard
-
cb
Collapse the card
Parameters:
-
cb
ObjectCallback to call after function has been collapsed
destroy
()
Function used to destroy the card and remove it from the deck
expandCard
-
cb
Expand the card
Parameters:
-
cb
ObjectCallback to call after function has been expanded
getCardData
()
Object
Returns the current options associated with this card
Returns:
getCardHash
-
opts
Returns a numerical hash for the value the card options passed in
Parameters:
-
opts
Object
Returns:
getCardHtml
-
opts
Generates the layout for a card with given options
Parameters:
-
opts
Objectlocals used to generate layout for card
Returns:
of card layout html
getDefaults
()
Object
Returns the card defaults
Returns:
Card defaults
loadCard
()
Card
Loads the content of the different sections of the card. If lazyLoad is enabled only the summary content will be loaded when the card is initialized.
Returns:
loadContent
-
section
Loads the content for the specified section
Parameters:
-
section
String'summary'|'details'
Returns:
loadPopout
()
Card
Loads the popout for a card. The card element won't have the layout injected yet so we need to do that first before loading the card.
Returns:
setCardContent
-
section
-
html
Loads the given HTML content into the specified section for this card
Parameters:
-
section
String'summary'|'details'
-
html
HTMLElement | Stringcontent for this section
Returns:
toggleCard
-
cb
Toggles a card between expanded and collapsed
Parameters:
-
cb
Object