You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by et...@apache.org on 2008/03/11 10:53:01 UTC
svn commit: r635862 [5/5] - in /incubator/shindig/trunk: config/
features/core/ features/setprefs/ java/gadgets/
java/gadgets/src/main/java/org/apache/shindig/gadgets/
java/gadgets/src/main/java/org/apache/shindig/gadgets/http/
java/gadgets/src/main/ja...
Added: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java?rev=635862&view=auto
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java (added)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java Tue Mar 11 02:52:52 2008
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.shindig.gadgets.spec;
+
+import org.apache.shindig.gadgets.Substitutions;
+import org.apache.shindig.util.XmlUtil;
+
+import junit.framework.TestCase;
+
+import java.net.URI;
+import java.util.Locale;
+
+public class ModulePrefsTest extends TestCase {
+ private static final URI SPEC_URL = URI.create("http://example.org/g.xml");
+ public void testBasic() throws Exception {
+ String xml = "<ModulePrefs" +
+ " title=\"title\"" +
+ " title_url=\"title_url\"" +
+ " description=\"description\"" +
+ " author=\"author\"" +
+ " author_email=\"author_email\"" +
+ " screenshot=\"screenshot\"" +
+ " thumbnail=\"thumbnail\"" +
+ " directory_title=\"directory_title\"" +
+ " width=\"1\"" +
+ " height=\"2\"" +
+ " category1=\"category1\"" +
+ " category2=\"category2\">" +
+ " <Require feature=\"require\"/>" +
+ " <Optional feature=\"optional\"/>" +
+ " <Preload href=\"preload\"/>" +
+ " <Icon/>" +
+ " <Locale/>" +
+ "</ModulePrefs>";
+ ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL);
+ assertEquals("title", prefs.getTitle());
+ assertEquals("title_url", prefs.getTitleUrl().toString());
+ assertEquals("description", prefs.getDescription());
+ assertEquals("author", prefs.getAuthor());
+ assertEquals("author_email", prefs.getAuthorEmail());
+ assertEquals("screenshot", prefs.getScreenshot().toString());
+ assertEquals("thumbnail", prefs.getThumbnail().toString());
+ assertEquals("directory_title", prefs.getDirectoryTitle());
+ assertEquals(1, prefs.getWidth());
+ assertEquals(2, prefs.getHeight());
+ assertEquals("category1", prefs.getCategories().get(0));
+ assertEquals("category2", prefs.getCategories().get(1));
+ assertEquals(true, prefs.getFeatures().get("require").getRequired());
+ assertEquals(false, prefs.getFeatures().get("optional").getRequired());
+ assertEquals("preload", prefs.getPreloads().get(0).toString());
+ assertEquals(1, prefs.getIcons().size());
+ assertEquals(1, prefs.getLocales().size());
+ }
+
+ public void testGetLocale() throws Exception {
+ String xml = "<ModulePrefs title=\"locales\">" +
+ " <Locale lang=\"en\" messages=\"en.xml\"/>" +
+ " <Locale lang=\"foo\" language_direction=\"rtl\"/>" +
+ "</ModulePrefs>";
+ ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL);
+ LocaleSpec spec = prefs.getLocale(new Locale("en", "uk"));
+ assertEquals("http://example.org/en.xml", spec.getMessages().toString());
+
+ spec = prefs.getLocale(new Locale("foo", "bar"));
+ assertEquals("rtl", spec.getLanguageDirection());
+
+ }
+
+ public void testSubstitutions() {
+ Substitutions substitutions = new Substitutions();
+ // TODO
+ }
+
+ public void testTitleRequired() throws Exception {
+ String xml = "<ModulePrefs/>";
+ try {
+ ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL);
+ fail("No exception thrown when ModulePrefs@title is missing.");
+ } catch (SpecParserException e) {
+ // OK
+ }
+ }
+}
Added: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/UserPrefTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/UserPrefTest.java?rev=635862&view=auto
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/UserPrefTest.java (added)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/UserPrefTest.java Tue Mar 11 02:52:52 2008
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.shindig.gadgets.spec;
+
+import org.apache.shindig.gadgets.Substitutions;
+import org.apache.shindig.util.XmlUtil;
+
+import junit.framework.TestCase;
+
+public class UserPrefTest extends TestCase {
+ public void testBasic() throws Exception {
+ String xml = "<UserPref" +
+ " name=\"name\"" +
+ " display_name=\"display_name\"" +
+ " default_value=\"default_value\"" +
+ " required=\"true\"" +
+ " datatype=\"hidden\"/>";
+ UserPref userPref = new UserPref(XmlUtil.parse(xml));
+ assertEquals("name", userPref.getName());
+ assertEquals("display_name", userPref.getDisplayName());
+ assertEquals("default_value", userPref.getDefaultValue());
+ assertEquals(true, userPref.getRequired());
+ assertEquals(UserPref.DataType.HIDDEN, userPref.getDataType());
+ }
+
+ public void testEnum() throws Exception {
+ String xml = "<UserPref name=\"foo\" datatype=\"enum\">" +
+ " <EnumValue value=\"0\" display_value=\"Zero\"/>" +
+ " <EnumValue value=\"1\"/>" +
+ "</UserPref>";
+ UserPref userPref = new UserPref(XmlUtil.parse(xml));
+ assertEquals(2, userPref.getEnumValues().size());
+ assertEquals("Zero", userPref.getEnumValues().get("0"));
+ assertEquals("1", userPref.getEnumValues().get("1"));
+ }
+
+ public void testSubstitutions() throws Exception {
+ String xml = "<UserPref name=\"name\" datatype=\"enum\"" +
+ " display_name=\"__MSG_display_name__\"" +
+ " default_value=\"__MSG_default_value__\">" +
+ " <EnumValue value=\"0\" display_value=\"__MSG_dv__\"/>" +
+ "</UserPref>";
+ String displayName = "This is the display name";
+ String defaultValue = "This is the default value";
+ String displayValue = "This is the display value";
+ Substitutions substituter = new Substitutions();
+ substituter.addSubstitution(Substitutions.Type.MESSAGE,
+ "display_name", displayName);
+ substituter.addSubstitution(Substitutions.Type.MESSAGE,
+ "default_value", defaultValue);
+ substituter.addSubstitution(Substitutions.Type.MESSAGE, "dv", displayValue);
+ UserPref userPref
+ = new UserPref(XmlUtil.parse(xml)).substitute(substituter);
+ assertEquals(displayName, userPref.getDisplayName());
+ assertEquals(defaultValue, userPref.getDefaultValue());
+ assertEquals(displayValue, userPref.getEnumValues().get("0"));
+ }
+
+ public void testMissingName() throws Exception {
+ String xml = "<UserPref datatype=\"string\"/>";
+ try {
+ UserPref pref = new UserPref(XmlUtil.parse(xml));
+ fail("No exception thrown when name is missing");
+ } catch (SpecParserException e) {
+ // OK
+ }
+ }
+
+ public void testMissingDataType() throws Exception {
+ String xml = "<UserPref name=\"name\"/>";
+ try {
+ UserPref pref = new UserPref(XmlUtil.parse(xml));
+ fail("No exception thrown when datatype is missing");
+ } catch (SpecParserException e) {
+ // OK
+ }
+ }
+
+ public void testMissingEnumValue() throws Exception {
+ String xml = "<UserPref name=\"foo\" datatype=\"enum\">" +
+ " <EnumValue/>" +
+ "</UserPref>";
+ try {
+ UserPref pref = new UserPref(XmlUtil.parse(xml));
+ fail("No exception thrown when EnumValue@value is missing");
+ } catch (SpecParserException e) {
+ // OK
+ }
+ }
+}
Added: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ViewTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ViewTest.java?rev=635862&view=auto
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ViewTest.java (added)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ViewTest.java Tue Mar 11 02:52:52 2008
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.shindig.gadgets.spec;
+
+import org.apache.shindig.gadgets.Substitutions;
+import org.apache.shindig.gadgets.Substitutions.Type;
+import org.apache.shindig.util.XmlUtil;
+
+import junit.framework.TestCase;
+
+import java.util.Arrays;
+
+public class ViewTest extends TestCase {
+
+ public void testSimpleView() throws Exception {
+ String viewName = "VIEW NAME";
+ String content = "This is the content";
+
+ String xml = "<Content" +
+ " type=\"html\"" +
+ " view=\"" + viewName + "\"" +
+ " quirks=\"false\"><![CDATA[" +
+ content +
+ "]]></Content>";
+
+ View view = new View(viewName, Arrays.asList(XmlUtil.parse(xml)));
+
+ assertEquals(viewName, view.getName());
+ assertEquals(false, view.getQuirks());
+ assertEquals(View.ContentType.HTML, view.getType());
+ assertEquals(content, view.getContent());
+ }
+
+ public void testConcatenation() throws Exception {
+ String body1 = "Hello, ";
+ String body2 = "World!";
+ String content1 = "<Content type=\"html\">" + body1 + "</Content>";
+ String content2 = "<Content type=\"html\">" + body2 + "</Content>";
+ View view = new View("test", Arrays.asList(XmlUtil.parse(content1),
+ XmlUtil.parse(content2)));
+ assertEquals(body1 + body2, view.getContent());
+ }
+
+ public void testContentTypeConflict() throws Exception {
+ String content1 = "<Content type=\"html\"/>";
+ String content2
+ = "<Content type=\"url\" href=\"http://example.org/\"/>";
+
+ try {
+ View view = new View("test", Arrays.asList(XmlUtil.parse(content1),
+ XmlUtil.parse(content2)));
+ fail("No exception thrown with conflicting type attributes.");
+ } catch (SpecParserException e) {
+ // this is what was supposed to happen.
+ }
+ }
+
+ public void testHrefOnTypeUrl() throws Exception {
+ String xml = "<Content type=\"url\"/>";
+ try {
+ View view = new View("dummy", Arrays.asList(XmlUtil.parse(xml)));
+ fail("No exception thrown when href attribute is missing for type=url.");
+ } catch (SpecParserException e) {
+ // Ok
+ }
+ }
+
+ public void testHrefMalformed() throws Exception {
+ // Unfortunately, this actually does URI validation rather than URL, so
+ // most anything will pass. urn:isbn:0321146530 is valid here.
+ String xml = "<Content type=\"url\" href=\"fobad@$%!fdf\"/>";
+ try {
+ View view = new View("dummy", Arrays.asList(XmlUtil.parse(xml)));
+ fail("No exception thrown when href attribute is not a valid uri.");
+ } catch (SpecParserException e) {
+ // Ok
+ }
+ }
+
+ public void testQuirksCascade() throws Exception {
+ String content1 = "<Content type=\"html\" quirks=\"true\"/>";
+ String content2 = "<Content type=\"html\" quirks=\"false\"/>";
+ View view = new View("test", Arrays.asList(XmlUtil.parse(content1),
+ XmlUtil.parse(content2)));
+ assertEquals(false, view.getQuirks());
+ }
+
+ public void testQuirksCascadeReverse() throws Exception {
+ String content1 = "<Content type=\"html\" quirks=\"false\"/>";
+ String content2 = "<Content type=\"html\" quirks=\"true\"/>";
+ View view = new View("test", Arrays.asList(XmlUtil.parse(content1),
+ XmlUtil.parse(content2)));
+ assertEquals(true, view.getQuirks());
+ }
+
+ public void testContentSubstitution() throws Exception {
+ String xml
+ = "<Content type=\"html\">Hello, __MSG_world__ __MODULE_ID__</Content>";
+
+ Substitutions substituter = new Substitutions();
+ substituter.addSubstitution(Type.MESSAGE, "world",
+ "foo __UP_planet____BIDI_START_EDGE__");
+ substituter.addSubstitution(Type.USER_PREF, "planet", "Earth");
+ substituter.addSubstitution(Type.BIDI, "START_EDGE", "right");
+ substituter.addSubstitution(Type.MODULE, "ID", "3");
+
+ View view = new View("test",
+ Arrays.asList(XmlUtil.parse(xml))).substitute(substituter);
+ assertEquals("Hello, foo Earthright 3", view.getContent());
+ }
+
+ public void testHrefSubstitution() throws Exception {
+ String href = "http://__MSG_domain__/__MODULE_ID__?dir=__BIDI_DIR__";
+ String xml = "<Content type=\"url\" href=\"" + href + "\"/>";
+
+ Substitutions substituter = new Substitutions();
+ substituter.addSubstitution(Type.MESSAGE, "domain",
+ "__UP_subDomain__.example.org");
+ substituter.addSubstitution(Type.USER_PREF, "subDomain", "up");
+ substituter.addSubstitution(Type.BIDI, "DIR", "rtl");
+ substituter.addSubstitution(Type.MODULE, "ID", "123");
+
+ View view = new View("test",
+ Arrays.asList(XmlUtil.parse(xml))).substitute(substituter);
+ assertEquals("http://up.example.org/123?dir=rtl",
+ view.getHref().toString());
+ }
+}
Modified: incubator/shindig/trunk/javascript/container/gadgets.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/gadgets.js?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/gadgets.js (original)
+++ incubator/shindig/trunk/javascript/container/gadgets.js Tue Mar 11 02:52:52 2008
@@ -632,7 +632,7 @@
*/
gadgets.Container = function() {
this.gadgets_ = {};
- this.parentUrl_ = '';
+ this.parentUrl_ = 'http://' + document.location.host;
this.country_ = 'ALL';
this.language_ = 'ALL';
this.view_ = 'default';
Modified: incubator/shindig/trunk/javascript/container/sample-rpc.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample-rpc.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample-rpc.html (original)
+++ incubator/shindig/trunk/javascript/container/sample-rpc.html Tue Mar 11 02:52:52 2008
@@ -56,7 +56,7 @@
newGadget.innerHTML = ["Unable to process gadget: ", gadget.url, ". Errors: <pre>", gadget.errors.join("\n"), "</pre>"].join("");
} else {
newGadget.innerHTML = ['<h2>', gadget.title, '</h2>',
- '<iframe src="', gadget.content, '&libs=', libs ,'" id="remote_iframe_', gadget.moduleId, '" name="remote_iframe_', gadget.moduleId, '"></iframe>'
+ '<iframe src="', gadget.iframeUrl, '&libs=', libs ,'" id="remote_iframe_', gadget.moduleId, '" name="remote_iframe_', gadget.moduleId, '"></iframe>'
].join("");
}
newGadget.className = "gadget";
Modified: incubator/shindig/trunk/javascript/container/sample1.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample1.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample1.html (original)
+++ incubator/shindig/trunk/javascript/container/sample1.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: Simple Container</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
Modified: incubator/shindig/trunk/javascript/container/sample2.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample2.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample2.html (original)
+++ incubator/shindig/trunk/javascript/container/sample2.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: Dynamic Height</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
Modified: incubator/shindig/trunk/javascript/container/sample3.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample3.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample3.html (original)
+++ incubator/shindig/trunk/javascript/container/sample3.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: Container with FloatLeft Layout</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
Modified: incubator/shindig/trunk/javascript/container/sample4.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample4.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample4.html (original)
+++ incubator/shindig/trunk/javascript/container/sample4.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: set-pref support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
@@ -14,7 +14,6 @@
gadgets.container.layoutManager =
new gadgets.FloatLeftLayoutManager('gadget-parent');
- gadgets.container.setParentUrl("http://" + document.location.host + '/');
gadgets.container.addGadget(
gadgets.container.createGadget({specUrl: specUrl0}));
};
Modified: incubator/shindig/trunk/javascript/container/sample5.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample5.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample5.html (original)
+++ incubator/shindig/trunk/javascript/container/sample5.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: set-pref support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
@@ -14,7 +14,6 @@
gadgets.container.layoutManager =
new gadgets.FloatLeftLayoutManager('gadget-parent');
- gadgets.container.setParentUrl("http://" + document.location.host + '/');
var gadget = gadgets.container.createGadget({specUrl: specUrl0});
gadgets.container.addGadget(gadget);
};
Modified: incubator/shindig/trunk/javascript/container/sample6.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample6.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample6.html (original)
+++ incubator/shindig/trunk/javascript/container/sample6.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: dynamic-height support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
@@ -14,8 +14,6 @@
gadgets.container.layoutManager =
new gadgets.FloatLeftLayoutManager('gadget-parent');
- // An example of explicitly setting the parentUrl
- gadgets.container.setParentUrl("http://" + document.location.host + '/');
var gadget = gadgets.container.createGadget({specUrl: specUrl0, title: "Dynamic Height Demo", width: 500});
gadgets.container.addGadget(gadget);
};
Modified: incubator/shindig/trunk/javascript/container/sample7.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample7.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample7.html (original)
+++ incubator/shindig/trunk/javascript/container/sample7.html Tue Mar 11 02:52:52 2008
@@ -4,7 +4,7 @@
<title>Sample: settitle support</title>
<!-- default container look and feel -->
<link rel="stylesheet" href="gadgets.css">
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="cookies.js"></script>
<script type="text/javascript" src="gadgets.js"></script>
<script type="text/javascript">
@@ -13,8 +13,6 @@
function init() {
gadgets.container.layoutManager =
new gadgets.FloatLeftLayoutManager('gadget-parent');
-
- gadgets.container.setParentUrl("http://" + document.location.host + '/');
var gadget = gadgets.container.createGadget({specUrl: specUrl0});
gadgets.container.addGadget(gadget);
};
Modified: incubator/shindig/trunk/javascript/samplecontainer/samplecontainer.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/samplecontainer/samplecontainer.html?rev=635862&r1=635861&r2=635862&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/samplecontainer/samplecontainer.html (original)
+++ incubator/shindig/trunk/javascript/samplecontainer/samplecontainer.html Tue Mar 11 02:52:52 2008
@@ -22,7 +22,7 @@
}
</style>
-<script type="text/javascript" src="../../js/rpc.js?c=1"></script>
+<script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
<script type="text/javascript" src="../container/cookies.js"></script>
<script type="text/javascript" src="../container/gadgets.js"></script>
<script type="text/javascript">