SHINDIG-1056 by lipeng, BasicRemoteContentTest doesn't depend on static private key...
[shindig.git] / javascript / container / sample2.html
blob813e320cc533043763ca9829f12a4f18d27e22be
1 <!--
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 -->
19 <!DOCTYPE html>
20 <html>
21 <head>
22 <title>Sample: Dynamic Height</title>
23 <!-- default container look and feel -->
24 <link rel="stylesheet" href="gadgets.css">
25 <script type="text/javascript" src="../../js/rpc.js?c=1&debug=1"></script>
26 <script type="text/javascript" src="cookies.js"></script>
27 <script type="text/javascript" src="util.js"></script>
28 <script type="text/javascript" src="gadgets.js"></script>
29 <script type="text/javascript" src="cookiebaseduserprefstore.js"></script>
30 <script type="text/javascript">
31 var my = {};
33 my.gadgetSpecUrls = [
34 'http://www.google.com/ig/modules/horoscope.xml',
35 'http://www.google.com/ig/modules/aue07otr.xml',
36 'http://www.labpixies.com/campaigns/todo/todo.xml'
40 // This container lays out and renders gadgets itself.
42 my.LayoutManager = function() {
43 gadgets.LayoutManager.call(this);
46 my.LayoutManager.inherits(gadgets.LayoutManager);
48 my.LayoutManager.prototype.getGadgetChrome = function(gadget) {
49 var chromeId = 'gadget-chrome-' + gadget.id;
50 return chromeId ? document.getElementById(chromeId) : null;
53 my.init = function() {
54 gadgets.container.layoutManager = new my.LayoutManager();
57 my.renderGadgets = function() {
58 for (var i = 0; i < my.gadgetSpecUrls.length; ++i) {
59 var gadget = gadgets.container.createGadget(
60 {specUrl: my.gadgetSpecUrls[i]});
61 gadgets.container.addGadget(gadget);
62 gadgets.container.renderGadget(gadget);
65 </script>
66 </head>
67 <body onLoad="my.init();my.renderGadgets();">
68 <h2>Sample: Dynamic Height</h2>
69 <div id="gadget-chrome-0" class="gadgets-gadget-chrome"></div>
70 <div id="gadget-chrome-1" class="gadgets-gadget-chrome"></div>
71 <div id="gadget-chrome-2" class="gadgets-gadget-chrome"></div>
72 </body>
73 </html>