Author: scottbw
Date: Thu Jan 12 12:40:26 2012
New Revision: 1230505

URL: http://svn.apache.org/viewvc?rev=1230505&view=rev
Log:
Updated the Browse test widget (twitter) to work with the new simplified 
template system. Seems to work OK, apart from Search which Twitter can't 
provide using  the same format as its GET service, which is a bit weird.

Added:
    
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/item_template.html
Removed:
    
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/content_primary.html
    
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/detail2html.xsl
    
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/index2html.xsl
Modified:
    
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/widget.properties

Added: 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/item_template.html
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/item_template.html?rev=1230505&view=auto
==============================================================================
--- 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/item_template.html
 (added)
+++ 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/item_template.html
 Thu Jan 12 12:40:26 2012
@@ -0,0 +1,13 @@
+
+<p class='clear'>
+<div class='thumbnail'><img alt='Avatar for tweet author' 
src='${PROFILE_IMAGE_URL}'></img></div>
+<p>${NAME} (${SCREEN_NAME})</p>
+<p>${CREATED_AT}</p>
+</p>
+
+
+
+
+
+
+

Modified: 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/widget.properties
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/widget.properties?rev=1230505&r1=1230504&r2=1230505&view=diff
==============================================================================
--- 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/widget.properties
 (original)
+++ 
incubator/wookie/trunk/widgets/templates/testWidgets/browseTestWidget/widget.properties
 Thu Jan 12 12:40:26 2012
@@ -4,6 +4,21 @@ widget.name=Browse Test Widget (Browse T
 widget.description=This is a demonstration of the browse interface. It pulls 
the latest Tweets from the Twitter public timeline.
 widget.help=<p>Initially this widget displays the most recent tweets in the 
Twitter timeline.</p> <p>You can expand the search form and enter a search term 
to search for the most recent tweets containing a given search query.</p>
 
+browse.item.name="status"
 browse.index.url="http://api.twitter.com/1/statuses/public_timeline.xml";
 browse.search.url="http://search.twitter.com/search.atom?q="; + query + 
"&rpp=10&include_entities=true&with_twitter_user_id=true&result_type=mixed"
-browse.get.detail.url="http://api.twitter.com/1/statuses/show.xml?id="; + 
itemId + "&include_entities=true"
\ No newline at end of file
+browse.get.detail.url="http://api.twitter.com/1/statuses/show.xml?id="; + 
itemId + "&include_entities=true"
+
+#
+# The template string to use for item summaries, representing a single record 
but before
+# the item detail has been retrieved
+#
+# type: string
+#
+browse.item.summary.template = <div class='result' data-role='collapsible' 
wid='${ID}'><h3>${TEXT}</h3><div class='detail'></div></div>
+
+#
+# The names of the elements to map into the template placeholders. E.g. if it 
contains "title", then $TITLE in the template 
+# would be replaced by the content of the <title> element in the XML data
+#
+browse.item.elements = 
"id,name,screen_name,text,profile_image_url,created_at,source"


Reply via email to