| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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. |
| |
| $Id:$ |
| --> |
| <Module> |
| <ModulePrefs title="" author="" author_email="" height="250" description=""> |
| <Require feature="dynamic-height" /> |
| <Require feature="views" /> |
| </ModulePrefs> |
| |
| |
| <Content type="html" view="home"> |
| <![CDATA[ |
| <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> |
| <div>Normal view.</div> |
| <button onclick="gadgets.views.requestNavigateTo('canvas');">Go to Canvas with No Param</button> |
| |
| <p>Hey, this is a view parameter: <input id="view_param" type="text" value="yarrrgh"> </input> |
| <br/> |
| <button onclick="gadgets.views.requestNavigateTo('canvas', $('#view_param').val());">Go to Canvas with Param</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.foo', $('#view_param').val());">Go to Canvas.foo with Param</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.bar', $('#view_param').val());">Go to Canvas.bar with Param</button></p> |
| ]]> |
| </Content> |
| |
| <Content type="html" view="canvas"> |
| <![CDATA[ |
| <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> |
| <script type="text/javascript"> |
| $(initPage); |
| |
| function initPage() { |
| var viewParams = gadgets.views.getParams(); |
| if (!jQuery.isEmptyObject(viewParams)) { |
| $('#viewParam').text(viewParams); |
| } else { |
| $('#viewParam').text('Not Defined'); |
| } |
| } |
| </script> |
| <div>Canvas view. You sent me this view parameter: <b><span id="viewParam"></b></div> |
| <button onclick="gadgets.views.requestNavigateTo('home');">Go to Home</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.foo');">Go to Canvas.foo</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.bar');">Go to Canvas.bar</button> |
| ]]> |
| </Content> |
| |
| <Content type="html" view="canvas.foo"> |
| <![CDATA[ |
| <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> |
| <script type="text/javascript"> |
| $(initPage); |
| |
| function initPage() { |
| var viewParams = gadgets.views.getParams(); |
| if (!jQuery.isEmptyObject(viewParams)) { |
| $('#viewParam').text(viewParams); |
| } else { |
| $('#viewParam').text('Not Defined'); |
| } |
| } |
| </script> |
| <div>Canvas.foo view. You sent me this view parameter: <b><span id="viewParam"></b></div> |
| <button onclick="gadgets.views.requestNavigateTo('home');">Go to Home</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas');">Go to Canvas</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.bar');">Go to Canvas.bar</button> |
| ]]> |
| </Content> |
| |
| <Content type="html" view="canvas.bar"> |
| <![CDATA[ |
| <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> |
| <script type="text/javascript"> |
| $(initPage); |
| |
| function initPage() { |
| var viewParams = gadgets.views.getParams(); |
| if (!jQuery.isEmptyObject(viewParams)) { |
| $('#viewParam').text(viewParams); |
| } else { |
| $('#viewParam').text('Not Defined'); |
| } |
| } |
| </script> |
| <div>Canvas.bar view. You sent me this view parameter: <b><span id="viewParam"></b></div> |
| <button onclick="gadgets.views.requestNavigateTo('home');">Go to Home</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas.foo');">Go to Canvas.foo</button> |
| <button onclick="gadgets.views.requestNavigateTo('canvas');">Go to Canvas</button> |
| ]]> |
| </Content> |
| |
| <Content type="html" view="default"> |
| <![CDATA[ |
| Default view. |
| ]]> |
| </Content> |
| |
| </Module> |
| |