added tabs to test overview

This commit is contained in:
Klaus Hartl 2008-10-06 11:37:51 +00:00
parent 6ed2e44c24
commit a47c2a87e8
2 changed files with 35 additions and 8 deletions

View File

@ -21,6 +21,7 @@
<script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script>
<script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script>
<script type="text/javascript" src="plugins/cookie/jquery.cookie.js"></script>
<script type="text/javascript" src="accordion.js"></script> <script type="text/javascript" src="accordion.js"></script>
<script type="text/javascript" src="datepicker.js"></script> <script type="text/javascript" src="datepicker.js"></script>
@ -32,10 +33,13 @@
<script type="text/javascript" src="slider.js"></script> <script type="text/javascript" src="slider.js"></script>
<script type="text/javascript" src="sortable.js"></script> <script type="text/javascript" src="sortable.js"></script>
<script type="text/javascript" src="spinner.js"></script> <script type="text/javascript" src="spinner.js"></script>
<script type="text/javascript" src="tabs.js"></script>
<style type="text/css"> <style type="text/css">
@import "../themes/flora/flora.datepicker.css"; @import "../themes/flora/flora.datepicker.css";
.xerror, .error { display: none } .xerror, .error, .ui-tabs-hide {
display: none;
}
</style> </style>
</head> </head>
@ -55,6 +59,7 @@
<li><a href="slider.html">Slider</a></li> <li><a href="slider.html">Slider</a></li>
<li><a href="sortable.html">Sortable</a></li> <li><a href="sortable.html">Sortable</a></li>
<li><a href="spinner.html">Spinner</a></li> <li><a href="spinner.html">Spinner</a></li>
<li><a href="tabs.html">Tabs</a></li>
</ul> </ul>
<ol id="tests"></ol> <ol id="tests"></ol>
@ -199,6 +204,25 @@
<div id="progressbar"></div> <div id="progressbar"></div>
<div id="tabs1">
<ul>
<li><a href="#fragment-1">1</a></li>
<li><a href="#fragment-2">2</a></li>
<li><a href="#fragment-3">3</a></li>
</ul>
<div id="fragment-1"></div>
<div id="fragment-2"></div>
<div id="fragment-3"></div>
</div>
<div id="tabs2">
<ul>
<li><a href="#colon:test">1</a></li>
<li><a href="#inline-style">2</a></li>
</ul>
<div id="colon:test"></div>
<div style="height: 300px;" id="inline-style"></div>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -8,9 +8,9 @@
<script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var components = ["accordion","datepicker","dialog","draggable","progressbar","resizable","selectable","slider","sortable","spinner"]; var components = ["accordion","datepicker","dialog","draggable","progressbar","resizable","selectable","slider","sortable","spinner","tabs"];
$(document).ready(function(){ $(function() {
var $list = $("#individual_list"), var $list = $("#individual_list"),
$main = $("#main"); $main = $("#main");
@ -18,7 +18,7 @@
$.each(components, function(i, val){ $.each(components, function(i, val){
$list.append('<li><a href="' + val + '.html">' + val + '</a></li>'); $list.append('<li><a href="' + val + '.html">' + val + '</a></li>');
$('<div class="component_panel" id="' + val + '">').appendTo($main); $('<div class="component_panel" id="' + val + '">').appendTo($main);
$('div#'+val).load(val + '.html #main *'); $('#' + val).load(val + '.html #main *');
}); });
loadScripts(); loadScripts();
@ -26,10 +26,10 @@
function loadScripts() { function loadScripts() {
if ( $("div.component_panel").length == components.length ) { if ( $("div.component_panel").length == components.length ) {
$.each(components, function(i, val){ $.each(components, function(i, val){
$('head').append('<script type="text/javascript" src="'+val+'.js"></scr'+'pit>'); $('head').append('<script type="text/javascript" src="' + val + '.js"></scr'+'ipt>');
}); });
} else { } else {
setTimeout( function (){ loadScripts(); } ,10); setTimeout(loadScripts, 10);
} }
} }
@ -54,10 +54,13 @@
<script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script>
<script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script>
<script type="text/javascript" src="plugins/cookie/jquery.cookie.js"></script>
<style type="text/css"> <style type="text/css">
@import "../themes/flora/flora.datepicker.css"; @import "../themes/flora/flora.datepicker.css";
.xerror, .error { display: none } .xerror, .error, .ui-tabs-hide {
display: none;
}
</style> </style>
</head> </head>
@ -72,7 +75,7 @@
<ol id="tests"></ol> <ol id="tests"></ol>
<div id="main" style="position:absolute;top:-2000000px;"> <div id="main" style="position:absolute; top:-2000000px;">
</div> </div>