[Elements] are optional
Defined in
Widget/NewsSlide/0.1/lib.js
Class SAPO.Widget.NewsSlide
class
SAPO.Widget.NewsSlide
Inclusion link: http://js.sapo.pt/SAPO/Widget/NewsSlide/0.1/
Sample: http://js.sapo.pt/SAPO/Widget/NewsSlide/sample/
Constructor Summary
prototype
([Object
options])
Widget constructor
Function Summary
_addCss()
add to head css stylesheet for widget
constructs DOM Elements that will contain the Widget
_getData
(Object
json)
_loading()
display loading message while fetching feed
_parseNews
(Object
news)
reloads the feed
_timeout()
displays error message on timeout
_writeContent
(Object
aData)
debug()
debug stuff
init()
constructor alias
Constructor Details
constructor prototype
prototype([Object
options])
Widget constructor
Parameters:
[options]
-
[ String channel ]- feed channel -
[ String target ]- DOM Element that will contain the widget -
[ Boolean showImage ]- display thumbnail from the News -
[ Number numItems ]- number of news to display -
[ String jsonUrl ]- feed url -
[ String cssURI ]- css url -
[ String thumbsUrl ]- url to generate the thumbs -
[ String noThumbUrl ]- image to display when no image is associated to the news -
[ Number thumbWidth ]- thumb width -
[ Number thumbHeight ]- thumb height -
[ Number reload ]- minutes interval to reload the widget
Function Details
function _addCss
_addCss()
add to head css stylesheet for widget
function _buildSkeleton
_buildSkeleton()
constructs DOM Elements that will contain the Widget
function _getData
_getData(Object
json)
Parameters:
json
- json object from the feed
Executed when the feed is fetched correctly function _loading
_loading()
display loading message while fetching feed
function _parseNews
_parseNews(Object
news)
Parameters:
news
- news json object
Generates DOM to display each news function _reloadFeed
_reloadFeed()
reloads the feed
function _timeout
_timeout()
displays error message on timeout
function _writeContent
_writeContent(Object
aData)
Parameters:
aData
Populates the container for each pane in SimpleSlide function debug
debug()
debug stuff
function init
init()
constructor alias
requires SAPO.Widget.SimpleSlide 1.0
requires SAPO.Communication.Syndication