A5PanelCard Class
Arguments
- settingsobject
Settings for the panel card. This will override the initial values of the properties of the A5.PanelCard class.
Description
Panel card.
Properties
- themestring
The theme to use on the panel card.
- overridestring
The overrides to use on the panel card.
- renderModestring
If the panel card is in a navigator or layout, renderMode controls when the panel card is created. A blank value (the default) will create the panel automatically when the parent is created. A value of "auto-create" will create the panel when it becomes. A value of "auto-create-destroy" will do the same, but also destroy it when it is hidden.
- placeholderHTMLstring
If the panel card is created dynamically the placeholder HTML to use until it has been created. This can be used to display a waiting message while the panel is being rendered.
- classNamestring
The class name to put on the panel card.
- headerobject
The panel header settings.
- showboolean
Whether or not to show the panel header.The default value is false if the HTML is blank, and true if it is not.
- htmlstring
The HTML to put in the panel header. The placeholders "{panel.id}" (the ID of the panel), "{panel.name}" (the name of the panel if it is in a panel navigator or layout) and "{panel.title}" (the title of the panel if it is in a panel navigator or layout) will be automatically replaced.
- scrollbooleanobject
Scroll settings for the panel header. By default the value is set to scroll on both axes. A value of false can be used to preventing the body from scrolling.
- axisstring
The axis to allow scrolling on. Values can be "x", "y" or "both".
- classNamestring
The class name to put on the panel header.
- stylestring
The inline CSS to put on the panel header.
- bodyobject
The panel body settings.
- contentobject
The panel body content settings. Defines where the contents on the panel body come from. Any injected HTML can use the placeholders "{panel.id}" (the ID of the panel), "{panel.name}" (the name of the panel if it is in a panel navigator or layout) and "{panel.title}" (the title of the panel if it is in a panel navigator or layout).
- typestring
The type of contents in the panel body. Values can be "html", "callback" and "url". A type of "html" will fill the panel body with the supplied html. A type of "callback" will perform a callback and fill in the panel body with the response text. A type of "url" will create the panel body as an IFRAME, and set the url of the IFRAME to the specified url.
- srcstringfunction
If the type is "callback" or "url", then "src" is the source of the content. If "src" is a function, then it will be called to retrieve the value when the panel card is created.
- datastringfunction
If the type is "html" then "data" is the html to inject in the panel body. If the type is "callback" or "url", then "data" is the data to append to the "src". If "data" is a function, then it will be called to retrieve the value when the panel card is created.
- scrollbooleanobject
Scroll settings for the panel footer. By default the value is false - preventing the footer from scrolling.
- axisstring
The axis to allow scrolling on. Values can be "x", "y" or "both".
- classNamestring
The class name to put on the panel body.
- stylestring
The inline CSS to put on the panel body.
- object
The panel footer settings.
- showboolean
Whether or not to show the panel footer.The default value is false if the HTML is blank, and true if it is not.
- htmlstring
The HTML to put in the panel footer. The placeholders "{panel.id}" (the ID of the panel), "{panel.name}" (the name of the panel if it is in a panel navigator or layout) and "{panel.title}" (the title of the panel if it is in a panel navigator or layout) will be automatically replaced.
- scrollbooleanobject
Scroll settings for the panel footer. By default the value is false - preventing the footer from scrolling.
- axisstring
The axis to allow scrolling on. Values can be "x", "y" or "both".
- classNamestring
The class name to put on the panel footer.
- stylestring
The inline CSS to put on the panel footer.
- overlayobject
The panel overlay settings. The panel overlay is for HTML elements to be absolutely positioned over the panel (such as floating buttons).
- showboolean
Whether or not to show the panel overlay.The default value is false if the HTML is blank, and true if it is not.
- htmlstring
The HTML to put in the panel overlay. The placeholders "{panel.id}" (the ID of the panel), "{panel.name}" (the name of the panel if it is in a panel navigator or layout) and "{panel.title}" (the title of the panel if it is in a panel navigator or layout) will be automatically replaced.
- onInitializefunction()
Event fired when the panel is initialized. This does not necessarily mean the panel elements have been created, but rather that the class was.
- onSizefunction(data)
Event fired when the panel is sized.
- dataobject
The sizing data.
- widthnumber
The width of the panel in pixels.
- heightnumber
The height of the panel in pixels.
- changedboolean
Whether the size actually changed.
- oldobject
The old size of the panel.
- widthnumber
The old width of the panel in pixels.
- heightnumber
The old height of the panel in pixels.
- onCreatefunction(element,bodyElement,headerElement,footerElement)
Event fired when the panel is created.
- elementelement
The panel element.
- bodyElementelement
The panel body element.
- headerElementelement
The panel header element.
- footerElementelement
The panel footer element.
- onActivatefunction()
Event fired when the panel is activated by a parent panel navigator or layout.
- onViewfunction()
Event fired when the panel is viewed by a parent panel navigator or layout. It should be noted that unlike the onActivate event, this event will fire regardless of the panel already being active.
- onBeforeDestroyfunction()
Event fired before the panel is destroyed.
- onDestroyfunction()
Event fired when the panel is destroyed.
Methods
- bindSize Method
Bind the panel sizing.
- create Method
Create the panel.
- destroy Method
Destroy the panel.
- getPanelId Method
Get the ID of the panel, or one of its sub-parts.
- refresh Method
Refresh the panel.
- resize Method
Resize the panel.
- setDisplay Method
Show or hide the panel header, footer, or overlay.
- setSize Method
Set the panel to a specific size.