Commit 910aa437 authored by Armand Bour's avatar Armand Bour Committed by Mathieu Giraud
Browse files

Add function to show add clone popup

parent b3d1b1f0
......@@ -81,19 +81,21 @@ function changeStyle(newStyle){
}
function loadData() {
if (m.analysisHasChanged){
m.analysisHasChanged = false;
console.log({"type": "popup", "default": "save_analysis",
console.log({"type": "popup", "default": "save_analysis",
"msg": "<div class=\'center\'> <button onclick=\'loadData()\'>Continue</button> "
+ " <button onclick='console.closePopupMsg()'>Cancel</button> </div>"});
return
}
document.getElementById("file_menu")
.style.display = "block";
document.getElementById("axis_choice")
.style.display = "none";
document.getElementById("add_clone_menu")
.style.display = "none";
}
function loadAnalysis() {
......@@ -101,6 +103,8 @@ function loadAnalysis() {
.style.display = "block";
document.getElementById("file_menu")
.style.display = "none";
document.getElementById("add_clone_menu")
.style.display = "none";
}
function cancel() {
......@@ -140,9 +144,29 @@ function showDisplayMenu() {
.toggle("fast");
}
function addManualClone() {
document.getElementById("add_clone_menu")
.style.display = "block";
/**
* Shows the "add manual clone" menu.
* @param {boolean} error - represents whether the input should be showed in error style.
*/
function showAddManualCloneMenu(error) {
var addCloneMenuNode = document.getElementById("add_clone_menu");
addCloneMenuNode.style.display = "block";
var inputNode = document.getElementById("addclone_input");
if (error) {
inputNode.classList.add("error");
var onFocus = function(evt) {
evt.target.removeEventListener("focus", onFocus);
evt.target.classList.remove("error");
}
inputNode.addEventListener("focus", onFocus);
} else {
inputNode.classList.remove("error");
}
document.getElementById("axis_choice")
.style.display = "none";
document.getElementById("file_menu")
.style.display = "none";
}
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