![]() |
Framework
3.9
|
The ExpandingList class provides a simple User Interface control to allow the display of list items by heading. More...
Public Member Functions | |
ExpandingList ($items, $id="expanding_list", $titleFormat=null, $bodyFormat=null, $dynamicLoad=false) | |
Creates a new ExpandingList control. More... | |
writeScript () | |
Writes the supporting Javascript for an expanding list control. More... | |
drawList () | |
Generates the HTML for the expanding list. More... | |
drawGroupedList () | |
Draws a set of grouped expanding lists. More... | |
Public Attributes | |
$items | |
The items to be displayed in the list. More... | |
$id | |
The HTML id of the list. More... | |
$titleFormat | |
The formatter used to display the list item titles (either a format string or a callback function or method) More... | |
$bodyFormat | |
The formatter used to display the list item bodies (either a format string or a callback function or method) More... | |
$CSSclass = "expanding_list" | |
CSS class(es) to be applied to the list. More... | |
$styles = null | |
Specific CSS styles to be applied to the list. More... | |
$emptyMessage = "No items in the list" | |
Message to display when the list is empty. More... | |
$groupTag = "h4" | |
Grouping tag type. More... | |
$grouped = false | |
Flag indicating whether list should be grouped. More... | |
$dynamicLoad = false | |
Flag indicating whether list should load content on demand. If set to true, bodyFormat should provide the URL for each item. More... | |
$titleIDFormat = null | |
Format template for title ID field. More... | |
$bodyIDFormat = null | |
Format template for body ID field. More... | |
$scrollOnExpand = false | |
Flag indicating whether to scroll the expanding item to the top of the screen. More... | |
$scrollOffset = 0 | |
Offset from top of element when scrolling (to take into account fixed navigation bars, etc) More... | |
$isItemExpanded = null | |
Callback hook to determine if an item should be shown expanded by default. Callback is passed the item and current index. Return true for expanded, false for collapsed. More... | |
$onItemStart = null | |
Callback hook called when starting to display each item. Return false to skip the item. More... | |
$mode = "accordion" | |
The expansion mode for the list - set to "accordion" to have only one item open at a time. More... | |
The ExpandingList class provides a simple User Interface control to allow the display of list items by heading.
Clicking on a heading expands the body for that list item..
Definition at line 43 of file expanding_list.inc.
ExpandingList::drawGroupedList | ( | ) |
Draws a set of grouped expanding lists.
Definition at line 247 of file expanding_list.inc.
ExpandingList::drawList | ( | ) |
Generates the HTML for the expanding list.
Definition at line 164 of file expanding_list.inc.
ExpandingList::ExpandingList | ( | $items, | |
$id = "expanding_list" , |
|||
$titleFormat = null , |
|||
$bodyFormat = null , |
|||
$dynamicLoad = false |
|||
) |
Creates a new ExpandingList control.
array | $items | the array of DataItems to be displayed in the list |
string | $id | the HTML id of the list |
mixed | $titleFormat | The formatter used to display the list item titles (either a format string or a callback function or method) |
mixes | $bodyFormat | The formatter used to display the list item bodies (either a format string or a callback function or method) |
boolean | $dynamicLoad | Specifies whether to load the contents of each list element on demand. If set to true, the $bodyFormat parameter should provide the URL for each item |
Definition at line 71 of file expanding_list.inc.
ExpandingList::writeScript | ( | ) |
Writes the supporting Javascript for an expanding list control.
Definition at line 84 of file expanding_list.inc.
ExpandingList::$bodyFormat |
The formatter used to display the list item bodies (either a format string or a callback function or method)
Definition at line 48 of file expanding_list.inc.
ExpandingList::$bodyIDFormat = null |
Format template for body ID field.
Definition at line 56 of file expanding_list.inc.
ExpandingList::$CSSclass = "expanding_list" |
CSS class(es) to be applied to the list.
Definition at line 49 of file expanding_list.inc.
ExpandingList::$dynamicLoad = false |
Flag indicating whether list should load content on demand. If set to true, bodyFormat should provide the URL for each item.
Definition at line 54 of file expanding_list.inc.
ExpandingList::$emptyMessage = "No items in the list" |
Message to display when the list is empty.
Definition at line 51 of file expanding_list.inc.
ExpandingList::$grouped = false |
Flag indicating whether list should be grouped.
Definition at line 53 of file expanding_list.inc.
ExpandingList::$groupTag = "h4" |
Grouping tag type.
Definition at line 52 of file expanding_list.inc.
ExpandingList::$id |
The HTML id of the list.
Definition at line 46 of file expanding_list.inc.
ExpandingList::$isItemExpanded = null |
Callback hook to determine if an item should be shown expanded by default. Callback is passed the item and current index. Return true for expanded, false for collapsed.
Definition at line 59 of file expanding_list.inc.
ExpandingList::$items |
The items to be displayed in the list.
Definition at line 45 of file expanding_list.inc.
ExpandingList::$mode = "accordion" |
The expansion mode for the list - set to "accordion" to have only one item open at a time.
Definition at line 61 of file expanding_list.inc.
ExpandingList::$onItemStart = null |
Callback hook called when starting to display each item. Return false to skip the item.
Definition at line 60 of file expanding_list.inc.
ExpandingList::$scrollOffset = 0 |
Offset from top of element when scrolling (to take into account fixed navigation bars, etc)
Definition at line 58 of file expanding_list.inc.
ExpandingList::$scrollOnExpand = false |
Flag indicating whether to scroll the expanding item to the top of the screen.
Definition at line 57 of file expanding_list.inc.
ExpandingList::$styles = null |
Specific CSS styles to be applied to the list.
Definition at line 50 of file expanding_list.inc.
ExpandingList::$titleFormat |
The formatter used to display the list item titles (either a format string or a callback function or method)
Definition at line 47 of file expanding_list.inc.
ExpandingList::$titleIDFormat = null |
Format template for title ID field.
Definition at line 55 of file expanding_list.inc.