/apps/testapp/Resources/index.html
https://github.com/leongersing/titanium_desktop · HTML · 124 lines · 116 code · 8 blank · 0 comment · 0 complexity · 5a96c28b7731ce6c13da29683f1b05de MD5 · raw file
- <html>
- <head>
- <style>
- body { font-family: sans, sans-serif; padding: 0px; }
- #navbar {
- font-family: 'Lucida Grande', Georgia;
- background-color: #3e3e3e;
- color: #fff;
- margin: 0px;
- padding: 5px;
- }
-
- #title {
- font-weight: bold;
- color: #b5bdc9;
- margin-right: 50px;
- }
-
- #title img {
- margin-right: 5px;
- text-align: center;
- vertical-align: middle;
-
- }
-
- a.bye {
- margin-left: 20px;
- padding: 3px 10px 3px 10px;
- background-color: #e3e3e3;
- font-size: 7.5pt;
- color: #f33;
- text-decoration: none;
- }
-
- #tests {
- font-family: 'Lucida Grande', Georgia;
- background-color: #3e3e3e;
- color: #fff;
- }
-
- #testframe {
- border-width: 0px;
- width: 100%;
- height: 800px;
- padding: 5px;
- }
- </style>
- <script>
- function $(id) { return document.getElementById(id); }
- function openTest() {
- var test = $('tests').options[$('tests').selectedIndex].value;
-
- if(test.indexOf("http") == 0) {
- window.location = test;
- }
- else {
- $('testframe').src = test;
- }
- }
- function bye() { Titanium.App.exit(); }
- window.onunload = function()
- {
- Titanium.API.debug("bye bye from window.onunload from index.html");
- }
- </script>
- </head>
- <body>
- <div id="navbar">
- <span id="title"><img src="images/logo_small.png"/>Titanium Test App</span>
- Select a Test:
- <select id="tests" onchange="openTest();">
- <option selected="selected">test-newmenu.html</option>
- <option>test-app.html</option>
- <option>test-filesystem.html</option>
- <option>test-filesystem-filestream.html</option>
- <option>test-desktop.html</option>
- <option>test-notification.html</option>
- <option>test-media.html</option>
- <option>test-ui.html</option>
- <option>test-ui2.html</option>
- <option>test-dock.html</option>
- <option>test-network.html</option>
- <option>test-platform.html</option>
- <option>test-process.html</option>
- <option>test-scripts.html</option>
- <option>test-database.html</option>
- <option>test-ajax.html</option>
- <option>test-ajax-prototype.html</option>
- <option>test-ajax-local.html</option>
- <option>test-iframe.html</option>
- <option>test-userscript.html</option>
- <option>test-css.html</option>
- <option>test-known-webkit-issues.html</option>
- <option>fullscreen.html</option>
- <option>http://demos.mootools.net/</option>
- <option>http://cappuccino.org/learn/demos/</option>
- <option>http://www.google.com/</option>
- <option>http://mail.google.com/mail</option>
- <option>http://www.rai.tv/dl/RaiTV/homeTv.html</option>
- <option>http://twitter.com</option>
- <option>http://www.w3.org/People/mimasa/test/object/java/clock</option>
- <option>http://service.futuremark.com/peacekeeper/run.action</option>
- </select>
- <span><a class="bye" href="javascript:bye();">bye</a></span>
- </div>
- <iframe id="testframe"></iframe>
- <script>
- window.onload = function() {
- if (Titanium.App.arguments.length > 0) {
- test = Titanium.App.arguments[0];
- test = "test-"+test+".html";
- for (var i = 0; i < $('tests').options.length; i++) {
- if ($('tests').options[i].value == test) {
- $('tests').selectedIndex = i;
- break;
- }
- }
- }
- openTest();
- }
- </script>
- </body>
- </html>