ImageGrid/ui/experiments/panels.html

86 lines
1.6 KiB
HTML
Raw Normal View History

<html>
<link rel="stylesheet" href="../css/ui-lightness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="../css/editor.css">
<style>
body.dark {
background: #0a0a0a;
color: silver;
}
body.gray {
background: #333;
color: silver;
}
</style>
<script src="../ext-lib/jquery.js"></script>
<script src="../ext-lib/jquery-ui.js"></script>
<script src="../lib/panels.js"></script>
<script src="../lib/editor.js"></script>
<script>
function toggleThemes(){
var b = $('body')
if(b.hasClass('gray')){
b.removeClass('gray')
b.addClass('dark')
} else if(b.hasClass('dark')){
b.removeClass('dark')
} else {
b.addClass('gray')
}
}
function toggleAutoHide(){
var elem = $('.side-panel')
if(elem.attr('autohide') == 'off'){
elem.attr('autohide', 'on')
} else {
elem.attr('autohide', 'off')
}
return false
}
$(function(){
var panel = makePanel('Test Panel A', true)
.css({
top: 50,
left: 50,
})
makeSubPanel('Test Sub Panel A', $('<h1>Panel A</h1>'), panel, true, true)
makeSubPanel('Test Sub Panel B', $('<h2>Panel B</h2>'), panel, true)
makeSubPanel('Test Sub Panel C', $('<h3>Panel C</h3>'), panel, false)
makeFilterPanel(panel, '.moo')
makeSnapshotsPanel(panel, '.moo')
$('body')
.append(panel)
.append(makeSidePanel('left'))
.append(makeSidePanel('right'))
})
</script>
<body>
<p>click <a href="javascript:toggleAutoHide()">here to toggle panel autohide</a> and <a href="javascript:toggleThemes()">here to toggle theme...</a></p>
</body>
</html>
<!-- vim:set ts=4 sw=4 : -->