Commit 802335fe authored by Téo Vasseur's avatar Téo Vasseur

js, css : rename overlay methods to "editor"

parent f56b9ff2
......@@ -110,8 +110,11 @@ div {
border-color: #ccc;*/
}
.overlay {
.editor {
display: none;
}
.overlay {
z-index: 2;
background-image: url('../images/box.png');
background-size: 100% 100%;
......
......@@ -29,8 +29,8 @@ vmi.setView = function(view, panel) {
vmi.viewSelector = function(view) {
var f = function() {
vmi.hideOverlays();
$(".overlay").show();
vmi.hideEditors();
$(".editor").show();
vmi.selectedView = view;
}
return f;
......@@ -40,15 +40,15 @@ vmi.viewSetter = function(view) {
var focus = function(target) {
target.className += " focused";
var listener = function() {
vmi.hideOverlays();
vmi.hideEditors();
target.removeEventListener('click', listener);
};
target.addEventListener('click', listener);
}
var f = function(e) {
if (e.ctrlKey) {
vmi.hideOverlays();
$(".overlay").show();
vmi.hideEditors();
$(".editor").show();
vmi.selectedView = view;
focus(e.target);
} else {
......@@ -74,8 +74,8 @@ vmi.setMenuOptions = function() {
}
}
vmi.hideOverlays = function() {
$(".overlay").hide();
vmi.hideEditors = function() {
$(".editor").hide();
$(".focused").removeClass("focused");
vmi.selectedView = undefined;
}
......@@ -83,10 +83,10 @@ vmi.hideOverlays = function() {
vmi.setOverlays = function() {
var setOverlay = function(id) {
div = document.createElement('div');
div.className = "overlay";
div.className = "editor overlay";
div.onclick = function() {
vmi.setView(vmi.selectedView, id);
vmi.hideOverlays();
vmi.hideEditors();
}
document.getElementById(id).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