improved test.html

This commit is contained in:
Peter 'Pita' Martischka 2011-08-10 12:12:29 +01:00
parent 9f530962ee
commit 578f8db311
1 changed files with 11 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>API Test and Examples Page</title> <title>API Test and Examples Page</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script>
<style type="text/css"> <style type="text/css">
body { body {
font-size:9pt; font-size:9pt;
@ -16,6 +16,7 @@
background: -webkit-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed; background: -webkit-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
background: -ms-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed; background: -ms-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
background: -o-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed; background: -o-radial-gradient(circle, #aaa, #eee) no-repeat center center fixed;
width: 1000px;
} }
.define, #template { .define, #template {
display: none; display: none;
@ -43,6 +44,10 @@
.test_group table { .test_group table {
width: 100%; width: 100%;
} }
#apikeyDIV {
width: 100%
}
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
@ -75,7 +80,7 @@
'<td style="width:200px"><input type="text" size="10" name="' + el + '" /></td></tr>'); '<td style="width:200px"><input type="text" size="10" name="' + el + '" /></td></tr>');
}); });
$template.show(); $template.css({display: "block"});
$template.appendTo('body'); $template.appendTo('body');
}); });
}); });
@ -106,6 +111,9 @@
function callFunction(memberName, results_node, params) function callFunction(memberName, results_node, params)
{ {
$('#result').text('Calling ' + memberName + "()..."); $('#result').text('Calling ' + memberName + "()...");
params["apikey"]=$("#apikey").val();
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "/api/1/" + memberName, url: "/api/1/" + memberName,
@ -121,6 +129,7 @@
</script> </script>
</head> </head>
<body> <body>
<div id="apikeyDIV" class="test_group"><b>APIKEY: </b><input type="text" id="apikey"></div>
<div class="test_group" id="template"> <div class="test_group" id="template">
<h2>createGroup()</h2> <h2>createGroup()</h2>
<table> <table>