Commit 3dedc740 authored by Marc Duez's avatar Marc Duez

index.js : data normalization box

parent 6556264a
......@@ -316,6 +316,16 @@
<ul> </ul>
</div>
<div id="dataMenu">
<span class="closeButton" onclick="$('#dataMenu').hide('fast')">X</span>
<div> data : <span id=data_name></span></div>
<div>
<span>expected size : </span>
<span><input type="number" step="0.0001" id="normalized_data"></span>
<button id="normalized_data_button">ok</button>
</div>
</div>
<div id="frame-container"></div>
<div id="popup-container">
......
......@@ -240,6 +240,20 @@ Builder.prototype = {
li.appendChild(div)
listTag.appendChild(li);
document.getElementById("normalized_data").onkeydown = function () {
if (event.keyCode == 13) document.getElementById('normalized_data_button').click();
}
document.getElementById("normalized_data_button").onclick = function () {
var data = document.getElementById('data_name').innerHTML
var size = parseFloat(document.getElementById('normalized_data').value);
document.getElementById('normalized_data').value = ""
self.m.compute_data_normalization(data, size)
self.m.update()
$('#dataMenu').hide('fast')
self.build_settings()
}
},
/* Fonction servant à "déverouiller" l'appel de la fonction compute_normalization(), ainsi qu'à apposer le 'check' au checkBox 'normalize'
......
......@@ -663,3 +663,10 @@ function changeTag(cloneID) {
document.getElementById("tag_id")
.innerHTML = cloneID;
}
function openDataMenu(data) {
$('#dataMenu')
.show("fast");
document.getElementById("data_name")
.innerHTML = data;
}
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