115 строки
4.0 KiB
HTML
115 строки
4.0 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Essential JS 1 : Splitter Orientation</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
|
|
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
|
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
|
<link href="../content/default.css" rel="stylesheet" />
|
|
<link href="../content/default-responsive.css" rel="stylesheet" />
|
|
<!--[if lt IE 9]>
|
|
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript" ></script>
|
|
<![endif]-->
|
|
<!--[if IE 9]><!-->
|
|
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"> </script>
|
|
<!--<![endif]-->
|
|
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="content-container-fluid">
|
|
<div class="row">
|
|
<div class="cols-sample-area splitter-width">
|
|
<div id="outterSpliter">
|
|
<div id="innerSpliter">
|
|
<div>
|
|
<div class="cont">Pane 1 </div>
|
|
</div>
|
|
<div>
|
|
<div class="cont">Pane 2 </div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="cont">Pane 3 </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="sampleProperties">
|
|
<div class="prop-grid">
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
Orientation
|
|
</div>
|
|
<div class="col-md-3">
|
|
<select id="changeOrientation">
|
|
<option value="horizontal">Horizontal</option>
|
|
<option value="vertical">Vertical</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var splitterOutter, splitterInner;
|
|
$(function () {
|
|
// declaration
|
|
$("#outterSpliter").ejSplitter({
|
|
height: 250, width: "50%",
|
|
orientation: ej.Orientation.Vertical,
|
|
properties: [{minSize:70}, { paneSize: "60%" }],
|
|
enableAutoResize:true
|
|
});
|
|
$("#innerSpliter").ejSplitter({
|
|
properties: [{ paneSize: "50%" }, {}],
|
|
enableAutoResize:true
|
|
});
|
|
|
|
splitterOutter = $("#outterSpliter").data("ejSplitter");
|
|
splitterInner = $("#innerSpliter").data("ejSplitter");
|
|
|
|
$("#changeOrientation").ejDropDownList({
|
|
selectedItem: 0,
|
|
"change": "onOrientationChange",
|
|
width: "120px",
|
|
selectedItemIndex: 0
|
|
});
|
|
});
|
|
function onOrientationChange(args) {
|
|
switch (args.value) {
|
|
case "vertical":
|
|
splitterOutter.option("orientation", "horizontal");
|
|
splitterInner.option("orientation", "vertical");
|
|
|
|
break;
|
|
case "horizontal":
|
|
splitterOutter.option("orientation", "vertical");
|
|
splitterInner.option("orientation", "horizontal");
|
|
break;
|
|
}
|
|
}
|
|
|
|
$("#sampleProperties").ejPropertiesPanel();
|
|
</script>
|
|
<style type="text/css" class="cssStyles">
|
|
.cont {
|
|
padding: 10px 0 0 30px;
|
|
}
|
|
.row .cols-sample-area {
|
|
padding: 28px;
|
|
|
|
}
|
|
|
|
.cols-prop-area .content{
|
|
overflow-y:hidden;
|
|
}
|
|
@media \0screen {
|
|
.fixedlayout .row .cols-sample-area { padding: 24.5px !important; }
|
|
}
|
|
</style>
|
|
</body>
|
|
</html>
|