AdPanel Behavior
Description
AdPanel is an AjaxControlToolkit based client side behavior for adding advertisenments and similar things - like partners - to the webpage automatically.
Usage
Home
Properties
Ads Type: Array
Default: [] - empty Array
Item collection of the contents or images. The item is a json javascript object.
Sample json object for a text content item:
{
tooltip: "Bajai cégek és vállalkozások | tlap.hu",
link: "http://bajaicegek.tlap.hu/",
width: Sys.Extended.UI.AdWidth.Responsive,
content: '<h4><span class="label label-info">bajaicegek.tlap.hu</span></h4>'
}
Other text content item:
{
tooltip: "Dorker",
link: "http://www.dorker.hu/",
width: Sys.Extended.UI.AdWidth.Responsive,
content: 'www.dorker.hu'
}
Image as content item with link:
{
tooltip: "AjaxControlToolkit",
link: "http://ajaxcontroltoolkit.codeplex.com/",
width: Sys.Extended.UI.AdWidth.Inherit,
image: "img/partners/ToolkitLogo.jpg"
}
Simple text content without link:
{
content: 'simple text as list item'
}
ContentType: enum Sys.Extended.UI.AdPanelContent
Default: Sys.Extended.UI.AdPanelContent.Content
The AdPanelContent enumeration is used to specify how the AdPanelBehavior render the panel content.
enumerators:
- Sys.Extended.UI.AdPanelContent.Content
- Sys.Extended.UI.AdPanelContent.Wrap
HeightType: Object
Default: "auto"
The height of the panel - any value enabled, which is a legal value of DomElement.style.height.
IsPanelHeadVisibleType: Boolean
Default: true
If this value is true, then Bootstrap like header generated.
LayerType: enum Sys.Extended.UI.AdPanelLayer
Default: "Sys.Extended.UI.AdPanelLayer.InlineBlock"
The AdPanelLayer enumeration is used to specify how the AdPanelBehavior render the items in the panel content.
enumerators:
- Sys.Extended.UI.AdPanelLayer.Inline
- Sys.Extended.UI.AdPanelLayer.InlineBlock
- Sys.Extended.UI.AdPanelLayer.Block
- Sys.Extended.UI.AdPanelLayer.ListGroup
ListGroupCSSType: String
Default: "list-group"
ListGroupItemCSSType: String
Default: "list-group-item"
ListGroupItemPaddingType: String
Default: "3px 10px 3px 10px"
If the Layer is Sys.Extended.UI.AdPanelLayer.ListGroup, then this is the padding of the actual item - any value enabled, which is a legal value of DomElement.style.padding.
ListGroupMarginType: String
Default: "4px 0px 0px 0px"
PanelCSSType: String
Default: "panel panel-primary"
PanelHeadCSSType: String
Default: "panel-heading"
PanelHeadPaddingType: String
Default: ""
Any value enabled, which legal is a value of DomElement.style.padding.
PanelHeadTagType: String
Default: "h3"
The tagName of the head DomElement. Only enabled values: h1,h2,h3,h4,h5,h6.
PanelHeadTagCSSType: String
Default: "panel-title"
PanelPaddingType: Number
Default: 3
The padding of the panel.
PositionType: enum Sys.Extended.UI.AdPanelPosition
Default: Sys.Extended.UI.AdPanelPosition.Right
The AdPanelPosition enumeration is used to specify how the AdPanelBehavior place the panel content.
enumerators:
- Sys.Extended.UI.AdPanelPosition.Top
- Sys.Extended.UI.AdPanelPosition.Left
- Sys.Extended.UI.AdPanelPosition.Bottom
- Sys.Extended.UI.AdPanelPosition.Right
TitleType: String
Default: ""
Title for the panel header.
WidthType: Object
Default: 240
The height of the panel - any value enabled, which legal is a value of DomElement.style.width.
Methods
initialize()Initialize the instance of the behavior and own base classes.
dispose()Dispose the instance of the behavior.
_getPanelMargin()<returns type="Number" integer="true" />
Method for calculating the margin from property
PanelPadding.
_getSize(data)<param name="data" type="Object" optional="true" mayBeNull="true">Value of size</param>
<returns type="String" />
Calculate size for the style.width and style.height attributes of a DomElement.
_setSize(el)<param name="el" type="Sys.UI.DomElement" optional="false" mayBeNull="false">A DomElement for setting size</param>
Set size of the element in the parameter.
_createPanelHead(el)<param name="el" type="Sys.UI.DomElement" optional="false" mayBeNull="false">A DomElement for panel content</param>
<returns type="Sys.UI.DomElement" />
Create a bootstrap style head
Screenshot

