Commit 91a65016 authored by Téo Vasseur's avatar Téo Vasseur

js : add and use hideOverlays()

parent ead9cd3b
......@@ -54,26 +54,31 @@ function setMenuOptions() {
}
}
function hideOverlays() {
$(".overlay").hide();
selectedView = undefined;
}
function setOverlays() {
div = document.createElement('div');
div.className = "overlay";
div.onclick = function () {
$(".overlay").hide();
setView(selectedView, 'A');
hideOverlays();
}
document.getElementById('A').appendChild(div);
div = div.cloneNode();
div.onclick = function () {
$(".overlay").hide();
setView(selectedView, 'B');
hideOverlays();
}
document.getElementById('B').appendChild(div);
div = div.cloneNode();
div.onclick = function () {
$(".overlay").hide();
setView(selectedView, 'C');
hideOverlays();
}
document.getElementById('C').appendChild(div);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment