Class: RestaurantsNearLocation

MobileAge.Component.List.RestaurantsNearLocation(dom, options)

Specific List Component TODO: DO

Constructor

new RestaurantsNearLocation(dom, options)

Class representing a specific component for demonstration purpose.
Parameters:
Name Type Description
dom string Id, css-query or a ElementNode to connect to.
options Object
Properties
Name Type Attributes Default Description
templateList String <optional>
<div><h4>Restaurants nearby:</h4><ul><%%></ul></div> HTML template used for the list element. The template must include the anonym placeholder "<%%>", which will be filled with the resulted list items.
templateListItem String <optional>
<li><a href='<%url%>'><%title%></a></li> HTML template used for every single list item. The template must include placeholders, which will be filled with the requested data. If the response data is an one-dimensional array, the template must used the anonym placeholder "<%%>". If the response data is an associative array, the template must used named placeholder like "<%name%>", where "name" is the index of the response array.
autorequest Boolean <optional>
true Indicates if the first request should be sended during the initialisation of the list.
dataLimit String <optional>
"" Limits the printed list items to the stated amount
clientFiltering String <optional>
"" Indicates if the first results should be filtered after they are recieved and before they are printed.
onTemplateListItem function <optional>
"" Callback-function called every time before list item will be printed. The functions parameter "data" contains the data assosiated with the item. The callback-funktion should return a template string.
onDataItem function <optional>
"" Callback-function called every time when the data for a list item should be prepared. The functions parameter "data" contains the data assosiated with the actual item. The callback-funktion should return a associative array representing the item's data. (default: null)
onSelect function <optional>
"" Callback-function called, when a list item is selected by touch, mouse-click or keyboard selection.
Source:

Extends