You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by hs...@apache.org on 2010/12/16 21:35:36 UTC
svn commit: r1050148 - in /shindig/trunk:
content/samplecontainer/examples/SocialHelloWorld.xml
features/src/main/javascript/features/osapi/gadgetsrpctransport.js
features/src/main/javascript/features/osapi/jsonrpctransport.js
Author: hsaputra
Date: Thu Dec 16 20:35:35 2010
New Revision: 1050148
URL: http://svn.apache.org/viewvc?rev=1050148&view=rev
Log:
Add new line to JavaScript file for easy read. Mostly it will be minified in production env anyway.
Modified:
shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml
shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js
shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js
Modified: shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml?rev=1050148&r1=1050147&r2=1050148&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml (original)
+++ shindig/trunk/content/samplecontainer/examples/SocialHelloWorld.xml Thu Dec 16 20:35:35 2010
@@ -23,7 +23,7 @@
thumbnail="http://localhost:8080/"
icon="http://localhost:8080/samplecontainer/examples/icon.png">
<Require feature="osapi"></Require>
- <Require feature="settitle"/>
+ <Require feature="settitle"/>
<Require feature="dynamic-height"></Require>
</ModulePrefs>
<Content type="html">
Modified: shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js?rev=1050148&r1=1050147&r2=1050148&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js (original)
+++ shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js Thu Dec 16 20:35:35 2010
@@ -57,11 +57,13 @@ if (gadgets && gadgets.rpc) { //Dont bin
if (services) {
// Iterate over the defined services, extract the gadget.rpc endpoint and
// bind to it
- for (var endpointName in services) if (services.hasOwnProperty(endpointName)) {
- if (endpointName === 'gadgets.rpc') {
- var methods = services[endpointName];
- for (var i = 0; i < methods.length; i++) {
- osapi._registerMethod(methods[i], transport);
+ for (var endpointName in services) {
+ if (services.hasOwnProperty(endpointName)) {
+ if (endpointName === 'gadgets.rpc') {
+ var methods = services[endpointName];
+ for (var i = 0; i < methods.length; i++) {
+ osapi._registerMethod(methods[i], transport);
+ }
}
}
}
Modified: shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js?rev=1050148&r1=1050147&r2=1050148&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js (original)
+++ shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js Thu Dec 16 20:35:35 2010
@@ -73,15 +73,17 @@
if (services) {
// Iterate over the defined services, extract the http endpoints and
// create a transport per-endpoint
- for (var endpointName in services) if (services.hasOwnProperty(endpointName)) {
- if (endpointName.indexOf('http') == 0 ||
- endpointName.indexOf('//') == 0) {
- // Expand the host & append the security token
- var endpointUrl = endpointName.replace('%host%', document.location.host);
- var transport = { name: endpointUrl, 'execute' : execute };
- var methods = services[endpointName];
- for (var i = 0; i < methods.length; i++) {
- osapi._registerMethod(methods[i], transport);
+ for (var endpointName in services) {
+ if (services.hasOwnProperty(endpointName)) {
+ if (endpointName.indexOf('http') == 0 ||
+ endpointName.indexOf('//') == 0) {
+ // Expand the host & append the security token
+ var endpointUrl = endpointName.replace('%host%', document.location.host);
+ var transport = { name: endpointUrl, 'execute' : execute };
+ var methods = services[endpointName];
+ for (var i = 0; i < methods.length; i++) {
+ osapi._registerMethod(methods[i], transport);
+ }
}
}
}