Leonid,
You have to work with BorderContainer differently:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Example</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.18/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.18/esri/css/esri.css">
<style>
html,
body {
height: 100%;
width: 100%;
margin: 0%;}
</style>
<script src="http://js.arcgis.com/3.18/init.js"></script>
<script>
require([
"esri/map", "esri/dijit/Basemap",
"dijit/registry", "dojo/on", "dojo/dom", "dojo/parser",
"dijit/form/Button", "dijit/Toolbar", "dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"dojo/domReady!"
], function(
Map, Basemap, registry, on, dom, parser
) {
parser.parse();
map = new Map("map", {
basemap: "osm",
center: [37.6,55.7],
zoom: 8,
});
on(dom.byId("tableButton"), "click", function(){
toggle_visibility("bott");
})
function toggle_visibility() {
var appLayout = registry.byId("contentAll");
var bottPanel = registry.byId("bott");
var panelIndex = appLayout.getIndexOfChild(bottPanel);
if(panelIndex >= 0) {
appLayout.removeChild(bottPanel);
} else {
appLayout.addChild(bottPanel);
}
appLayout.resize();
}
});
</script>
</head>
<body class="claro">
<div id="contentAll" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="width: 100%; height: 100%; margin: 0;">
<div id="content" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="width: 100%; height: 100%; margin: 0;">
<div id="navToolbar" data-dojo-type="dijit/Toolbar" data-dojo-props="region:'top'" >
<div data-dojo-type="dijit/form/Button" id="tableButton">Show/Hide bottom table</div>
</div>
<div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" style="overflow:hidden">
</div>
</div>
<div id="bott" data-dojo-type="dijit/layout/ContentPane" data-dojo-props='region:"bottom", splitter:true, style:"height:150px"'>
</div>
</div>
</body>
</html>