Skip to content
Snippets Groups Projects
Commit e834e2ab authored by Nils Schneider's avatar Nils Schneider
Browse files

infobox hides sidebar

parent 5334a4b9
Branches
Tags
No related merge requests found
...@@ -7,11 +7,13 @@ define(["infobox/link", "infobox/node"], function (Link, Node) { ...@@ -7,11 +7,13 @@ define(["infobox/link", "infobox/node"], function (Link, Node) {
if (el && el.parentNode) { if (el && el.parentNode) {
el.parentNode.removeChild(el) el.parentNode.removeChild(el)
el = undefined el = undefined
sidebar.reveal()
} }
} }
function create() { function create() {
destroy() destroy()
sidebar.hide()
el = document.createElement("div") el = document.createElement("div")
sidebar.container.insertBefore(el, sidebar.container.firstChild) sidebar.container.insertBefore(el, sidebar.container.firstChild)
......
...@@ -30,6 +30,14 @@ define([], function () { ...@@ -30,6 +30,14 @@ define([], function () {
d.render(container) d.render(container)
} }
self.hide = function () {
container.classList.add("hidden")
}
self.reveal = function () {
container.classList.remove("hidden")
}
self.container = sidebar self.container = sidebar
return self return self
......
...@@ -126,6 +126,10 @@ table.attributes td { ...@@ -126,6 +126,10 @@ table.attributes td {
border-radius: 2px; border-radius: 2px;
} }
.container.hidden {
display: none;
}
p { p {
line-height: 1.67em; line-height: 1.67em;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment