Commit e96e6d5e authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/normalization' into 'dev'

normalization : fix tests, show buttons when needed

Closes #3661

See merge request !382
parents f0fdb02a e9d8cf63
Pipeline #57465 passed with stages
in 5 minutes and 58 seconds
......@@ -1361,6 +1361,9 @@ span.warningReads {
#bot-separator:hover {
background: #fdf6e3;
}
#norm_button {
width: 7ex;
}
.edit_button {
float: right;
margin-right: 2px;
......
......@@ -1561,6 +1561,10 @@ span.warningReads {
background: @highlight;
}
#norm_button {
width: 7ex;
}
.edit_button {
float: right;
margin-right: 2px;
......
......@@ -274,6 +274,8 @@ Model.prototype = {
initClones: function () {
console.log("initClones()");
var have_external_normalization = false
$("#external_normalization").hide();
$("#expected_normalization").hide();
// time_type to name_short if there is many samples
if (this.samples.order.length > 6)
......@@ -312,6 +314,7 @@ Model.prototype = {
var radio = document.getElementById("external_normalization_input")
if (radio != undefined) {
radio.checked = true;
$("#external_normalization").show();
}
}
}, //end initClones
......@@ -1991,6 +1994,7 @@ changeAlleleNotation: function(alleleNotation) {
span2.appendChild(this.norm_input)
this.norm_button = document.createElement('button');
this.norm_input.id = "norm_button";
this.norm_button.appendChild(document.createTextNode("ok"))
this.norm_button.onclick = function () {
var cloneID = self.cloneID;
......@@ -1998,13 +2002,13 @@ changeAlleleNotation: function(alleleNotation) {
if (size>0 && size<1){
self.set_normalization( self.NORM_EXPECTED )
$("#expected_normalization").show();
self.norm_input.value = ""
self.clone(cloneID).expected=size;
self.compute_normalization(cloneID, size)
self.update()
$(self.tagSelector).hide('fast')
document.getElementById("expected_normalization_input").checked = true;
$("expected_normalization_input").prop("checked", true)
}else{
console.log({"type": "popup", "msg": "expected input between 0.0001 and 1"});
}
......
......@@ -161,8 +161,6 @@ QUnit.test("tag/norm", function(assert) {
assert.equal(m.clone(1).getSize(), 0.1, "size before norm : Ok")
assert.equal(m.clone(2).getSize(), 0.125, "size before norm : Ok")
return; // TMP //
m.norm_input.value = 0.25;
m.norm_button.click();
......
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