Author: tyrell
Date: Sun Jan 13 18:35:03 2008
New Revision: 12174
Log:
Fixing MASHUP-417
Modified:
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.resources/www/index.html
Modified: trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
==============================================================================
--- trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js (original)
+++ trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js Sun Jan 13
18:35:03 2008
@@ -103,13 +103,6 @@
mashupFeed.description = "The Top 20 tomato rated movies in theaters.";
mashupFeed.link = "hosted-" + mode + "-mashup-feed.xml";
- //Clonning the feed to be hosted as an RSS feed @ TomatoTube. This
feed will have descriptions without CDATA wrapping
- var hostedFeed = new Feed();
- hostedFeed.feedType = "rss_2.0";
- hostedFeed.title = "TomatoTube - A Mashup of Rotten Tomatoes and
YouTube";
- hostedFeed.description = "The Top 20 tomato rated movies in theaters.";
- hostedFeed.link = "hosted-" + mode + "-mashup-feed.xml";
-
if (feedEntries.length > 0) {
//Processing only the Top 10 results
for (var x = 0; x < 10; x++) {
@@ -138,11 +131,8 @@
var description = feedEntries[x].description
description = description + "<br><br>Here's a teaser
from YouTube;<br><br>" + embedLink;
- //Adding description without CDATA to the hosted feed
- var hostedFeedDescription = description;
-
//Wrapping with CDATA tags for transport
- description = "<![CDATA[" + description + "]]>";
+ description = description;
//Creating the new entry for the live feed
var newEntry = new Entry();
@@ -152,14 +142,6 @@
mashupFeed.insertEntry(newEntry);
- //Cloning the new entry and adding non CDATA wrapped
description to it. Adding this to the hosted feed.
- var newHostedEntry = new Entry();
- newHostedEntry.title = feedEntries[x].title;
- newHostedEntry.link = new
String(feedEntries[x].link[0]);
- newHostedEntry.description = hostedFeedDescription;
-
- hostedFeed.insertEntry(newHostedEntry);
-
}
}
@@ -169,8 +151,8 @@
//Writing the newly created live feed to a temporary file
mashupFeed.writeTo("temp-" + mode + "-mashup-feed.xml");
- //Writing the newly created hosted feed to a temporary file
- hostedFeed.writeTo("temp-hosted-" + mode + "-mashup-feed.xml");
+ //Clonning the feed to be hosted as an RSS feed @ TomatoTube.
+ mashupFeed.writeTo("temp-hosted-" + mode + "-mashup-feed.xml");
} catch(ex) {
logMessage(ex, "error");
Modified:
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.resources/www/index.html
==============================================================================
---
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.resources/www/index.html
(original)
+++
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.resources/www/index.html
Sun Jan 13 18:35:03 2008
@@ -24,7 +24,7 @@
<link rel="stylesheet" type="text/css" href="tomato-tube.css">
<script type="text/javascript" src="/js/wso2/WSRequest.js"></script>
- <script type="text/javascript" src="../TomatoTube?stub"></script>
+ <script type="text/javascript" src="../tomatoTube?stub"></script>
<script type="text/javascript" language="javascript">
function getData() {
@@ -34,11 +34,11 @@
var mode = document.getElementById("mode").value;
- TomatoTube.readTomatoTubeFeed.onError = handleError;
- TomatoTube.readTomatoTubeFeed.callback = function (userdata) {
+ tomatoTube.readTomatoTubeFeed.onError = handleError;
+ tomatoTube.readTomatoTubeFeed.callback = function (userdata) {
fillData(userdata);
}
- TomatoTube.readTomatoTubeFeed(mode);
+ tomatoTube.readTomatoTubeFeed(mode);
}
function handleError(error) {
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev