shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lind...@apache.org
Subject svn commit: r1148651 [1/2] - in /shindig/trunk: content/container/ content/samplecontainer/ content/samplecontainer/examples/ActivityStreams/ content/samplecontainer/examples/commoncontainer/ content/samplecontainer/examples/conservcontainer/ content/s...
Date Wed, 20 Jul 2011 08:42:12 GMT
Author: lindner
Date: Wed Jul 20 08:42:09 2011
New Revision: 1148651

URL: http://svn.apache.org/viewvc?rev=1148651&view=rev
Log:
fixjsstyle fixes, spacing fixes

Modified:
    shindig/trunk/content/container/rpctest_perf.js
    shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamsRender.js
    shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
    shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js
    shindig/trunk/content/samplecontainer/examples/commoncontainer/layout.js
    shindig/trunk/content/samplecontainer/examples/commoncontainer/search.js
    shindig/trunk/content/samplecontainer/examples/commoncontainer/viewController.js
    shindig/trunk/content/samplecontainer/examples/conservcontainer/ConServContainer.js
    shindig/trunk/content/samplecontainer/examples/conservcontainer/layout.js
    shindig/trunk/content/samplecontainer/examples/conservcontainer/viewController.js
    shindig/trunk/content/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml
    shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js
    shindig/trunk/content/samplecontainer/examples/embeddedexperiences/PhotoList.xml
    shindig/trunk/content/samplecontainer/examples/media/MediaUI.js
    shindig/trunk/content/samplecontainer/examples/media/Social.js
    shindig/trunk/content/samplecontainer/examples/rewriter/rewriter1.js
    shindig/trunk/content/samplecontainer/examples/rewriter/rewriter2.js
    shindig/trunk/content/samplecontainer/samplecontainer.js
    shindig/trunk/features/src/main/javascript/features/container.gadget/gadget_holder.js
    shindig/trunk/features/src/main/javascript/features/container.gadget/gadget_site.js
    shindig/trunk/features/src/main/javascript/features/container.url/url_holder.js
    shindig/trunk/features/src/main/javascript/features/container.url/url_site.js
    shindig/trunk/features/src/main/javascript/features/container.util/constant.js
    shindig/trunk/features/src/main/javascript/features/container.util/util.js
    shindig/trunk/features/src/main/javascript/features/container/container.js
    shindig/trunk/features/src/main/javascript/features/container/service.js
    shindig/trunk/features/src/main/javascript/features/core.util/util.js
    shindig/trunk/features/src/main/javascript/features/gadgets.json.ext/json-xmltojson.js
    shindig/trunk/features/src/main/javascript/features/shindig.sha1/sha1.js
    shindig/trunk/features/src/main/javascript/features/views/views.js
    shindig/trunk/features/src/test/javascript/features/embeddedexperiences/embedded_experiences_container_test.js
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryAtomId.xml
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryAtomIds.xml
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlId.xml
    shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlIds.xml

Modified: shindig/trunk/content/container/rpctest_perf.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/rpctest_perf.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/container/rpctest_perf.js (original)
+++ shindig/trunk/content/container/rpctest_perf.js Wed Jul 20 08:42:09 2011
@@ -25,7 +25,7 @@ function perfService(message) {
     perfStats.firstMsg = message; // stored since it has "real" start time
   }
   perfStats.bytesReceived += message.length;
-};
+}
 
 function clearPerfStats(inOrOut) {
   perfStats = {
@@ -34,11 +34,11 @@ function clearPerfStats(inOrOut) {
     firstMsg: null
   };
 
-  document.getElementById("in_or_out").innerHTML = inOrOut;
+  document.getElementById('in_or_out').innerHTML = inOrOut;
 
   // hide results fields
-  document.getElementById("results").style.display = "none";
-};
+  document.getElementById('results').style.display = 'none';
+}
 
 function completePerfStats() {
   perfStats.timeEnded = new Date().getTime();
@@ -49,36 +49,36 @@ function completePerfStats() {
   var timeUsedMs = perfStats.timeEnded - perfStats.timeStarted;
 
   // fill in fields
-  document.getElementById("results_num_received").innerHTML = perfStats.numResults;
-  document.getElementById("results_bytes_received").innerHTML = perfStats.bytesReceived;
-  document.getElementById("results_time_used").innerHTML = timeUsedMs + "ms";
-  document.getElementById("results_msgs_per_sec").innerHTML = (perfStats.numResults / (timeUsedMs / 1000));
-  document.getElementById("results_bytes_per_sec").innerHTML = (perfStats.bytesReceived / (timeUsedMs / 1000));
-  document.getElementById("results_referrer").innerHTML = (this['referer'] || "n/a") + " -- config: " +
-      (gadgets.config.get("rpc")["passReferrer"] || "<empty>");
-  document.getElementById("test_running").style.display = "none";
-  document.getElementById("results").style.display = "";
-};
+  document.getElementById('results_num_received').innerHTML = perfStats.numResults;
+  document.getElementById('results_bytes_received').innerHTML = perfStats.bytesReceived;
+  document.getElementById('results_time_used').innerHTML = timeUsedMs + 'ms';
+  document.getElementById('results_msgs_per_sec').innerHTML = (perfStats.numResults / (timeUsedMs / 1000));
+  document.getElementById('results_bytes_per_sec').innerHTML = (perfStats.bytesReceived / (timeUsedMs / 1000));
+  document.getElementById('results_referrer').innerHTML = (this['referer'] || 'n/a') + ' -- config: ' +
+      (gadgets.config.get('rpc')['passReferrer'] || '<empty>');
+  document.getElementById('test_running').style.display = 'none';
+  document.getElementById('results').style.display = '';
+}
 
 function syncCallbackService(toEcho) {
   return toEcho;
-};
+}
 
 function asyncCallbackService(toEcho) {
   var self = this;
   window.setTimeout(function() {
     self.callback(toEcho);
   }, 0);
-};
+}
 
 function initPerfTest() {
   clearPerfStats();
-  gadgets.rpc.register("perf_service", perfService);
-  gadgets.rpc.register("clear_perf_stats", clearPerfStats);
-  gadgets.rpc.register("complete_perf_stats", completePerfStats);
-  gadgets.rpc.register("sync_callback_service", syncCallbackService);
-  gadgets.rpc.register("async_callback_service", asyncCallbackService);
-};
+  gadgets.rpc.register('perf_service', perfService);
+  gadgets.rpc.register('clear_perf_stats', clearPerfStats);
+  gadgets.rpc.register('complete_perf_stats', completePerfStats);
+  gadgets.rpc.register('sync_callback_service', syncCallbackService);
+  gadgets.rpc.register('async_callback_service', asyncCallbackService);
+}
 
 var alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _-*&(){}'";
 
@@ -89,22 +89,22 @@ function sendPerfMessage() {
     msgToSend = nowString + currentRun.msg.substring(nowString.length);
   }
 
-  gadgets.rpc.call(currentRun.targetId, "perf_service", null, msgToSend);
+  gadgets.rpc.call(currentRun.targetId, 'perf_service', null, msgToSend);
   if (currentRun.curMsgId < currentRun.endMsgId) {
     // loop, giving up execution in case rpc technique demands it
     window.setTimeout(sendPerfMessage, 0);
   } else {
     // send finisher
-    window.setTimeout(function() { gadgets.rpc.call(currentRun.targetId, "complete_perf_stats", null); }, 0);
+    window.setTimeout(function() { gadgets.rpc.call(currentRun.targetId, 'complete_perf_stats', null); }, 0);
   }
-};
+}
 
 function runPerfTest(targetId) {
-  document.getElementById("test_running").style.display = "";
+  document.getElementById('test_running').style.display = '';
 
   // initialize the current run
-  var num_msgs = document.getElementById("num_msgs").value;
-  var msg_size = document.getElementById("msg_size").value;
+  var num_msgs = document.getElementById('num_msgs').value;
+  var msg_size = document.getElementById('msg_size').value;
 
   currentRun.targetId = targetId;
   currentRun.curMsgId = 0;
@@ -117,21 +117,21 @@ function runPerfTest(targetId) {
   currentRun.msg = msg.join('');
 
   // clear local perf stats
-  clearPerfStats("(outbound)");
+  clearPerfStats('(outbound)');
 
   // clear target perf stats
-  gadgets.rpc.call(targetId, "clear_perf_stats", null, "(inbound)");
+  gadgets.rpc.call(targetId, 'clear_perf_stats', null, '(inbound)');
 
   // kick off the send loop
   sendPerfMessage();
-};
+}
 
 function runCallbackTest(targetId, isSync) {
-  document.getElementById("echo_test_result").innerHTML = "";
-  var service = (isSync ? "" : "a") + "sync_callback_service";
-  var echoValue = document.getElementById("echo_test_input").value;
+  document.getElementById('echo_test_result').innerHTML = '';
+  var service = (isSync ? '' : 'a') + 'sync_callback_service';
+  var echoValue = document.getElementById('echo_test_input').value;
   var callback = function(response) {
-    document.getElementById("echo_test_result").innerHTML = response + " at " + new Date().toUTCString() + " from referer: " + this['referer'];
+    document.getElementById('echo_test_result').innerHTML = response + ' at ' + new Date().toUTCString() + ' from referer: ' + this['referer'];
   };
   gadgets.rpc.call(targetId, service, callback, echoValue);
-};
+}

Modified: shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamsRender.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamsRender.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamsRender.js (original)
+++ shindig/trunk/content/samplecontainer/examples/ActivityStreams/ActivityStreamsRender.js Wed Jul 20 08:42:09 2011
@@ -20,7 +20,7 @@ function ActivityStreamsRender() {
 
 	// Private member that wraps the OpenSocial API
 	var social = new OpenSocialWrapper();
-	
+
 	// =================== PUBLIC ====================
 
 	// Renders the welcome text (viewer, owner, and friends)
@@ -30,46 +30,46 @@ function ActivityStreamsRender() {
 			owner = response.owner;
 			var viewerFriends = response.viewerFriends;
 			var ownerFriends = response.ownerFriends;
-			
-			var html = "<h1>Welcome " + viewer.name.formatted + "!</h1>";
-			html += "You are viewing " + owner.name.formatted + "'s data. <br><br>";
-			html += "Here is a list of your friends: <br>";
-			html += "<lu>";
-			for(i = 0; i < viewerFriends.list.length; i++) {
-				html += "<li>" + viewerFriends.list[i].name.formatted + "</li>";
+
+			var html = '<h1>Welcome ' + viewer.name.formatted + '!</h1>';
+			html += 'You are viewing ' + owner.name.formatted + "'s data. <br><br>";
+			html += 'Here is a list of your friends: <br>';
+			html += '<lu>';
+			for (i = 0; i < viewerFriends.list.length; i++) {
+				html += '<li>' + viewerFriends.list[i].name.formatted + '</li>';
 			}
-			html += "</lu>";
+			html += '</lu>';
 			document.getElementById(div).innerHTML = html;
 			callback();
 		});
 	}
-	
+
 	// Renders the activities
 	this.renderActivities = function(div, callback) {
 		social.loadActivities(function(response) {
 			var viewerActivities = response.viewerActivities.list;
 			var ownerActivities = response.ownerActivities.list;
 			var friendActivities = response.friendActivities.list;
-			
-			var html = "<h1>Activities</h1>";
-			html += "Demonstrates use of the Activities service in Apache Shindig.  The ActivityStreams service does not interfere with this service.<br><br>";
-			html += "Activities for you and " + owner.name.formatted + ":<br>";
+
+			var html = '<h1>Activities</h1>';
+			html += 'Demonstrates use of the Activities service in Apache Shindig.  The ActivityStreams service does not interfere with this service.<br><br>';
+			html += 'Activities for you and ' + owner.name.formatted + ':<br>';
 			html += "<table border='1'>";
-			html += "<tr>";
-			html += "<td>Name</td>";
-			html += "<td>Title</td>";
-			html += "<td>Body</td>";
-			html += "<td>Images</td>";
-			html += "</tr>"
+			html += '<tr>';
+			html += '<td>Name</td>';
+			html += '<td>Title</td>';
+			html += '<td>Body</td>';
+			html += '<td>Images</td>';
+			html += '</tr>';
 			html += processActivities(viewerActivities);
 			html += processActivities(ownerActivities);
 			html += processActivities(friendActivities);
-			html += "</table>";
+			html += '</table>';
 			document.getElementById(div).innerHTML = html;
 			callback();
 		});
 	}
