mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
158 lines
3.6 KiB
HTML
Executable File
158 lines
3.6 KiB
HTML
Executable File
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Resizing Border Layout example</title>
|
|
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
|
|
<link type="text/css" href="../../lib/jquery-ui-1.7.1.custom.css" rel="stylesheet" />
|
|
<style>
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.layout {
|
|
height: 100%;
|
|
}
|
|
|
|
.center, .east, .west, .north, .south {
|
|
background-color: white;
|
|
text-align: center;
|
|
display: inline-block;
|
|
padding: 1em;
|
|
}
|
|
|
|
.west, .east {
|
|
width: 8%;
|
|
}
|
|
|
|
.north, .south {
|
|
height: 10%;
|
|
}
|
|
|
|
/**
|
|
* These styles are to create custom resize handles.
|
|
*/
|
|
.ui-resizable-handle {
|
|
background-color: rgb(220, 220, 220);
|
|
text-align: center;
|
|
}
|
|
|
|
.ui-resizable-w, .ui-resizable-e {
|
|
width: 6px;
|
|
border-left: 1px solid rgb(210, 210, 210);
|
|
border-right: 1px solid rgb(210, 210, 210);
|
|
}
|
|
|
|
.ui-resizable-w {
|
|
left: -8px;
|
|
}
|
|
|
|
.ui-resizable-e {
|
|
right: -8px;
|
|
}
|
|
|
|
.ui-resizable-n, .ui-resizable-s {
|
|
height: 6px;
|
|
border-top: 1px solid rgb(210, 210, 210);
|
|
border-bottom: 1px solid rgb(210, 210, 210);
|
|
}
|
|
|
|
.ui-resizable-n {
|
|
top: -8px;
|
|
background:
|
|
}
|
|
|
|
.ui-resizable-s {
|
|
bottom: -8px;
|
|
}
|
|
|
|
.ui-resizable-helper-west {
|
|
border-right: 6px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
.ui-resizable-helper-east {
|
|
border-left: 6px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
.ui-resizable-helper-north {
|
|
border-bottom: 6px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
.ui-resizable-helper-south {
|
|
border-top: 6px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
.ui-icon {
|
|
}
|
|
</style>
|
|
<script type="text/javascript" src="../../lib/jquery-1.3.2.js"></script>
|
|
<script type="text/javascript" src="../../lib/jquery-ui-1.7.1.custom.min.js"></script>
|
|
<script type="text/javascript" src="../../lib/jquery.metadata.js"></script>
|
|
<script type="text/javascript" src="../jsizes/jquery.sizes.js"></script>
|
|
<script type="text/javascript" src="jlayout.border.js"></script>
|
|
<script type="text/javascript" src="jquery.jlayout.js"></script>
|
|
<script type="text/javascript">
|
|
jQuery(function($)
|
|
{
|
|
var container = $('.layout');
|
|
|
|
function layout() {
|
|
container.layout({resize: false, type: 'border', vgap: 8, hgap: 8});
|
|
}
|
|
|
|
$('.north').resizable({
|
|
handles: 's',
|
|
stop: layout,
|
|
helper: 'ui-resizable-helper-north'
|
|
});
|
|
|
|
$('.south').resizable({
|
|
handles: 'n',
|
|
stop: layout,
|
|
helper: 'ui-resizable-helper-south'
|
|
});
|
|
|
|
$('.east').resizable({
|
|
handles: 'w',
|
|
stop: layout,
|
|
helper: 'ui-resizable-helper-east'
|
|
});
|
|
|
|
$('.west').resizable({
|
|
handles: 'e',
|
|
stop: layout,
|
|
helper: 'ui-resizable-helper-west'
|
|
});
|
|
|
|
$(window).resize(layout);
|
|
|
|
layout();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="layout">
|
|
<div class="center">
|
|
Center
|
|
<h1><a href="http://www.bramstein.com/projects/jlayout/">jLayout project homepage</a></h1>
|
|
</div>
|
|
<div class="east">
|
|
East
|
|
</div>
|
|
<div class="west">
|
|
West
|
|
</div>
|
|
<div class="north">
|
|
North
|
|
</div>
|
|
<div class="south">
|
|
South
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|