-	
+
 	// Renders activity entries
 	this.renderActivityEntries = function(div, callback) {
 		social.loadActivityEntries(function(response) {
@@ -77,58 +77,58 @@ function ActivityStreamsRender() {
 			viewerEntries = response.viewerEntries.list;
 			//ownerEntries = response.ownerEntries.list;
 			//friendEntries = response.friendEntries.list;
-			html = "<h2>ActivityEntries</h2>";
+			html = '<h2>ActivityEntries</h2>';
 			html += processActivityEntries(viewerEntries);
 			//html += processActivityEntries(ownerEntries);
 			//html += processActivityEntries(friendEntries);
 			if (viewerEntries.length == 0) {
-				html += "<tr><td>No entries to show!</td></tr>";
+				html += '<tr><td>No entries to show!</td></tr>';
 			}
-			html += "</table><br><br>";
+			html += '</table><br><br>';
 			document.getElementById(div).innerHTML = html;
 			callback();
 		});
 	}
-	
+
 	// ================== PRIVATE =====================
-	
+
 	// Processes activities and returns the rendered HTML
 	function processActivities(activities) {
 		var html = '';
-		for(idx = 0; idx < activities.length; idx++) {
-			html += "<tr>";
-			html += "<td>" + activities[idx].userId + "</td>";
-			html += "<td>" + activities[idx].title + "</td>";
-			html += "<td>" + activities[idx].body + "</td>";
+		for (idx = 0; idx < activities.length; idx++) {
+			html += '<tr>';
+			html += '<td>' + activities[idx].userId + '</td>';
+			html += '<td>' + activities[idx].title + '</td>';
+			html += '<td>' + activities[idx].body + '</td>';
 			var mediaItems = activities[idx].mediaItems;
-			if(mediaItems != null) {
-				for(itemIdx = 0; itemIdx < mediaItems.length; itemIdx++) {
-					if(mediaItems[itemIdx].type == "image") {
+			if (mediaItems != null) {
+				for (itemIdx = 0; itemIdx < mediaItems.length; itemIdx++) {
+					if (mediaItems[itemIdx].type == 'image') {
 						html += "<td><img src='" + mediaItems[itemIdx].url + "' width=150 height=150/></td>";
 					}
 				}
 			}
-			html += "</tr>";
+			html += '</tr>';
 		}
 		return html;
 	}
-	
+
 	// Processes activity entries and returns the rendered HTML
 	function processActivityEntries(entries) {
 		var html = '';
-		for(idx = 0; idx < entries.length; idx++) {
-			if(entries[idx].object.url && entries[idx].object.url != "null") {
-				html += "<h3><a href='" + entries[idx].object.url + "'>" + entries[idx].title + "</a></h3>";
+		for (idx = 0; idx < entries.length; idx++) {
+			if (entries[idx].object.url && entries[idx].object.url != 'null') {
+				html += "<h3><a href='" + entries[idx].object.url + "'>" + entries[idx].title + '</a></h3>';
 			} else {
-				html += "<h3>" + entries[idx].title + "</h3>";
+				html += '<h3>' + entries[idx].title + '</h3>';
 			}
-			html += "ID: " + entries[idx].id + "<br>";
-			html += "Actor: " + entries[idx].actor.displayName + "<br>";
-			html += "Posted: " + entries[idx].published + "<br>";
-			if(entries[idx].content && entries[idx].content != "null") {
-				html += "Content: " + entries[idx].content + "<br>";
+			html += 'ID: ' + entries[idx].id + '<br>';
+			html += 'Actor: ' + entries[idx].actor.displayName + '<br>';
+			html += 'Posted: ' + entries[idx].published + '<br>';
+			if (entries[idx].content && entries[idx].content != 'null') {
+				html += 'Content: ' + entries[idx].content + '<br>';
 			}
 		}
 		return html;
 	}
-}
\ No newline at end of file
+}

Modified: shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js (original)
+++ shindig/trunk/content/samplecontainer/examples/ActivityStreams/OpenSocialWrapper.js Wed Jul 20 08:42:09 2011
@@ -17,14 +17,14 @@
  */
 
 function OpenSocialWrapper() {
-	
+
 	// =============================== PEOPLE ===============================
-	
+
 	/*
 	 * Loads the owner, the viewer, the owner's friends, and the viewer's
 	 * friends.  Response data is put into the variables owner, viewer,
 	 * ownerFriends, and viewerFriends, respectively.
-	 * 
+	 *
 	 * @param callback is the function to return the response to
 	 */
 	this.loadPeople = function(callback) {
@@ -35,15 +35,15 @@ function OpenSocialWrapper() {
 		batch.add('ownerFriends', osapi.people.getOwnerFriends());
 		batch.execute(callback);
 	}
-	
+
 	this.loadViewerFriends = function(callback) {
 		osapi.people.getViewerFriends().execute(callback);
 	}
-	
+
 	this.loadOwnerFriends = function(callback) {
 		osapi.people.getOwnerFriends().execute(callback);
 	}
-	
+
 	// ========================= ACTIVITIES =============================
 	this.loadActivities = function(callback) {
 		var batch = osapi.newBatch();
@@ -52,23 +52,23 @@ function OpenSocialWrapper() {
 		batch.add('friendActivities', osapi.activities.get({userId: '@viewer', groupId: '@friend'}));
 		batch.execute(callback);
 	}
-	
+
 	this.loadViewerActivities = function(callback) {
 		var req = osapi.activities.get({userId: '@viewer', groupId: '@self'});
 		req.execute(callback);
 	}
-	
+
 	this.loadViewerFriendsActivities = function(callback) {
 		var req = osapi.activities.get({userId: '@viewer', groupId: '@friends'});
 		req.execute(this.onLoadActivitiesFriends);
 	}
-	
+
 	this.loadOwnerActivities = function(callback) {
 		var req = osapi.activities.get({userId: '@owner', groupId: '@self'});
 		req.execute(callback);
 	}
 
-	
+
 	// ========================= ACTIVITY STREAMS =============================
 	this.loadActivityEntries = function(callback) {
 		var batch = osapi.newBatch();
@@ -77,24 +77,24 @@ function OpenSocialWrapper() {
 		//batch.add('friendEntries', osapi.activitystreams.get({userId: '@viewer', groupId: '@friend'}));
 		batch.execute(callback);
 	}
-	
+
 	this.loadViewerActivityEntries = function(callback) {
-		var params = {userId: '@viewer', groupId: '@self'}
+		var params = {userId: '@viewer', groupId: '@self'};
 		osapi.activitystreams.get(params).execute(callback);
 	}
-	
+
 	this.loadOwnerActivityEntries = function(callback) {
-		var params = {userId: '@owner', groupId: '@self'}
+		var params = {userId: '@owner', groupId: '@self'};
 		osapi.activitystreams.get(params).execute(callback);
 	}
-	
+
 	this.loadViewerFriendsActivityEntries = function(callback) {
-		var params = {userId: '@viewer', groupId: '@friends'}
+		var params = {userId: '@viewer', groupId: '@friends'};
 		osapi.activitystreams.get(params).execute(callback);
 	}
-	
+
 	this.postActivityEntry = function(title, content, verb, actorId, actorName, objectName, objectSummary,
-									  objectPermalink, objectType, callback) { 
+									  objectPermalink, objectType, callback) {
 		var params = {
 			userId: '@viewer',
 			groupId: '@self',
@@ -115,21 +115,21 @@ function OpenSocialWrapper() {
 					summary: objectSummary
 				}
 			}
-		}
+		};
 		osapi.activitystreams.create(params).execute(callback);
 	}
-	
+
 	this.deleteActivityEntryById = function(activityEntryId, callback) {
 		var params = {
 			userId: '@viewer',
 			groupId: '@self',
 			activityId: activityEntryId
-		}
+		};
 		osapi.activitystreams.delete(params).execute(callback);
 	}
-	
+
 	this.getActivityEntryById = function(activityEntryId, callback) {
 		var params = {activityId: activityEntryId};
 		osapi.activitystreams.get(params).execute(callback);
 	}
-}
\ No newline at end of file
+}

Modified: shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js (original)
+++ shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js Wed Jul 20 08:42:09 2011
@@ -18,14 +18,14 @@
 */
 
 // url base should be <host>:<port>//<contextRoot>
-var urlBase = location.href.substr(0,location.href.indexOf("/samplecontainer/examples/commoncontainer/"));
-var contextRoot = urlBase.substr(urlBase.indexOf(location.port)+location.port.length);
-	
-var testConfig =  testConfig || {};
-testConfig[osapi.container.ServiceConfig.API_PATH] = contextRoot+'/rpc';	
-testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = "1";
+var urlBase = location.href.substr(0, location.href.indexOf('/samplecontainer/examples/commoncontainer/'));
+var contextRoot = urlBase.substr(urlBase.indexOf(location.port) + location.port.length);
 
-//  Create the new CommonContainer 
+var testConfig = testConfig || {};
+testConfig[osapi.container.ServiceConfig.API_PATH] = contextRoot + '/rpc';
+testConfig[osapi.container.ContainerConfig.RENDER_DEBUG] = '1';
+
+//  Create the new CommonContainer
 var CommonContainer = new osapi.container.Container(testConfig);
 
 // Default the security token for the container. Using this example security token requires enabling
@@ -59,46 +59,46 @@ CommonContainer.init = function() {
 
     // Connect to the ManagedHub
     CommonContainer.inlineClient =
-      new OpenAjax.hub.InlineContainer(CommonContainer.managedHub, "container",
+      new OpenAjax.hub.InlineContainer(CommonContainer.managedHub, 'container',
     {
       Container: {
         onSecurityAlert: function(source, alertType) { /* Handle client-side security alerts */ },
-        onConnect: function(container){ /* Called when client connects */ },
-        onDisconnect: function(container){ /* Called when client connects */ }
+        onConnect: function(container) { /* Called when client connects */ },
+        onDisconnect: function(container) { /* Called when client connects */ }
       }
     });
     //connect to the inline client
     CommonContainer.inlineClient.connect();
 
-  } catch(e) {
+  } catch (e) {
     // TODO: error handling should be consistent with other OS gadget initialization error handling
-    alert("ERROR creating or connecting InlineClient in CommonContainer.managedHub [" + e.message + "]");
+    alert('ERROR creating or connecting InlineClient in CommonContainer.managedHub [' + e.message + ']');
   }
 };
 
 //Wrapper function to set the gadget site/id and default width.  Currently have some inconsistency with width actually being set. This
 //seems to be related to the pubsub2 feature.
 CommonContainer.renderGadget = function(gadgetURL, gadgetId) {
-	//going to hardcode these values for width.  
-    var el = document.getElementById("gadget-site-" + gadgetId);
-    var parms ={};
-    parms[osapi.container.RenderParam.WIDTH]="100%";
+	//going to hardcode these values for width.
+    var el = document.getElementById('gadget-site-' + gadgetId);
+    var parms = {};
+    parms[osapi.container.RenderParam.WIDTH] = '100%';
 	var gadgetSite = CommonContainer.newGadgetSite(el);
 	CommonContainer.navigateGadget(gadgetSite, gadgetURL, {}, parms);
 	return gadgetSite;
-  
+
 };
 //TODO:  To be implemented. Identify where to hook this into the page (in the gadget title bar/gadget management, etc)
 CommonContainer.navigateView = function(gadgetSite, gadgetURL, view) {
-	var renderParms ={};
-	if(view===null || view===""){
-		view="default";
+	var renderParms = {};
+	if (view === null || view === '') {
+		view = 'default';
 	}
 	//TODO Evaluate Parms based on configuration
-    renderParms[osapi.container.RenderParam.WIDTH]="100%";
-    renderParms['view']=view;
+    renderParms[osapi.container.RenderParam.WIDTH] = '100%';
+    renderParms['view'] = view;
 
-    CommonContainer.navigateGadget(gadgetSite, gadgetURL, {}, renderParms);	
+    CommonContainer.navigateGadget(gadgetSite, gadgetURL, {}, renderParms);
 };
 
 //TODO:  Add in UI controls in portlet header to remove gadget from the canvas
@@ -108,6 +108,6 @@ CommonContainer.colapseGadget = function
 
 //display the pubsub 2 event details
 function log(message) {
-  document.getElementById("output").innerHTML = gadgets.util.escapeString(message) + "<br/>" + document.getElementById("output").innerHTML;
-};
+  document.getElementById('output').innerHTML = gadgets.util.escapeString(message) + '<br/>' + document.getElementById('output').innerHTML;
+}
 

Modified: shindig/trunk/content/samplecontainer/examples/commoncontainer/layout.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/commoncontainer/layout.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/commoncontainer/layout.js (original)
+++ shindig/trunk/content/samplecontainer/examples/commoncontainer/layout.js Wed Jul 20 08:42:09 2011
@@ -19,78 +19,78 @@
 
  //  Setup the base container objects for managing layout, gadget, and container configuration
 $(function() {
-	
+
 		//TODO:  enable drag and drop with the portlet at some point
-		$(".column").sortable({
+		$('.column').sortable({
 			connectWith: '.column',
-			update:  function(event, ui) {
-					//TODO:  There is an issue with drag & drop 
+			update: function(event, ui) {
+					//TODO:  There is an issue with drag & drop
 		}
 		});
 
-		$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
-			.find(".portlet-header")
-				.addClass("ui-widget-header ui-corner-all")
+		$('.portlet').addClass('ui-widget ui-widget-content ui-helper-clearfix ui-corner-all')
+			.find('.portlet-header')
+				.addClass('ui-widget-header ui-corner-all')
 				.prepend('<span class="ui-icon ui-icon-minusthick"></span>')
 				.end()
-			.find(".portlet-content");
-		$(".portlet-header .ui-icon").click(function() {
-			$(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick");
-			$(this).parents(".portlet:first").find(".portlet-content").toggle();
+			.find('.portlet-content');
+		$('.portlet-header .ui-icon').click(function() {
+			$(this).toggleClass('ui-icon-minusthick').toggleClass('ui-icon-plusthick');
+			$(this).parents('.portlet:first').find('.portlet-content').toggle();
 		});
 
-		$(".column").disableSelection();
+		$('.column').disableSelection();
 	});
-		
+
 	$(function() {
-		$( "#accordion" ).accordion({
+		$('#accordion').accordion({
 			fillSpace: true,
 			collapsible: true
-			
+
 		});
 	});
 	$(function() {
-		$( "#accordionResizer" ).resizable({
+		$('#accordionResizer').resizable({
 			minHeight: 140,
 			resize: function() {
-				$( "#accordion" ).accordion( "resize" );
+				$('#accordion').accordion('resize');
 			}
 		});
 	});
 	$(function() {
-		$( "#accordionEvents" ).accordion({
+		$('#accordionEvents').accordion({
 			fillSpace: true,
 			collapsible: true
-			
+
 		});
 	});
 	$(function() {
-		$( "#accordionResizerEvents" ).resizable({
+		$('#accordionResizerEvents').resizable({
 			minHeight: 140,
 			resize: function() {
-				$( "#accordionEvents" ).accordion( "resize" );
+				$('#accordionEvents').accordion('resize');
 			}
 		});
 	});
 	$(function() {
-		$( "#accordionGadgetControls" ).accordion({
+		$('#accordionGadgetControls').accordion({
 			fillSpace: true,
 			collapsible: true
-			
+
 		});
 	});
 	$(function() {
-		$( "#accordionContainerControls" ).accordion({
+		$('#accordionContainerControls').accordion({
 			fillSpace: true,
 			collapsible: true
-			
+
 		});
 	});
 	$(function() {
-		$( "#accordionResizerControls" ).resizable({
+		$('#accordionResizerControls').resizable({
 			minHeight: 140,
 			resize: function() {
-				$( "#accordionGadgetControls" ).accordion( "resize" );
+				$('#accordionGadgetControls').accordion('resize');
 			}
 		});
 	});

Modified: shindig/trunk/content/samplecontainer/examples/commoncontainer/search.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/commoncontainer/search.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/commoncontainer/search.js (original)
+++ shindig/trunk/content/samplecontainer/examples/commoncontainer/search.js Wed Jul 20 08:42:09 2011
@@ -20,20 +20,20 @@
 var currentEngines = [];
 var templateMap = [];
 /**
- * Helper function to extract create map of new engines, keyed by template url 
- * @param searchURLs template search urls
+ * Helper function to extract create map of new engines, keyed by template url
+ * @param searchURLs template search urls.
  * @param description
- *        opensearch description being added or removed
+ *        opensearch description being added or removed.
  * @param added
  *            true if new description, false if removed.
  */
 extractURLs = function(searchUrls, description, added) {
   var newEngines = [];
   for (var i in searchUrls) {
-    var template = searchUrls[i]["@template"];
+    var template = searchUrls[i]['@template'];
     if (template != null) {
-      var descType = searchUrls[i]["@type"];
-      if (descType == "application/atom+xml") {
+      var descType = searchUrls[i]['@type'];
+      if (descType == 'application/atom+xml') {
         if (added) {
           if (currentEngines[template] == null) {
             newEngines[template] = description.OpenSearchDescription.ShortName;
@@ -56,14 +56,14 @@ extractURLs = function(searchUrls, descr
     }
   }
   return newEngines;
-}
+};
 
 /**
  * Callback passed to the opensearch feature to react to addition/removal of
  * gadgets containing OpenSearch descriptions.
- * 
+ *
  * @param description
- *            opensearch description being added or removed
+ *            opensearch description being added or removed.
  * @param added
  *            true if new description, false if removed.
  */
@@ -78,49 +78,49 @@ updateEngines = function(description, ad
 
   var newEngines = extractURLs(searchUrls, description, added);
 
-  var span = document.getElementById("engineList");
+  var span = document.getElementById('engineList');
   for (templateUrl in newEngines) {
     var current = newEngines[templateUrl];
     span.innerHTML = span.innerHTML
-        + "<input type=\"checkbox\" checked=\"true\" id=\"" + templateUrl
-        + "\" />" + current;
-    span.innerHTML = span.innerHTML + "<br/>";
+        + '<input type=\"checkbox\" checked=\"true\" id=\"' + templateUrl
+        + '\" />' + current;
+    span.innerHTML = span.innerHTML + '<br/>';
     currentEngines[templateUrl] = current;
   }
 
-}
+};
 
 CommonContainer.opensearch.addOpenSearchCallback(updateEngines);
 
 /**
  * Clears old search results, and fetches new ones.
- * 
+ *
  */
 function updateSearchURLs() {
   // clear the old results
   $(function() {
-    $("#results").dialog( {
-      autoOpen : false
+    $('#results').dialog({
+      autoOpen: false
     });
   });
-  $("#results").dialog("option", "minWidth", 1000);
-  $("#results").dialog('open');
+  $('#results').dialog('option', 'minWidth', 1000);
+  $('#results').dialog('open');
   //var div = document.getElementById("results");
   /*while (div.hasChildNodes()) {
     div.removeChild(div.firstChild);
   }*/
-  $("#results").empty();
+  $('#results').empty();
   //div.innerHTML = document.getElementById("query").value;
-  $("#results").innerHTML = document.getElementById("query").value;
+  $('#results').innerHTML = document.getElementById('query').value;
   // fetch new results.
-  getSearchResults(currentEngines, document.getElementById("query").value);
+  getSearchResults(currentEngines, document.getElementById('query').value);
 }
 
 /**
  * Iterates over template urls and fetches search results.
- * 
+ *
  * @param urls
- *            all the opensearch template urls in the container
+ *            all the opensearch template urls in the container.
  * @param query
  *            query string.
  */
@@ -128,56 +128,56 @@ function getSearchResults(urls, query) {
   // callback function to be called by the fetching code.
   /**
    * @param obj
-   *            the result data object, should be XML
+   *            the result data object, should be XML.
    * @param engineTitle
-   *            title of the engine being searched
+   *            title of the engine being searched.
    */
   function urlResponse(obj, engineTitle) {
     // create placeholder for results
-    var su = document.getElementById("results");
-    var resultDiv = document.createElement("div");
+    var su = document.getElementById('results');
+    var resultDiv = document.createElement('div');
     su.appendChild(resultDiv);
     // if there are no errors, parse the results
     if (obj.errors.length == 0) {
-      resultDiv.className = "searchEngine";
+      resultDiv.className = 'searchEngine';
       var domdata = obj.data;
       if (domdata != null) {
-        var entries = domdata.getElementsByTagName("entry");
-        resultDiv.innerHTML = resultDiv.innerHTML + engineTitle + ":<br/>";
+        var entries = domdata.getElementsByTagName('entry');
+        resultDiv.innerHTML = resultDiv.innerHTML + engineTitle + ':<br/>';
         if (entries.legnth == 0) {
-          resultDiv.innerHTML = resultDiv.innerHTML + ("No results found");
+          resultDiv.innerHTML = resultDiv.innerHTML + ('No results found');
         } else {
           var resultCount = entries.length;
           if (resultCount > 15) {
             resultCount = 15;
           }
           for (i = 0; i < resultCount; i++) {
-            if (entries[i].getElementsByTagName("title").length > 0) {
-              titles = entries[i].getElementsByTagName("title")
-              title =  titles[0].childNodes[0].nodeValue;
+            if (entries[i].getElementsByTagName('title').length > 0) {
+              titles = entries[i].getElementsByTagName('title');
+              title = titles[0].childNodes[0].nodeValue;
             } else {
-              title = "Untitled";
+              title = 'Untitled';
             }
             var link = null;
             //for standard atom results, we can extract the link
-            if (entries[i].getElementsByTagName("link").length > 0) {
-              links = entries[i].getElementsByTagName("link");
+            if (entries[i].getElementsByTagName('link').length > 0) {
+              links = entries[i].getElementsByTagName('link');
               link = links[0].attributes.href.nodeValue;
-            } 
-            var summaryNode = entries[i].getElementsByTagName("summary")[0];
+            }
+            var summaryNode = entries[i].getElementsByTagName('summary')[0];
             if (summaryNode == null) {
-              summaryNode = entries[i].getElementsByTagName("description")[0];
+              summaryNode = entries[i].getElementsByTagName('description')[0];
             }
             if (link == null) {
             resultDiv.innerHTML = resultDiv.innerHTML
-                + "<p style=\"color:blue\"/>"
+                + '<p style=\"color:blue\"/>'
                 + gadgets.util.escapeString(title);
             } else {
               resultDiv.innerHTML = resultDiv.innerHTML
-              + "<p style=\"color:blue\"/>"
-              + "<a href=\""+link+"\" target=\"_blank\">"
+              + '<p style=\"color:blue\"/>'
+              + '<a href=\"'+ link + '\" target=\"_blank\">'
               + gadgets.util.escapeString(title)
-              + "</a>";
+              + '</a>';
             }
             if (summaryNode != null) {
               var summary = summaryNode.textContent;
@@ -191,7 +191,7 @@ function getSearchResults(urls, query) {
       }
     } else { // errors occured, notify the user.
       resultDiv.innerHTML = resultDiv.innerHTML + engineTitle
-          + "<br/> An error has occured:" + obj.errors[0];
+          + '<br/> An error has occured:' + obj.errors[0];
     }
   }
   var params = {};
@@ -208,7 +208,7 @@ function getSearchResults(urls, query) {
       var callback = function() {
         var myTitle = '' + title;
         return function(response) {
-          urlResponse(response, myTitle)
+          urlResponse(response, myTitle);
         };
       }();
       // go fetch the results.
@@ -218,4 +218,4 @@ function getSearchResults(urls, query) {
     }
   }
 
-};
+}

Modified: shindig/trunk/content/samplecontainer/examples/commoncontainer/viewController.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/commoncontainer/viewController.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/commoncontainer/viewController.js (original)
+++ shindig/trunk/content/samplecontainer/examples/commoncontainer/viewController.js Wed Jul 20 08:42:09 2011
@@ -17,158 +17,158 @@
  */
 
 $(function() {
-	
+
 	// Input field that contains gadget urls added by the user manually
-	var newGadgetUrl= $( "#gadgetUrl" );
-	
+	var newGadgetUrl = $('#gadgetUrl');
+
 	//  Input fields for container event testing
-	var newEventTopic = $( "#eventTopic" );
-	var newEventPayload = $( "#eventPayload" );
-	
+	var newEventTopic = $('#eventTopic');
+	var newEventPayload = $('#eventPayload');
+
 	// Base html template that is used for the gadget wrapper and site
-	var gadgetTemplate ='<div class="portlet">' +
-				                '<div class="portlet-header">sample to replace</div>'+
+	var gadgetTemplate = '<div class="portlet">' +
+				                '<div class="portlet-header">sample to replace</div>' +
 				                '<div id="gadget-site" class="portlet-content"></div>' +
 	                            '</div>';
-	
+
 	//variable to keep track of gadget current view for collapse and expand gadget actions.
-	var currentView="default";
-	
+	var currentView = 'default';
+
 	// ID used to associate gadget site
 	var curId = 0;
-	
+
 	//  Load the default collections stored and update the options with the collection name
 	$.ajax({
 			url: './gadgetCollections.json',
 			dataType: 'json',
 			success: function(data) {
-			  $.each(data.collections, function(i,data){
+			  $.each(data.collections, function(i,data) {
 				 var optionVal = [];
-				 $.each(data.apps, function(i,data){
-				   if (data.url.indexOf("http") < 0 && data.url.indexOf("/") == 0 ){
-					 optionVal.push(urlBase+data.url);
-				   }else{
+				 $.each(data.apps, function(i,data) {
+				   if (data.url.indexOf('http') < 0 && data.url.indexOf('/') == 0) {
+					 optionVal.push(urlBase + data.url);
+				   }else {
 					 optionVal.push(data.url);
 				   }
 				 });
-			     $('#gadgetCollection').append('<option value="'+ optionVal.toString() + '">' + data.name +'</option>');
+			     $('#gadgetCollection').append('<option value="' + optionVal.toString() + '">' + data.name + '</option>');
 			   });
 			}
-	});	
-	
+	});
+
 	$.ajax({
 		url: './viewsMenu.json',
 		dataType: 'json',
 		success: function(data) {
-		  $.each(data.views, function(i,selection){
-		     $('#viewOptions').append('<option value="'+ selection.value + '">' + selection.name +'</option>');
+		  $.each(data.views, function(i,selection) {
+		     $('#viewOptions').append('<option value="' + selection.value + '">' + selection.name + '</option>');
 		  });
 		}
 	});
-	
+
 	//navigate to the new view and save it as current view
-    navigateView=function(gadgetSite, gadgetURL, toView){
+    navigateView = function(gadgetSite, gadgetURL, toView) {
     	//save the current view for collapse, expand gadget
     	currentView = toView;
-    	CommonContainer.navigateView(gadgetSite,gadgetURL,toView); 
+    	CommonContainer.navigateView(gadgetSite, gadgetURL, toView);
     };
-    
+
     //handle gadget collapse, expand, and remove gadget actions
-    handleNavigateAction=function(portlet,gadgetSite,gadgetURL,actionId){
+    handleNavigateAction = function(portlet,gadgetSite,gadgetURL,actionId) {
 		 //remove button was click, remove the portlet/gadget
-		 if(actionId==="remove"){
-			if(confirm('This gadget will be removed, ok?')) { 
+		 if (actionId === 'remove') {
+			if (confirm('This gadget will be removed, ok?')) {
 			  portlet.remove();
-		    }						 
-		 }else if (actionId==="expand" ){
+		    }
+		 }else if (actionId === 'expand') {
 			//navigate to currentView prior to colapse gadget
-			CommonContainer.navigateView(gadgetSite,gadgetURL,currentView); 
-	     }else if (actionId==="collapse"){
+			CommonContainer.navigateView(gadgetSite, gadgetURL, currentView);
+	     }else if (actionId === 'collapse') {
 	    	CommonContainer.colapseGadget(gadgetSite);
-		 }		
+		 }
     };
-    
+
     //create a gadget with navigation tool bar header enabling gadget collapse, expand, remove, navigate to view actions.
-    buildGadget=function(result,gadgetURL){
-      var gadgetSiteString="$(this).closest(\'.portlet\').find(\'.portlet-content\').data(\'gadgetSite\')";	
-      var viewItems = "";	
+    buildGadget = function(result,gadgetURL) {
+      var gadgetSiteString = "$(this).closest(\'.portlet\').find(\'.portlet-content\').data(\'gadgetSite\')";
+      var viewItems = '';
       var gadgetViews = result[gadgetURL].views;
-      for(var aView in gadgetViews){
-	    viewItems = viewItems+'<li><a href="#" onclick="navigateView('+gadgetSiteString+','+'\''+gadgetURL+'\''+','+'\''+aView+'\''+'); return false;">'+aView+'</a></li>';
+      for (var aView in gadgetViews) {
+	    viewItems = viewItems + '<li><a href="#" onclick="navigateView(' + gadgetSiteString + ',' + '\'' + gadgetURL + '\'' + ',' + '\'' + aView + '\'' + '); return false;">' + aView + '</a></li>';
 	  }
 	  var newGadgetSite = gadgetTemplate;
-	  newGadgetSite = newGadgetSite.replace(/(gadget-site)/g,'$1-'+ curId);
-	  $(newGadgetSite).appendTo($( '#gadgetArea' )).addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
-		.find(".portlet-header")
-		.addClass("ui-widget-header ui-corner-all")
+	  newGadgetSite = newGadgetSite.replace(/(gadget-site)/g, '$1-' + curId);
+	  $(newGadgetSite).appendTo($('#gadgetArea')).addClass('ui-widget ui-widget-content ui-helper-clearfix ui-corner-all')
+		.find('.portlet-header')
+		.addClass('ui-widget-header ui-corner-all')
 		.text(result[gadgetURL]['modulePrefs'].title)
-		.append('<ul id="viewsDropdown">'+
-			     '<li class="li-header">'+					
-			       '<a href="#" class="hidden"><span id="dropdownIcon" class="ui-icon ui-icon-triangle-1-s"></span></a>'+				
-				   '<ul>'+ 
+		.append('<ul id="viewsDropdown">' +
+			     '<li class="li-header">' +
+			       '<a href="#" class="hidden"><span id="dropdownIcon" class="ui-icon ui-icon-triangle-1-s"></span></a>' +
+				   '<ul>' +
 				   	 viewItems +
-				   '</ul>'+
-			      '</li>'+
+				   '</ul>' +
+			      '</li>' +
 		         '</ul>')
-		.append('<span id="remove" class="ui-icon ui-icon-closethick"></span>')         
+		.append('<span id="remove" class="ui-icon ui-icon-closethick"></span>')
 		.append('<span id="expand" class="ui-icon ui-icon-plusthick"></span>')
 		.append('<span id="collapse" class="ui-icon ui-icon-minusthick"></span>')
 		.end()
-	    .find(".portlet-content")
-	    .data("gadgetSite", CommonContainer.renderGadget(gadgetURL, curId));
-	 
+	    .find('.portlet-content')
+	    .data('gadgetSite', CommonContainer.renderGadget(gadgetURL, curId));
+
 		 //determine which button was click and handle the appropriate event.
-		 $(".portlet-header .ui-icon").click(function(){						 
-			 handleNavigateAction($(this).closest('.portlet'),$(this).closest('.portlet').find(".portlet-content").data("gadgetSite"),gadgetURL,this.id);
-	     }); 
+		 $('.portlet-header .ui-icon').click(function() {
+			 handleNavigateAction($(this).closest('.portlet'), $(this).closest('.portlet').find('.portlet-content').data('gadgetSite'), gadgetURL, this.id);
+	     });
     };
-		 
+
 	//  Publish the container event
-	$( "#pubEvent" ).click(function() {
+	$('#pubEvent').click(function() {
 		CommonContainer.inlineClient.publish(newEventTopic.val(), newEventPayload.val());
-		
+
 		//TODO:  Need to add in some additional logic in the Container to enable point to point for things like Embedded Experience...
-		
+
 		//var ppcont = CommonContainer.managedHub.getContainer("__gadget_1");
 		//CommonContainer.managedHub.publishForClient(ppcont, newEventTopic.val(), newEventPayload.val());
 		//ppcont.sendToClient('org.apache.shindig.random-number', '1111', ppcont.getClientID());
 		//clear values
-		newEventTopic.val( "" ); 
-		newEventPayload.val( "" ); 
-		    return true; 
+		newEventTopic.val('');
+		newEventPayload.val('');
+		    return true;
 	});
-	
+
 	//  Load single gadgets entered by user
-	$( "#addGadget" ).click(function() {
-		CommonContainer.preloadGadget(newGadgetUrl.val(), function(result){		
+	$('#addGadget').click(function() {
+		CommonContainer.preloadGadget(newGadgetUrl.val(), function(result) {
 		  for (var gadgetURL in result) {
-			 buildGadget(result,gadgetURL);
+			 buildGadget(result, gadgetURL);
 			 curId++;
 		  }
 
 	      //Clear Values
-	      newGadgetUrl.val( "" ); 
+	      newGadgetUrl.val('');
 		});
-		
-		return true; 
+
+		return true;
 	});
-	
+
 	//  Load the select collection of gadgets and render them the gadget test area
-	$( "#addGadgets" ).click(function() {
-		
+	$('#addGadgets').click(function() {
+
 		//TODO:  This just provides and example to load configurations
 		//var testGadgets=["http://localhost:8080/container/sample-pubsub-2-publisher.xml","http://localhost:8080/container/sample-pubsub-2-subscriber.xml"];
-		var testGadgets = $('#gadgetCollection').val().split(",");
-		CommonContainer.preloadGadgets(testGadgets, function(result){
+		var testGadgets = $('#gadgetCollection').val().split(',');
+		CommonContainer.preloadGadgets(testGadgets, function(result) {
 		  for (var gadgetURL in result) {
-			buildGadget(result,gadgetURL);
+			buildGadget(result, gadgetURL);
 		    curId++;
 		  }
-		  
+
 		});
-		return true; 
-		    
+		return true;
+
 	});
-	
 
-});
\ No newline at end of file
+
+});

Modified: shindig/trunk/content/samplecontainer/examples/conservcontainer/ConServContainer.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/conservcontainer/ConServContainer.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/conservcontainer/ConServContainer.js (original)
+++ shindig/trunk/content/samplecontainer/examples/conservcontainer/ConServContainer.js Wed Jul 20 08:42:09 2011
@@ -4,42 +4,42 @@ var CommonContainer = new osapi.containe
 // Wrapper function to set the gadget site/id and default width.
 CommonContainer.renderGadget = function(gadgetURL, gadgetId) {
   // going to hardcode these values for width.
-  var el = document.getElementById("gadget-site-" + gadgetId);
+  var el = document.getElementById('gadget-site-' + gadgetId);
   var parms = {};
-  parms[osapi.container.RenderParam.WIDTH] = "100%";
+  parms[osapi.container.RenderParam.WIDTH] = '100%';
   var gadgetSite = CommonContainer.newGadgetSite(el);
   CommonContainer.navigateGadget(gadgetSite, gadgetURL, {}, parms);
   return gadgetSite;
 };
 
 // Function for pre-rendering gadgets.  Gadget pre-rendering
-// occurs when an action contributed by a pre-loaded gadget 
+// occurs when an action contributed by a pre-loaded gadget
 // is executed.
 function preRenderGadget(gadgetUrl, opt_metadata) {
   var gadgetId = getGadgetId(gadgetUrl);
-  var el = $("#gadget-site-" + gadgetId);
+  var el = $('#gadget-site-' + gadgetId);
   var gadgetSite = CommonContainer.renderGadget(gadgetUrl, gadgetId);
-  el.data("gadgetSite", gadgetSite);
+  el.data('gadgetSite', gadgetSite);
   return gadgetSite;
-};
+}
 
 // Common container init function.
-CommonContainer.init = new function(){  
+CommonContainer.init = new function() {
   // Map needed for lazy loading of gadgets
   urlsToGadgetIdMap = {};
-  
+
   // Register our rendering functions with the action service
   if (CommonContainer.actions) {
     // Called when an action should be displayed in the container
     CommonContainer.actions.registerShowActionHandler(showAction);
-    
+
     // Called when a action should be removed from the container
     CommonContainer.actions.registerHideActionHandler(hideAction);
-    
+
     // Called for actions contributed by pre-loaded gadgets (lazy load)
     CommonContainer.actions.registerNavigateGadgetHandler(preRenderGadget);
   }
-};
+}
 
 // Support for lazy loading gadgets
 function getGadgetId(url) {
@@ -56,10 +56,10 @@ CommonContainer.addGadgetToPage = functi
 // Wrapper function to expand a gadget
 CommonContainer.navigateView = function(gadgetSite, gadgetURL, view) {
   var renderParms = {};
-  if (view === null || view === "") {
-    view = "default";
+  if (view === null || view === '') {
+    view = 'default';
   }
-  renderParms[osapi.container.RenderParam.WIDTH] = "100%";
+  renderParms[osapi.container.RenderParam.WIDTH] = '100%';
   renderParms['view'] = view;
   CommonContainer.navigateGadget(gadgetSite, gadgetURL, {}, renderParms);
 };
@@ -80,15 +80,15 @@ osapi.people.getViewerFriends = function
   return osapi.people.get(options);
 };
 
-// Function to display actions 
-function showAction(itemObj) {  
+// Function to display actions
+function showAction(itemObj) {
   if (!itemObj.path && !itemObj.dataType) {
     // object is invalid!
     return;
   }
   // bind the action to the specified data object type
   if (itemObj.dataType) {
-    if (itemObj.dataType == "opensocial.Person") {
+    if (itemObj.dataType == 'opensocial.Person') {
       addPersonAction(itemObj);
     }
   }
@@ -96,78 +96,78 @@ function showAction(itemObj) {  
   if (itemObj.path && itemObj.path.length > 0) {
     addContainerAction(itemObj);
   }
-};
+}
 
 // Adds the specified action to a person element.
 function addPersonAction(itemObj) {
   // select all person elements
-  var personActionDiv = $(".personActions");
-  
+  var personActionDiv = $('.personActions');
+
   // create a link and append it to each person element
   var actionStr = '';
   if (itemObj.icon && itemObj.icon.length > 0) {
-    actionStr += '<img src="'+itemObj.icon+'"/>';
+    actionStr += '<img src="' + itemObj.icon + '"/>';
   }
-  actionStr += '<a name="person-action-'+itemObj.id+'" title="'+
-               itemObj.tooltip+'" href="#">'+itemObj.label+'</a>';
-  actionStr = '<span class="'+itemObj.id+'">'+actionStr+'</span>';
+  actionStr += '<a name="person-action-' + itemObj.id + '" title="' +
+               itemObj.tooltip + '" href="#">' + itemObj.label + '</a>';
+  actionStr = '<span class="' + itemObj.id + '">' + actionStr + '</span>';
   var actionLink = $(actionStr);
-  
+
   // add a separator if needed
   if (personActionDiv.children().length > 0) {
-    personActionDiv.append(" | ");
-  }  
-  
+    personActionDiv.append(' | ');
+  }
+
   // select all links that were added and set the click handler
   personActionDiv.append(actionLink);
-  $('a[name="person-action-'+itemObj.id+'"]').each(function(i) {
+  $('a[name="person-action-' + itemObj.id + '"]').each(function(i) {
     $(this).click(function() {
       CommonContainer.actions.runAction(itemObj.id);
     });
-  }); 
-};
+  });
+}
 
 // Adds an action to the container UI
 function addContainerAction(itemObj) {
-  var pathParts = itemObj.path.split("/");
+  var pathParts = itemObj.path.split('/');
   var pathType = pathParts.shift();
   var pathScope = pathParts.shift();
-  var remainingPath = pathParts.join("/");
+  var remainingPath = pathParts.join('/');
   var contributionBar;
-  
+
   // right now we support contributing to the global menubar
-  if (pathType == "container" && pathScope == "navigationLinks") {
+  if (pathType == 'container' && pathScope == 'navigationLinks') {
     contributionBar = $('#globalMenubar');
     contributionBar.show();
   }
-  
+
   // create the action element
   var actionStr = '';
   if (itemObj.icon && itemObj.icon.length > 0) {
-    actionStr += '<img src="'+itemObj.icon+'"/>';
+    actionStr += '<img src="' + itemObj.icon + '"/>';
   }
-  actionStr += '<a title="'+itemObj.tooltip+'" href="#">'
-               +itemObj.label+'</a>';
-  actionStr = '<span class="'+itemObj.id+'">'+actionStr+'</span>';
+  actionStr += '<a title="' + itemObj.tooltip + '" href="#">'
+               + itemObj.label + '</a>';
+  actionStr = '<span class="' + itemObj.id + '">' + actionStr + '</span>';
   var actionLink = $(actionStr);
-  
+
   // add a separator if needed
   if (contributionBar.children().length > 0) {
-    contributionBar.append(" | ");
+    contributionBar.append(' | ');
   }
-  
+
   // add the new action
-  contributionBar.append(actionLink);    
-  actionLink.click(function(){
+  contributionBar.append(actionLink);
+  actionLink.click(function() {
     CommonContainer.actions.runAction(itemObj.id);
   });
-};
+}
 
-// Function to hide actions 
-function hideAction(itemObj) {  
+// Function to hide actions
+function hideAction(itemObj) {
   if (itemObj.path || itemObj.dataType) {
     // remove the action from the specified data object type
-    if (itemObj.dataType && itemObj.dataType == "opensocial.Person") {
+    if (itemObj.dataType && itemObj.dataType == 'opensocial.Person') {
       removePersonAction(itemObj);
     }
     // remove the action to the specified path (container UI elements)
@@ -175,17 +175,17 @@ function hideAction(itemObj) {  
       removeContainerAction(itemObj);
     }
   }
-};
+}
 
 // Removes the specified action from a person element.
 function removePersonAction(itemObj) {
   // hack - actions should be removed individually
-  $(".personActions").empty();
-};
+  $('.personActions').empty();
+}
 
 // Removes the specified action from the container UI
 function removeContainerAction(itemObj) {
   // hack - actions should be removed individually
   $('#globalMenubar').empty();
   $('#globalMenubar').hide();
-};
+}

Modified: shindig/trunk/content/samplecontainer/examples/conservcontainer/layout.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/conservcontainer/layout.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/conservcontainer/layout.js (original)
+++ shindig/trunk/content/samplecontainer/examples/conservcontainer/layout.js Wed Jul 20 08:42:09 2011
@@ -20,22 +20,22 @@
 //  Setup the base container objects for managing layout, gadget, and container configuration
 $(function() {
   // TODO: enable drag and drop with the portlet at some point
-  $(".column").sortable({
-    connectWith : '.column',
-    update : function(event, ui) {
+  $('.column').sortable({
+    connectWith: '.column',
+    update: function(event, ui) {
       // TODO: There is an issue with drag & drop
     }
   });
 
-  $(".portlet").addClass(
-      "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all").find(
-      ".portlet-header").addClass("ui-widget-header ui-corner-all").prepend(
+  $('.portlet').addClass(
+      'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all').find(
+      '.portlet-header').addClass('ui-widget-header ui-corner-all').prepend(
       '<span class="ui-icon ui-icon-minusthick"></span>').end().find(
-      ".portlet-content");
-  $(".portlet-header .ui-icon").click(function() {
-    $(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick");
-    $(this).parents(".portlet:first").find(".portlet-content").toggle();
+      '.portlet-content');
+  $('.portlet-header .ui-icon').click(function() {
+    $(this).toggleClass('ui-icon-minusthick').toggleClass('ui-icon-plusthick');
+    $(this).parents('.portlet:first').find('.portlet-content').toggle();
   });
 
-  $(".column").disableSelection();
+  $('.column').disableSelection();
 });

Modified: shindig/trunk/content/samplecontainer/examples/conservcontainer/viewController.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/conservcontainer/viewController.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/conservcontainer/viewController.js (original)
+++ shindig/trunk/content/samplecontainer/examples/conservcontainer/viewController.js Wed Jul 20 08:42:09 2011
@@ -1,30 +1,30 @@
 $(function() {
-  
+
   // Base html template that is used for the gadget wrapper and site
-  var gadgetTemplate ='<div class="portlet">' +
+  var gadgetTemplate = '<div class="portlet">' +
                 '<div class="portlet-header" id="portlet-id">' +
                 'sample to replace</div>' +
                 '<div id="gadget-site" class="portlet-content"></div>' +
                 '</div>';
-  
-  // Variable to keep track of gadget current view 
+
+  // Variable to keep track of gadget current view
   // for collapse and expand gadget actions.
-  var currentView="default";
-  
+  var currentView = 'default';
+
   // ID used to associate gadget site
   var curId = 0;
-  
+
   // Navigate to the new view and save it as current view
-  navigateView = function(gadgetSite, gadgetURL, toView){
+  navigateView = function(gadgetSite, gadgetURL, toView) {
     // Save the current view for collapse, expand gadget
     currentView = toView;
-    CommonContainer.navigateView(gadgetSite,gadgetURL,toView); 
+    CommonContainer.navigateView(gadgetSite, gadgetURL, toView);
   };
-    
+
   // Handle gadget collapse, expand, and remove gadget actions
   handleNavigateAction = function(portlet, gadgetSite, gadgetURL, actionId) {
     // Remove button was click, remove the portlet/gadget
-    if (actionId === "remove") {
+    if (actionId === 'remove') {
       if (confirm('This gadget will be removed, ok?')) {
         if (gadgetSite) {
           CommonContainer.closeGadget(gadgetSite);
@@ -35,7 +35,7 @@ $(function() {
         }
         portlet.remove();
       }
-    } else if (actionId === "expand") {
+    } else if (actionId === 'expand') {
       // Navigate to currentView prior to collapse gadget
       if (gadgetSite) {
         CommonContainer.navigateView(gadgetSite, gadgetURL, currentView);
@@ -43,59 +43,59 @@ $(function() {
       else {
         preRenderGadget(gadgetURL);
       }
-    } else if (actionId === "collapse") {
+    } else if (actionId === 'collapse') {
       CommonContainer.closeGadget(gadgetSite);
     }
   };
-    
-  // Create a gadget with navigation tool bar header 
+
+  // Create a gadget with navigation tool bar header
   // enabling gadget collapse, expand and remove.
   buildGadget = function(result,gadgetURL,lazyload) {
-    var gadgetSiteString="$(this).closest(\'.portlet\')." + 
-      "find(\'.portlet-content\').data(\'gadgetSite\')";  
+    var gadgetSiteString = "$(this).closest(\'.portlet\')." +
+      "find(\'.portlet-content\').data(\'gadgetSite\')";
     var newGadgetSite = gadgetTemplate;
-    newGadgetSite = newGadgetSite.replace(/(portlet-id)/g,'$1-'+ curId);
-    newGadgetSite = newGadgetSite.replace(/(gadget-site)/g,'$1-'+ curId);
+    newGadgetSite = newGadgetSite.replace(/(portlet-id)/g, '$1-' + curId);
+    newGadgetSite = newGadgetSite.replace(/(gadget-site)/g, '$1-' + curId);
     var gadgetSiteData = null;
-    $(newGadgetSite).appendTo($( '#gadgetArea' )).addClass(
-        "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
-        .find(".portlet-header")
-        .addClass("ui-widget-header ui-corner-all")
+    $(newGadgetSite).appendTo($('#gadgetArea')).addClass(
+        'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all')
+        .find('.portlet-header')
+        .addClass('ui-widget-header ui-corner-all')
         .text(result[gadgetURL]['modulePrefs'].title)
-    .append('<span id="remove" class="ui-icon ui-icon-closethick"></span>')         
+    .append('<span id="remove" class="ui-icon ui-icon-closethick"></span>')
     .append('<span id="expand" class="ui-icon ui-icon-plusthick"></span>')
     .append('<span id="collapse" class="ui-icon ui-icon-minusthick"></span>')
     .end()
-      .find(".portlet-content")
-      .data("gadgetSite", lazyload ? null :
+      .find('.portlet-content')
+      .data('gadgetSite', lazyload ? null :
         CommonContainer.renderGadget(gadgetURL, curId));
-     
+
     // determine which button was clicked and handle the appropriate event.
-    $("#portlet-id-"+curId+" > .ui-icon").click(
+    $('#portlet-id-'+ curId + ' > .ui-icon').click(
         function() {
           handleNavigateAction(
-              $(this).closest('.portlet'), 
-              $(this).closest('.portlet').find(".portlet-content")
-                .data("gadgetSite"),
-              gadgetURL,this.id);
+              $(this).closest('.portlet'),
+              $(this).closest('.portlet').find('.portlet-content')
+                .data('gadgetSite'),
+              gadgetURL, this.id);
         }
-    ); 
-   
+    );
+
     var gadgetId = urlsToGadgetIdMap[gadgetURL];
     if (!gadgetId) {
       urlsToGadgetIdMap[gadgetURL] = curId;
     }
   };
-      
-  // Add single gadget 
-  addGadget=function(gadgetUrl, lazyload) {
-    CommonContainer.preloadGadget(gadgetUrl, function(result){    
+
+  // Add single gadget
+  addGadget = function(gadgetUrl, lazyload) {
+    CommonContainer.preloadGadget(gadgetUrl, function(result) {
       for (var gadgetURL in result) {
-       buildGadget(result,gadgetURL, lazyload);
+       buildGadget(result, gadgetURL, lazyload);
        curId++;
       }
     });
-    return true; 
+    return true;
   };
-  
-});
\ No newline at end of file
+
+});

Modified: shindig/trunk/content/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml Wed Jul 20 08:42:09 2011
@@ -50,8 +50,8 @@
 			clear: both;
 		} 	
      </style>
-     
- 
+
+
      <script type="text/javascript">     	
      	function initAlbum(){
      		opensocial.data.getDataContext().registerListener('org.opensocial.ee.context', function(key){
@@ -72,7 +72,7 @@
      	
      	gadgets.util.registerOnLoadHandler(initAlbum);
    	 </script>
-	 
+
 	 <div id="wrapper">
 	 	<div id="header"></div>
 	 	<div id="album"></div>

Modified: shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js (original)
+++ shindig/trunk/content/samplecontainer/examples/embeddedexperiences/EEContainer.js Wed Jul 20 08:42:09 2011
@@ -17,16 +17,16 @@
  */
 
 //The URL to request the activity stream
-var ACTIVITY_STREAMS_URL = "http://localhost:8080/social/rest/activitystreams/john.doe/";
+var ACTIVITY_STREAMS_URL = 'http://localhost:8080/social/rest/activitystreams/john.doe/';
 
 //When the document is ready kick off the request so we can render the activity stream
 $(document).ready(function() {
-	var makeRequestParams = {"CONTENT_TYPE" : "JSON", "METHOD" : "GET", "POST_DATA" : {}};
+	var makeRequestParams = {'CONTENT_TYPE' : 'JSON', 'METHOD' : 'GET', 'POST_DATA' : {}};
 	gadgets.io.makeNonProxiedRequest(
-			ACTIVITY_STREAMS_URL, 
+			ACTIVITY_STREAMS_URL,
 			function(response) {renderAS(response.data);},
 			makeRequestParams,
-			"application/javascript"
+			'application/javascript'
 	);
 });
 
@@ -34,31 +34,31 @@ $(document).ready(function() {
 
 //Initiate the common container code and register any RPC listeners for embedded experiences
 var CommonContainer = new osapi.container.Container({});
-CommonContainer.init = new function(){
-	
+CommonContainer.init = new function() {
+
 	CommonContainer.rpcRegister('ee_gadget_rendered', gadgetRendered);
-	
-	CommonContainer.views.createElementForEmbeddedExperience = function(opt_viewTarget){
+
+	CommonContainer.views.createElementForEmbeddedExperience = function(opt_viewTarget) {
 	  return document.getElementById('preview');
 	};
-	
-	CommonContainer.views.destroyElement = function(site){
+
+	CommonContainer.views.destroyElement = function(site) {
 	  CommonContainer.ee.close(site);
 	};
 }
 
 /**
  * Handles the RPC request letting the container know that the embedded experience gadget is rendered.
- * @param rpcArgs the RPC args from the request
- * @param data any data passed in from the caller
- * @return void
+ * @param rpcArgs the RPC args from the request.
+ * @param data any data passed in from the caller.
+ * @return void.
  */
-function gadgetRendered(rpcArgs, data){
+function gadgetRendered(rpcArgs, data) {
 	var gadgetSite = rpcArgs.gs;
 	var renderParams = gadgetSite.currentGadgetHolder_.renderParams_;
 	var eeDataModel = renderParams.eeDataModel;
 	var context = null;
-	if(eeDataModel){
+	if (eeDataModel) {
 		context = eeDataModel.context;
 	}
 	rpcArgs.callback(context);
@@ -66,15 +66,15 @@ function gadgetRendered(rpcArgs, data){
 
 /**
  * Renders the activity stream on the page
- * @param stream the activity stream json
- * @return void
+ * @param stream the activity stream json.
+ * @return void.
  */
-function renderAS(stream){
+function renderAS(stream) {
 	jQuery.each(stream.entry, createAccordianEntry);
-	$("#accordion").accordion({
+	$('#accordion').accordion({
 		clearStyle: true,
 		active: false,
-		change: function(event, ui){
+		change: function(event, ui) {
 			closeCurrentGadget();
 			onAccordionChange(stream, event, ui);
 		}
@@ -86,13 +86,13 @@ function renderAS(stream){
  * Closes the current gadget when a new accordian is selected.
  */
 var currentEESite;
-function closeCurrentGadget(){
-	if(currentEESite)
+function closeCurrentGadget() {
+	if (currentEESite)
 		CommonContainer.ee.close(currentEESite);
-	
+
 	var preview = document.getElementById('preview');
 	var previewChildren = preview.childNodes;
-	if(previewChildren.length > 0){
+	if (previewChildren.length > 0) {
 	  var iframe = previewChildren[0];
 	  var iframeId = iframe.getAttribute('id');
 	  var site = CommonContainer.getGadgetSiteByIframeId_(iframeId);
@@ -102,28 +102,28 @@ function closeCurrentGadget(){
 
 /**
  * Called when a new accordian pane is opened.
- * @param stream the activity stream for the accordian
- * @param event the event that occurred
- * @param ui the ui elements changing
- * @return void
+ * @param stream the activity stream for the accordian.
+ * @param event the event that occurred.
+ * @param ui the ui elements changing.
+ * @return void.
  */
 
-function onAccordionChange(stream, event, ui){
+function onAccordionChange(stream, event, ui) {
 	var id = ui.newHeader.context.id;
 	var localStream = stream;
 	var entry = localStream.entry[id];
 	var extensions = entry.openSocial;
-	if(extensions){
+	if (extensions) {
 		var embed = extensions.embed;
-		if(embed){
-			var eeElement = document.getElementById("ee" + id);
+		if (embed) {
+			var eeElement = document.getElementById('ee' + id);
 			var urlRenderingParams = {
 					'height' : 400,
 					'width' : 650
 			};
-			currentEESite = CommonContainer.ee.navigate(eeElement, embed, 
-					{'urlRenderParams' : urlRenderingParams}, function(site, metaData){
-					  console.log("Embedded Experiences callback called");
+			currentEESite = CommonContainer.ee.navigate(eeElement, embed,
+					{'urlRenderParams' : urlRenderingParams}, function(site, metaData) {
+					  console.log('Embedded Experiences callback called');
 					  console.log(gadgets.json.stringify(metaData));
 					});
 		}
@@ -134,15 +134,15 @@ function onAccordionChange(stream, event
 
 /**
  * Called for each activity entry and adds the necessary HTML to the page.
- * @param i the item in the activity stream we are currently rendering
- * @param entry the activity stream entry json
- * @return void
+ * @param i the item in the activity stream we are currently rendering.
+ * @param entry the activity stream entry json.
+ * @return void.
  */
-function createAccordianEntry(i, entry){
+function createAccordianEntry(i, entry) {
 	var result = '<h3 id=' + i + '><a href="#">' + entry.title + '</a></h3><div>';
-	if(entry.body)
+	if (entry.body)
 		result = result + '<p>' + entry.body + '</p>';
 	result = result + '<div id="ee' + i + '"></div></div>';
 
 	$('#accordion').append(result);
-}
\ No newline at end of file
+}

Modified: shindig/trunk/content/samplecontainer/examples/embeddedexperiences/PhotoList.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/embeddedexperiences/PhotoList.xml?rev=1148651&r1=1148650&r2=1148651&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/embeddedexperiences/PhotoList.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/embeddedexperiences/PhotoList.xml Wed Jul 20 08:42:09 2011
@@ -34,27 +34,25 @@
             padding: 2px 2px 2px 2px;
             border: 1px solid black;
         }
-        
+
         #wrapper{
             border: 1px solid black;
         }
-        
+
         #header{
             font-size: 120%;
             padding: 10px 10px 10px 10px;
             color: #0F67A1;
-        }         
-        
+        }
+
         .clear{
             clear: both;
-        }     
+        }
      </style>
-     
- 
-     <script type="text/javascript"> 
-     
+
+     <script type="text/javascript">
+
          var currentSite;
-                 
          function initAlbum(){
              opensocial.data.getDataContext().registerListener('org.opensocial.ee.context', function(key){
                  createAlbumHTML(opensocial.data.getDataContext().getDataSet(key));
@@ -72,24 +70,24 @@
              document.getElementById('header').innerHTML = context.albumName;
              document.getElementById("album").innerHTML = result;
          };
-         
+
          gadgets.util.registerOnLoadHandler(initAlbum);
-         
+
          function showPreviewPhoto(index) {
-                  
+
             var eeDataModel = {
                 'gadget' : 'http://localhost:8080/samplecontainer/examples/embeddedexperiences/AlbumViewer.xml',
-                'context' : {              
-                  "albumName": context.albumName, 
+                'context' : {
+                  "albumName": context.albumName,
                   "photoUrls": [context.photoUrls[index]]
               }
             };
-            
-            var navigateCallback = function(site, metadata){currentSite = site; console.log("Nagivate callback");};  
+
+            var navigateCallback = function(site, metadata){currentSite = site; console.log("Nagivate callback");};
             var returnCallback = function(returnValue){console.log("Return Value: " + returnValue);};
             gadgets.views.openEmbeddedExperience(returnCallback, navigateCallback, eeDataModel, {'viewTarget' : 'preview'});
          };
-         
+
          function closePreview(){
             if(currentSite != null){
                 gadgets.views.close(currentSite);
@@ -97,7 +95,7 @@
             return false;
          };
         </script>
-     
+
      <div id="wrapper">
          <div id="header"></div>
          <div id="album"></div>



Mime
View raw message